IoTEdge deployment reporting success query not always resulting 200

Gopikrishnan Bahuleyan Pillai 31 Reputation points

In certain scenarios (like you remove a latest deployment from edge deployments), as documented system takes on the next available highest priority deployment and applies it; but it does not update the reporting success value.


select deviceId from devices.modules where moduleId = '$edgeAgent' and configurations.[[iotdeploymentid123]].status = 'Applied' and properties.desired.$version = properties.reported.lastDesiredVersion and properties.reported.lastDesiredStatus.code = 200

It seems, system is not updating "properties.reported.lastDesiredStatus.code" value to 200.
If I do an edgeAgent restart from edge, properties.reported.lastDesiredStatus.code gets applied to 200

Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
534 questions
{count} votes

1 answer

Sort by: Most helpful
  1. António Sérgio Azevedo 7,661 Reputation points Microsoft Employee

    Hello @Gopikrishnan Bahuleyan Pillai ,
    As per discussion in the Azure Support Ticket we are now posting the answer publicly. Please mark it as answer.

    Reported Success will only happen if the Edge Device is notified of a change. Edge is only notified of a change if there is a version change on the twin. IoTHub is smart enough to not change the twin version if there are no changes made to the modules, so this behavior is intended.

    Reported Success is the correct metric to use, it may take a few minutes to update, but if there is a twin version change the metric will update.

    So basically, there is no such thing as an update that doesn't contain any changes. If an identical deployment is pushed to IoTHub, no version change will happen and any edge devices won't be notified. If there is a version change, Reported Success will update

    Thank you so much for all your feedback!


    • Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification.
    0 comments No comments