Azure / iot-hub-device-update

Device Update for IoT Hub agent
MIT License
51 stars 36 forks source link

Seeking Documentation on Retry Behavior #630

Closed agreentree-dmc closed 1 week ago

agreentree-dmc commented 1 month ago

I am using ADU Agent 1.1.0 with SWUpdate Handler V2.

I have implemented a fallback that can revert the update if the update is bad (for example if you apply an update that breaks the network stack and the system can no longer establish a connection to ADU).

When testing a bad update I can watch the system fallback, and then the status of device in it's update group reports 'Failed', which is the desired behavior.

However, after the update fails -- the agent appears to periodically retry the update. For my use case, it would be ideal if the device only tries the update once - and then requires a user to go the portal and click 'Retry failed devices' before the agent would try the update again. Is there any documentation on the retry behavior of the update agent so I can understand better when it will retry an update? Are there any parameters that are different for updates that are sent when users click 'Retry failed devices' so that I could implement the agent only trying the update the first time or on 'Retry failed devices'?

eshashah-msft commented 4 weeks ago

Hi @agreentree-dmc, Please find this documentation that explains how the DU agent behavior attempts retries in case of failures: Goal State Behavior

For the ask to limit or specifying the number of retries, this makes sense and we will track this as a feature request in our backlog. Also, creating a discussion post to allow other users to upvote for prioritization as well: #632