Skip to content

Commit a264458

Browse files
Merge pull request #314313 from jlian/fix/restart-policy-docs
Fix restartPolicy documentation: on-failure works, correct naming
2 parents 4d77bc7 + a8d63fe commit a264458

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

articles/iot-edge/iot-edge-limits-and-restrictions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ Not supported query syntax:
8484

8585
### Restart policies
8686

87-
Don't use `on-unhealthy` or `on-failure` as values in modules' `restartPolicy` because they are unimplemented and won't initiate a restart. Only `never` and `always` restart policies are implemented.
87+
The `on-unhealthy` restart policy value is accepted by the schema but the runtime doesn't currently derive unhealthy status from Docker health checks, so it has no practical effect. The `on-failure` restart policy restarts modules that exit with a non-zero exit code. Only `never`, `on-failure`, and `always` restart policies produce observable behavior.
8888

89-
The recommended way to automatically restart unhealthy IoT Edge modules is noted in [this workaround](https://github.com/Azure/iotedge/issues/6358#issuecomment-1144022920). Configure the `Healthcheck` property in the module's `createOptions` to handle a failed health check.
89+
To automatically restart modules that become unhealthy, use the workaround noted in [this GitHub issue](https://github.com/Azure/iotedge/issues/6358#issuecomment-1144022920). Configure the `Healthcheck` property in the module's `createOptions` to handle a failed health check.
9090

9191
### Troubleshooting logs
9292

articles/iot-edge/module-edgeagent-edgehub.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The module twin for the IoT Edge agent is called **$edgeAgent**. It coordinates
3030
| Property | Description | Required |
3131
| -------- | ----------- | -------- |
3232
| `imagePullPolicy` | Specifies when to pull the image: **OnCreate** or **Never**. Use **Never** if the image is already on the device. | Yes |
33-
| `restartPolicy` | When to restart the module. Possible values are: **Never**: don't restart module if not running, **Always**: always restart module if not running, **On-Unhealthy**: restart module if unhealthy, **On-Failed**: restart if Failed. **Note:** Only **Never** and **Always** are currently implemented. **On-Unhealthy** and **On-Failed** are accepted by the schema but don't initiate a restart. For details, see [IoT Edge limits and restrictions](iot-edge-limits-and-restrictions.md). | Yes |
33+
| `restartPolicy` | When to restart the module. Possible values are: **never**: don't restart module if not running, **on-failure**: restart module if it exits with a non-zero exit code, **on-unhealthy**: restart module if unhealthy (see note), **always**: always restart module if not running. **Note:** The `on-failure` policy restarts modules that exit with a non-zero exit code. The `on-unhealthy` policy is accepted by the schema but the runtime doesn't currently derive unhealthy status from Docker health checks, so it has no practical effect. For details, see [IoT Edge limits and restrictions](iot-edge-limits-and-restrictions.md). | Yes |
3434
| `runtime.type` | Must be **docker**. | Yes |
3535
| `runtime.settings.minDockerVersion` | Specifies the minimum Docker version required by this deployment manifest. | Yes |
3636
| `runtime.settings.loggingOptions` | Specifies a stringified JSON with the logging options for the IoT Edge agent container. Learn more about [Docker logging options](https://docs.docker.com/engine/admin/logging/overview/). | No |
@@ -54,7 +54,7 @@ The module twin for the IoT Edge agent is called **$edgeAgent**. It coordinates
5454
| `modules.{moduleId}.version` | A user-defined string representing the version of this module. | Yes |
5555
| `modules.{moduleId}.type` | Must be **docker**. | Yes |
5656
| `modules.{moduleId}.status` | **running** \| **stopped** | Yes |
57-
| `modules.{moduleId}.restartPolicy` | **never** \| **always** | Yes |
57+
| `modules.{moduleId}.restartPolicy` | **never** \| **on-failure** \| **on-unhealthy** \| **always** | Yes |
5858
| `modules.{moduleId}.startupOrder` | An integer value for the location a module has in the startup order. A **0** is first and **max integer** (4294967295) is last. If you don't provide a value, the default is **max integer**. | No |
5959
| `modules.{moduleId}.imagePullPolicy` | **on-create** \| **never** | No |
6060
| `modules.{moduleId}.env` | A list of environment variables to pass to the module. Takes the format `"<name>": {"value": "<value>"}`. | No |

0 commit comments

Comments
 (0)