forked from Azure/iotedge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Agent reported state as "406" when modules are in backoff. (Azure#3244)
To reproduce 1. create a deployment which has a module which fails to launch, like an incorrect image name, or some weird mount Docker doesn't like. 2. Look at the reported status of the edge runtime - If you are lucky, you will see the real error. 3. Let the runtime run for long enough that the "OrderedRetryPlanRunner" puts the module on backoff. 4. Look at the reported status of the edge runtime - You won't see the real error message from the failure - you will see a "406 -- The device is offline or not sending status reports" The root cause is that every reconcile starts with status=Unknown(406), and when a module is in backoff, the status doesn't update. So it goes: reconcile loop 1: module command fails, error is reported reconcile loop 2: module is in backoff now, Unknown is reported ... reconcile loop n: module command is attempted again, error is reported reconcile loop n+1: module is in backoff again, Unknown is reported. User is more likely to see "406 -- The device is offline or not sending status reports" which is not cool. This has been seen before, one example: Azure#2066 The fix here is to keep track of status in Agent and report current status until it changes (either via a new error
- Loading branch information
Showing
2 changed files
with
125 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters