IoTEdge deployment reporting success query not always resulting 200

Gopikrishnan Bahuleyan Pillai 31 Reputation points
2020-12-18T22:13:01.057+00:00

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.

Query

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.
561 questions
{count} votes

1 answer

Sort by: Most helpful
  1. António Sérgio Azevedo 7,666 Reputation points Microsoft Employee
    2021-03-11T01:05:06.07+00:00

    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!

    Remember:

    • 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