Giter VIP home page Giter VIP logo

Comments (10)

ValOlson avatar ValOlson commented on September 24, 2024

@Voxel07 Can you tell us which version of the agent you are using?

from iot-hub-device-update.

Voxel07 avatar Voxel07 commented on September 24, 2024

@ValOlson I'm using version 0.7.0

from iot-hub-device-update.

ValOlson avatar ValOlson commented on September 24, 2024

Thanks @Voxel07 can you share the logs you referenced above with us? Also can you tell us the use case requiring you to restart the IoT device after other phases instead of during the 'Apply' phase?

from iot-hub-device-update.

Voxel07 avatar Voxel07 commented on September 24, 2024

As I wrote in the initial Issue, the Client Updater is implemented with Rauc and not SwUpdate.

Why is that a Problem ?
I have a custom Client side Updater that installs the Update. But its workflow differs form SW-Update in that, that the System needs to be restarted in between the Installation and Apply phase.

Here is the log, please note, that the Agent version is not correct because It's the modified code from my own repository. But I merged all changes from version 0.7.0 into it.

root@fsimx8mm:~# su -m adu -c "AducIotAgent --log-level 0"
2021-06-01T09:41:46.4657Z [I] Agent (linux; 0.6.0-public-preview) starting. [main]
2021-06-01T09:41:46.4658Z [I] Agent built with handlers: microsoft/swupdate. [main]
2021-06-01T09:41:46.4765Z [I] Initalizing PnP components. [ADUC_PnP_Components_Create]
2021-06-01T09:41:46.4765Z [I] ADUC agent started. Using IoT Hub Client SDK 1.6.0 [AzureDeviceUpdateCoreInterface_Create]
2021-06-01T09:41:46.4765Z [I] Calling ADUC_Register [ADUC_MethodCall_Register]
2021-06-01T09:41:46.4765Z [I] IoTHub Device Twin callback registered. [ADUC_DeviceClient_Create]
2021-06-01T09:41:46.4867Z [W] Failed to pass connection string to DO, error: -3 [StartupAgent]
2021-06-01T09:41:46.4868Z [I] Agent running. [main]
2021-06-01T09:41:47.0038Z [D] IotHub connection status: 0, reason:6 [ADUC_ConnectionStatus_Callback]
2021-06-01T09:41:47.4062Z [D] ComponentName:azureDeviceUpdateAgent, propertyName:service [ADUC_PnP_ComponentClient_PropertyUpdate_Callback]
2021-06-01T09:41:47.4063Z [D] OrchestratorUpdateCallback received property JSON string ({"action":255,"updateManifest":"","updateManifestSignature":""}), property version (84) [OrchestratorUpdateCallback]
2021-06-01T09:41:47.4064Z [I] Perform startup tasks. [ADUC_Workflow_HandleStartupWorkflowData]
2021-06-01T09:41:47.4064Z [I] Calling IsInstalledCallback to check if content is installed. [ADUC_MethodCall_IsInstalled]
2021-06-01T09:41:47.4064Z [I] IsInstalledCallback called [IsInstalledCallback]
2021-06-01T09:41:47.4064Z [I] IsInstalled called workflowId: , installed criteria: (null) [IsInstalled]
2021-06-01T09:41:47.4067Z [E] Failed to create content handler, updateType:(null) [IsInstalled]
2021-06-01T09:41:47.4067Z [W] IsInstalled call failed. ExtendedResultCode: -536870781 - setting state to Idle [ADUC_Workflow_HandleStartupWorkflowData]
2021-06-01T09:41:47.4067Z [I] Setting UpdateState to Idle [ADUC_SetUpdateStateHelper]
2021-06-01T09:41:47.4067Z [I] ---TMP---updateState == ADUCITF_State_Idle [ADUC_SetUpdateStateHelper]
2021-06-01T09:41:47.4068Z [I] Reporting state: 0, Idle (0); HTTP 200; result 1, 0 [AzureDeviceUpdateCoreInterface_ReportStateAndResultAsync]
2021-06-01T09:41:47.4068Z [I] UpdateAction: Idle. WorkflowId: 210601094147 [ADUC_MethodCall_Idle]
2021-06-01T09:41:47.4069Z [I] Calling IdleCallback [ADUC_MethodCall_Idle]
2021-06-01T09:41:47.4069Z [I] Now idle. workflowId: 210601094147 [Idle]
2021-06-01T09:41:47.4069Z [I] OrchestratorPropertyUpdateCallback ended [OrchestratorUpdateCallback]
2021-06-01T09:41:47.4070Z [I] Processing existing Device Twin data after agent started. [ADUC_PnPDeviceTwin_Callback]
2021-06-01T09:41:47.4070Z [D] Notifies components that all callback are subscribed. [ADUC_PnPDeviceTwin_Callback]
2021-06-01T09:41:47.4070Z [I] DeviceInformation component is ready - reporting properties [DeviceInfoInterface_Connected]
2021-06-01T09:41:47.4072Z [I] Property manufacturer changed to FUS [RefreshDeviceInfoInterfaceData]
2021-06-01T09:41:47.4073Z [I] Property model changed to IMX8MM [RefreshDeviceInfoInterfaceData]
2021-06-01T09:41:47.4073Z [I] Property osName changed to Linux [RefreshDeviceInfoInterfaceData]
2021-06-01T09:41:47.4073Z [I] Property swVersion changed to 5.4.70-F-S [RefreshDeviceInfoInterfaceData]
2021-06-01T09:41:47.4073Z [I] Property processorArchitecture changed to aarch64 [RefreshDeviceInfoInterfaceData]
sh: /usr/bin/lscpu: No such file or directory
2021-06-01T09:41:47.4136Z [I] Property totalMemory changed to 1006292 [RefreshDeviceInfoInterfaceData]
2021-06-01T09:41:47.4137Z [I] Property totalStorage changed to 108160 [RefreshDeviceInfoInterfaceData]
2021-06-01T09:42:12.5536Z [D] ComponentName:azureDeviceUpdateAgent, propertyName:service [ADUC_PnP_ComponentClient_PropertyUpdate_Callback]
2021-06-01T09:42:12.5539Z [D] OrchestratorUpdateCallback received property JSON string ({"action":0,"updateManifest":"{"manifestVersion":"2.0","updateId":{"provider":"FuS","name":"stillTesting","version":"1.1"},"updateType":"microsoft/swupdate:1","installedCriteria":"1","files":{"00000":{"fileName":"rauc_update_nand.artifact","sizeInBytes":120899641,"hashes":{"sha256":"byaS9ru1X2OS5qHugZ7YzLIzqg+G0tEzcmd+o3zP+Ns="}}},"createdDateTime":"2021-05-27T17:23:24+00:00"}","updateManifestSignature":"eyJhbGciOiJSUzI1NiIsInNqd2siOiJleUpoYkdjaU9pSlNVekkxTmlJc0ltdHBaQ0k2SWtGRVZTNHlNREEzTURJdVVpSjkuZXlKcmRIa2lPaUpTVTBFaUxDSnVJam9pY2toV1FrVkdTMUl4ZG5Ob1p5dEJhRWxuTDFORVVVOHplRFJyYWpORFZWUTNaa2R1U21oQmJYVkVhSFpJWm1velowaDZhVEJVTWtsQmNVTXhlREpDUTFka1QyODFkamgwZFcxeFVtb3ZibGx3WnprM2FtcFFRMHQxWTJSUE5tMHpOMlJqVDIxaE5EWm9OMDh3YTBod2Qwd3pibFZJUjBWeVNqVkVRUzloY0ZsdWQwVmxjMlY0VkdwVU9GTndMeXRpVkhGW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3JyaHhTUENUQnpXTUV4WnJMWXp1ZEVvZnlZSGlWVlJoU0pwajBPUTE4ZWN1NERQWFYxVGN0MXkzazdMTGlvN244aXpLdXEybTNUeEY5dlBkcWI5TlA2U2M5LW15YXB0cGJGcEhlRmtVTC1GNXl0bF9VQkZLcHdOOUNMNHdwNnlaLWpkWE5hZ3JtVV9xTDFDeVh3MW9tTkNnVG1KRjNHZDNseXFLSEhEZXJEcy1NUnBtS2p3U3dwWkNRSkdEUmNSb3ZXeUwxMnZqdzNMQkpNaG1VeHNFZEJhWlA1d0dkc2ZEOGxkS1lGVkZFY1owb3JNTnJVa1NNQWw2cEl4dGVmRVhpeTVscW1pUHpxX0xKMWVSSXJxWTBfIn0.eyJzaGEyNTYiOiJwWTdiYnR2ZVFqRzhHdFNPTForcDlUaFpVajRQVVo4Zi9WMGdtdzZ4U2JVPSJ9.WVNAn8GGOVdIknVAEwaX4iZ4b4SiqPX9dGdunXt-o0lhEuvyDObq8BuuyALmxaLeRcfwwOJj4PNb-WZ2RH-s9jUiUQsnPS43R9FhP1EL4NUv0CwUBmtw9GLC4oUxMmEkTZkgjmfqVD2RPwK_qUDBE42ZILJyfnFHwJ8z7dJp1BznYA2nBtsmms-ZVRlqx3YMrSKQVsgF_tNqfG2uTHkSWiTpV3906Nqzy3eLlsW5ac0WamgjfgRe-9yfWw4kJB-SZwCmXiJaFdrSRjg8RTjyv80A38KAE4FsxCTjYZbhz6acwLPEsi51rbCM9b-j1kM8CS0ip5wlTEmepa_oth3nnygRGlEmMjW9z7AcOzvVyHam0wMFeYI3UBFE4EVw6pATsiu7GyJNeKf4Q6IcPkTA9M1FK_JcKDevdjNJxvccifkFb7kMrJs8chXfOd5Fg3ewjTqCxwuPCfmMdSKm_i7gGEErHPNwbvlwfTN_68gv79bZcUomT6nbYHGdfl4pR7Xf","fileUrls":{"00000":"http://deviceupdateinstance--schneider-device-update.b.n [OrchestratorUpdateCallback]
2021-06-01T09:42:12.5561Z [I] Processing 'Download' action [ADUC_Workflow_HandleUpdateAction]
2021-06-01T09:42:12.5561Z [I] UpdateAction: Prepare - calling PrepareCallback [ADUC_MethodCall_Prepare]
2021-06-01T09:42:12.5562Z [I] {210601094147} Received Metadata, UpdateType: microsoft/swupdate:1, UpdateTypeName: microsoft/swupdate, UpdateTypeVersion: 1, FileCount: 1 [Prepare]
2021-06-01T09:42:12.5562Z [I] microsoft_swupdate_CreateFunc called. [microsoft_swupdate_CreateFunc]
2021-06-01T09:42:12.5563Z [I] Prepare succeeded. [Prepare]
2021-06-01T09:42:12.5563Z [I] UpdateAction: Download [ADUC_MethodCall_Download]
2021-06-01T09:42:12.5563Z [I] Calling SandboxCreateCallback [ADUC_MethodCall_Download]
2021-06-01T09:42:12.5565Z [I] Setting sandbox /tmp/aduc-dl-210601094147 [SandboxCreate]
2021-06-01T09:42:12.5566Z [I] Using sandbox /tmp/aduc-dl-210601094147 [ADUC_MethodCall_Download]
2021-06-01T09:42:12.5566Z [I] Setting UpdateState to DownloadStarted [ADUC_SetUpdateStateHelper]
2021-06-01T09:42:12.9094Z [I] Calling DownloadCallback [ADUC_MethodCall_Download]
2021-06-01T09:42:12.9095Z [I] Download thread started [DownloadCallback]
2021-06-01T09:42:12.9097Z [I] OrchestratorPropertyUpdateCallback ended [OrchestratorUpdateCallback]
2021-06-01T09:42:12.9100Z [D] Downloading 1 files to /tmp/aduc-dl-210601094147 [Download]
2021-06-01T09:42:12.9101Z [I] Downloading File 'rauc_update_nand.artifact' from 'http://deviceupdateinstance--schneider-device-update.b.nlu.dl.adu.microsoft.com/northeurope/deviceupdateinstance--schneider-device-update/ad51659e9f8643d7b0061201ff3bac66/rauc_update_nand.artifact' to '/tmp/aduc-dl-210601094147/rauc_update_nand.artifact' [Download]
2021-06-01T09:42:27.2510Z [I] Validating file hash [Download]
2021-06-01T09:42:30.6063Z [I] microsoft_swupdate_CreateFunc called. [microsoft_swupdate_CreateFunc]
2021-06-01T09:42:30.6064Z [I] Download called - no-op for swupdate [Download]
2021-06-01T09:42:30.6064Z [I] Content Handler Download resultCode: 1, extendedCode: 0 [Download]
2021-06-01T09:42:30.6065Z [I] ProgressCallback: workflowId: 210601094147; Id 00000; State: Completed; Bytes: 120899641/120899641 [DownloadProgressCallback]
2021-06-01T09:42:30.6065Z [I] Download resultCode: 1, extendedCode: 0 [Download]
2021-06-01T09:42:30.6065Z [I] Action 'Download' complete. Result: 1, 0 [ADUC_Workflow_WorkCompletionCallback]
2021-06-01T09:42:30.6065Z [I] WorkCompletionCallback: Download succeeded. Going to state DownloadSucceeded [ADUC_Workflow_WorkCompletionCallback]
2021-06-01T09:42:30.6065Z [I] Setting UpdateState to DownloadSucceeded [ADUC_SetUpdateStateHelper]
2021-06-01T09:42:30.6066Z [I] Reporting state: DownloadSucceeded (2) [AzureDeviceUpdateCoreInterface_ReportStateAndResultAsync]
2021-06-01T09:42:34.5783Z [D] ComponentName:azureDeviceUpdateAgent, propertyName:service [ADUC_PnP_ComponentClient_PropertyUpdate_Callback]
2021-06-01T09:42:34.5785Z [D] OrchestratorUpdateCallback received property JSON string ({"action":1,"updateManifest":"{"manifestVersion":"2.0","updateId":{"provider":"FuS","name":"stillTesting","version":"1.1"},"updateType":"microsoft/swupdate:1","installedCriteria":"1","files":{"00000":{"fileName":"rauc_update_nand.artifact","sizeInBytes":120899641,"hashes":{"sha256":"byaS9ru1X2OS5qHugZ7YzLIzqg+G0tEzcmd+o3zP+Ns="}}},"createdDateTime":"2021-05-27T17:23:24+00:00"}","updateManifestSignature":"eyJhbGciOiJSUzI1NiIsInNqd2siOiJleUpoYkdjaU9pSlNVekkxTmlJc0ltdHBaQ0k2SWtGRVZTNHlNREEzTURJdVVpSjkuZXlKcmRIa2lPaUpTVTBFaUxDSnVJam9pY2toV1FrVkdTMUl4ZG5Ob1p5dEJhRWxuTDFORVVVOHplRFJyYWpORFZWUTNaa2R1U21oQmJYVkVhSFpJWm1velowaDZhVEJVTWtsQmNVTXhlREpDUTFka1QyODFkamgwZFcxeFVtb3Zib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vlwfTN_68gv79bZcUomT6nbYHGdfl4pR7Xf","fileUrls":null}), property version (86) [OrchestratorUpdateCallback]
2021-06-01T09:42:34.5807Z [I] Processing 'Install' action [ADUC_Workflow_HandleUpdateAction]
2021-06-01T09:42:34.5807Z [I] UpdateAction: Install [ADUC_MethodCall_Install]
2021-06-01T09:42:34.5807Z [I] Setting UpdateState to InstallStarted [ADUC_SetUpdateStateHelper]
2021-06-01T09:42:34.5808Z [I] Calling InstallCallback [ADUC_MethodCall_Install]
2021-06-01T09:42:34.5808Z [I] Install thread started [InstallCallback]
2021-06-01T09:42:34.5810Z [I] OrchestratorPropertyUpdateCallback ended [OrchestratorUpdateCallback]
2021-06-01T09:42:34.5813Z [I] Installing from /tmp/aduc-dl-210601094147 [Install]
2021-06-01T09:42:34.5814Z [I] Installing image file: rauc_update_nand.artifact [Install]
2021-06-01T09:42:34.5815Z [I] Starting FS-Updater with -ff [ADUC_LaunchChildProcess]
install-check (523): drop_caches: 3
install-check (544): drop_caches: 3
install-check (565): drop_caches: 3
2021-06-01T09:43:55.0585Z [I] Child process terminated normally, signal 1 [ADUC_LaunchChildProcess]
2021-06-01T09:43:55.0672Z [I] Install succeeded [Install]
2021-06-01T09:43:55.1032Z [I] Action 'Install' complete. Result: 1, 0 [ADUC_Workflow_WorkCompletionCallback]
2021-06-01T09:43:55.1032Z [I] WorkCompletionCallback: Install succeeded. Going to state InstallSucceeded [ADUC_Workflow_WorkCompletionCallback]
2021-06-01T09:43:55.1033Z [I] Setting UpdateState to InstallSucceeded [ADUC_SetUpdateStateHelper]
2021-06-01T09:43:55.1033Z [I] Reporting state: InstallSucceeded (4) [AzureDeviceUpdateCoreInterface_ReportStateAndResultAsync]
2021-06-01T09:43:55.1034Z [I] ---TMP---Rebooting ...
[AzureDeviceUpdateCoreInterface_ReportStateAndResultAsync]
2021-06-01T09:43:55.1034Z [I] Calling ADUC_RebootSystem [ADUC_MethodCall_RebootSystem]
2021-06-01T09:43:55.1035Z [I] ADUC_RebootSystem called. Rebooting system. [ADUC_RebootSystem]
2021-06-01T09:43:55.1037Z [I] Calling adu-shell [ADUC_LaunchChildProcess]

---- Shutdown

---- Reboot

root@fsimx8mm:~# su -m adu -c "AducIotAgent --log-level 0"

2021-06-01T09:44:41.8167Z [I] Agent (linux; 0.6.0-public-preview) starting. [main]
2021-06-01T09:44:41.8167Z [I] Agent built with handlers: microsoft/swupdate. [main]
2021-06-01T09:44:41.8278Z [I] Initalizing PnP components. [ADUC_PnP_Components_Create]
2021-06-01T09:44:41.8279Z [I] ADUC agent started. Using IoT Hub Client SDK 1.6.0 [AzureDeviceUpdateCoreInterface_Create]
2021-06-01T09:44:41.8279Z [I] Calling ADUC_Register [ADUC_MethodCall_Register]
2021-06-01T09:44:41.8279Z [I] IoTHub Device Twin callback registered. [ADUC_DeviceClient_Create]
2021-06-01T09:44:41.8384Z [W] Failed to pass connection string to DO, error: -3 [StartupAgent]
2021-06-01T09:44:41.8385Z [I] Agent running. [main]
2021-06-01T09:44:42.2829Z [D] IotHub connection status: 0, reason:6 [ADUC_ConnectionStatus_Callback]
2021-06-01T09:44:42.6856Z [D] ComponentName:azureDeviceUpdateAgent, propertyName:service [ADUC_PnP_ComponentClient_PropertyUpdate_Callback]
2021-06-01T09:44:42.6859Z [D] OrchestratorUpdateCallback received property JSON string ({"action":2,"updateManifest":"{"manifestVersion":"2.0","updateId":{"provider":"FuS","name":"stillTesting","version":"1.1"},"updateType":"microsoft/swupdate:1","installedCriteria":"1","files":{"00000":{"fileName":"rauc_update_nand.artifact","sizeInBytes":120899641,"hashes":{"sha256":"byaS9ru1X2OS5qHugZ7YzLIzqg+G0tEzcmd+o3zP+Ns="}}},"createdDateTime":"2021-05-27T17:23:24+00:00"}","updateManifestSignature":"eyJhbGciOiJSUzI1NiIsInNqd2siOiJleUpoYkdjaU9pSlNVekkxTmlJc0ltdHBaQ0k2SWtGRVZTNHlNREEzTURJdVVpSjkuZXlKcmRIa2lPaUpTVTBFaUxDSnVJam9pY2toV1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EmMjW9z7AcOzvVyHam0wMFeYI3UBFE4EVw6pATsiu7GyJNeKf4Q6IcPkTA9M1FK_JcKDevdjNJxvccifkFb7kMrJs8chXfOd5Fg3ewjTqCxwuPCfmMdSKm_i7gGEErHPNwbvlwfTN_68gv79bZcUomT6nbYHGdfl4pR7Xf"}), property version (87) [OrchestratorUpdateCallback]
2021-06-01T09:44:42.6880Z [I] Perform startup tasks. [ADUC_Workflow_HandleStartupWorkflowData]
2021-06-01T09:44:42.6881Z [I] Calling IsInstalledCallback to check if content is installed. [ADUC_MethodCall_IsInstalled]
2021-06-01T09:44:42.6881Z [I] IsInstalledCallback called [IsInstalledCallback]
2021-06-01T09:44:42.6881Z [I] IsInstalled called workflowId: , installed criteria: 1 [IsInstalled]
2021-06-01T09:44:42.6882Z [I] microsoft_swupdate_CreateFunc called. [microsoft_swupdate_CreateFunc]
2021-06-01T09:44:42.6882Z [I] ---TMP---IsInstalled call reading from File [IsInstalled]
2021-06-01T09:44:42.6882Z [I] ---TMP--- ReadValueFromFile [ReadValueFromFile]
2021-06-01T09:44:42.6960Z [I] Installed criteria 1 was not installed, the current version is 0.0.0.1 [IsInstalled]
2021-06-01T09:44:42.6961Z [I] The installed criteria is not met. The current update was not installed on the device. [ADUC_Workflow_HandleStartupWorkflowData]
2021-06-01T09:44:42.6961Z [I] Setting UpdateState to Idle [ADUC_SetUpdateStateHelper]
2021-06-01T09:44:42.6961Z [I] ---TMP---updateState == ADUCITF_State_Idle [ADUC_SetUpdateStateHelper]
2021-06-01T09:44:43.0486Z [I] Reporting state: 0, Idle (0); HTTP 200; result 1, 0 [AzureDeviceUpdateCoreInterface_ReportStateAndResultAsync]
2021-06-01T09:44:43.0487Z [I] UpdateAction: Idle. WorkflowId: 210601094443 [ADUC_MethodCall_Idle]
2021-06-01T09:44:43.0488Z [I] Calling IdleCallback [ADUC_MethodCall_Idle]
2021-06-01T09:44:43.0488Z [I] Now idle. workflowId: 210601094443 [Idle]
2021-06-01T09:44:43.0489Z [I] OrchestratorPropertyUpdateCallback ended [OrchestratorUpdateCallback]
2021-06-01T09:44:43.0489Z [I] Processing existing Device Twin data after agent started. [ADUC_PnPDeviceTwin_Callback]
2021-06-01T09:44:43.0490Z [D] Notifies components that all callback are subscribed. [ADUC_PnPDeviceTwin_Callback]
2021-06-01T09:44:43.0490Z [I] DeviceInformation component is ready - reporting properties [DeviceInfoInterface_Connected]
2021-06-01T09:44:43.0491Z [I] Property manufacturer changed to FUS [RefreshDeviceInfoInterfaceData]
2021-06-01T09:44:43.0492Z [I] Property model changed to IMX8MM [RefreshDeviceInfoInterfaceData]
2021-06-01T09:44:43.0492Z [I] Property osName changed to Linux [RefreshDeviceInfoInterfaceData]
2021-06-01T09:44:43.0493Z [I] Property swVersion changed to 5.4.70-F-S [RefreshDeviceInfoInterfaceData]
2021-06-01T09:44:43.0493Z [I] Property processorArchitecture changed to aarch64 [RefreshDeviceInfoInterfaceData]
sh: /usr/bin/lscpu: No such file or directory
2021-06-01T09:44:43.0550Z [I] Property totalMemory changed to 1006292 [RefreshDeviceInfoInterfaceData]
2021-06-01T09:44:43.0551Z [I] Property totalStorage changed to 108160 [RefreshDeviceInfoInterfaceData]
2021-06-01T09:44:44.9888Z [D] ComponentName:azureDeviceUpdateAgent, propertyName:service [ADUC_PnP_ComponentClient_PropertyUpdate_Callback]
2021-06-01T09:44:44.9890Z [D] OrchestratorUpdateCallback received property JSON string ({"action":255,"updateManifest":"","updateManifestSignature":""}), property version (88) [OrchestratorUpdateCallback]
2021-06-01T09:44:44.9890Z [I] Cancel received with no operation in progress - returning to Idle state [ADUC_Workflow_HandleUpdateAction]
2021-06-01T09:44:44.9890Z [I] Setting UpdateState to Idle [ADUC_SetUpdateStateHelper]
2021-06-01T09:44:44.9891Z [I] ---TMP---updateState == ADUCITF_State_Idle [ADUC_SetUpdateStateHelper]
2021-06-01T09:44:44.9891Z [I] Reporting state: 0, Idle (0); HTTP 200; result 1, 0 [AzureDeviceUpdateCoreInterface_ReportStateAndResultAsync]
2021-06-01T09:44:44.9892Z [I] UpdateAction: Idle. WorkflowId: 210601094444 [ADUC_MethodCall_Idle]
2021-06-01T09:44:44.9892Z [I] Calling IdleCallback [ADUC_MethodCall_Idle]
2021-06-01T09:44:44.9892Z [I] Now idle. workflowId: 210601094444 [Idle]
2021-06-01T09:44:44.9892Z [I] OrchestratorPropertyUpdateCallback ended [OrchestratorUpdateCallback]

from iot-hub-device-update.

ValOlson avatar ValOlson commented on September 24, 2024

Hi @Voxel07 for the logs. Here is the feedback from our team for options-

  1. Don’t report “intallSucceeded” state until all in the installation task(s) is fully competed.
  2. Make sure to get the device in the state where IsInstalled(…) return ‘true’, so that after reported ‘installSucceeded’ and processing ‘apply’ action, you can report “idle” with appropriate isntalledUpdateId at the end.

Also, are you doing any tasks during ‘apply’ phase? If there’s no tasks to do during ‘apply’, can try to reboot on ‘apply’ instead of at the end of ‘install’ phase?

Reason: Current behavior for the Device Update Agent during start up flow is if the action that we received is “apply”, we evaluate IsInstalled(“”) returned value. If ‘true’, we’ll consider the deployment succeeded and agent should report “idle” state w/ expected InstalledUpdateId.
From your logs, IsInstalled(…) returned false. So, the agent reported ‘idle’ w/o installedUpdateId, which causes our service to cancel. We are considering in the future to change the Agent startup workflow to resume “install” action but till then you can do one of the above recommendations.

from iot-hub-device-update.

Voxel07 avatar Voxel07 commented on September 24, 2024

@ValOlson Thanks for the options.

Yes, there are actions during the Apply phase. The Client side will verify a successful installation during that phase, and sets some environment variables. If the verification succeeds, then I want to set the adu-version file to the new version. And report that back to IoT-Hub.

I already tried, modifying the adu-version file to get the IsInstalled call to return true. I now see that this was a Problem because the installSucceded state was reported.

Question:
Who edits the adu-version file ? swUpdate or Adu-Agent ? I can see that its read by ADU but, I can't find where it's supposed to be updated.

from iot-hub-device-update.

Voxel07 avatar Voxel07 commented on September 24, 2024

@ValOlson I was able to modify the workflow successfully.

The Apply action is being picked up and after a successful Apply I modify the aud-version file myself. A successful update is reported to IoT-Hub and the installedUpdateId is added to my device twin.

The last remaining Problem is, that the service entry with updatemanifest and updateManifestSignature is still present in the devicetwin. Are the supposed to be there, or should this entry be removed like it is when an update fails ?

from iot-hub-device-update.

ValOlson avatar ValOlson commented on September 24, 2024

@Voxel07 we will consider updates in the future to our workflow based on your use case and feedback, but it will not be available in the near future so I am glad to hear you got it working.

The ‘desired’ property left over in the Device twin is by design to reduce additional message usage from your IoT Hub quota. When an update fails, our service will send the ‘cancel’ event and it will remove other data at the same time.

from iot-hub-device-update.

Voxel07 avatar Voxel07 commented on September 24, 2024

@ValOlson thanks for clarifying. If wanted, I can put my changes into a new branch ? Not shure how contribbuting should be done.

So, there is no way to get rid of it from my side ? Maybe by sending a faild update signal to the service after everything else is done ? It would be nice to clean up the device twin after a successful update.

from iot-hub-device-update.

ValOlson avatar ValOlson commented on September 24, 2024

Hi @Voxel07,

Thank you for the offer to contribute, here is the guidance on how to procced.

Today if you send the cancel signal after a successful update the Device Update will ignore it. Later in the calendar year we are planning some work where Device Update will look at this signal but then it will put the overall update into a bad state in the service, APIs and UX.

Can can tell us more about the use case and reason for wanting to clean the device twin after a successful update? Our service team would like to understand if this is something they need to track.

from iot-hub-device-update.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.