Comments (10)
@Voxel07 Can you tell us which version of the agent you are using?
from iot-hub-device-update.
@ValOlson I'm using version 0.7.0
from iot-hub-device-update.
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.
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":"eyJhbGciOiJSUzI1NiIsInNqd2siOiJleUpoYkdjaU9pSlNVekkxTmlJc0ltdHBaQ0k2SWtGRVZTNHlNREEzTURJdVVpSjkuZXlKcmRIa2lPaUpTVTBFaUxDSnVJam9pY2toV1FrVkdTMUl4ZG5Ob1p5dEJhRWxuTDFORVVVOHplRFJyYWpORFZWUTNaa2R1U21oQmJYVkVhSFpJWm1velowaDZhVEJVTWtsQmNVTXhlREpDUTFka1QyODFkamgwZFcxeFVtb3ZibGx3WnprM2FtcFFRMHQxWTJSUE5tMHpOMlJqVDIxaE5EWm9OMDh3YTBod2Qwd3pibFZJUjBWeVNqVkVRUzloY0ZsdWQwVmxjMlY0VkdwVU9GTndMeXRpVkhGWFJXMTZaMFF6TjNCbVpFdGhjV3AwU0V4SFZtbFpkMVpJVUhwMFFtRmlkM2RxYUVGMmVubFNXUzk1T1U5bWJYcEVabGh0Y2xreGNtOHZLekpvUlhGRmVXdDFhb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15YXB0cGJGcEhlRmtVTC1GNXl0bF9VQkZLcHdOOUNMNHdwNnlaLWpkWE5hZ3JtVV9xTDFDeVh3MW9tTkNnVG1KRjNHZDNseXFLSEhEZXJEcy1NUnBtS2p3U3dwWkNRSkdEUmNSb3ZXeUwxMnZqdzNMQkpNaG1VeHNFZEJhWlA1d0dkc2ZEOGxkS1lGVkZFY1owb3JNTnJVa1NNQWw2cEl4dGVmRVhpeTVscW1pUHpxX0xKMWVSSXJxWTBfIn0.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":"eyJhbGciOiJSUzI1NiIsInNqd2siOiJleUpoYkdjaU9pSlNVekkxTmlJc0ltdHBaQ0k2SWtGRVZTNHlNREEzTURJdVVpSjkuZXlKcmRIa2lPaUpTVTBFaUxDSnVJam9pY2toV1FrVkdTMUl4ZG5Ob1p5dEJhRWxuTDFORVVVOHplRFJyYWpORFZWUTNaa2R1U21oQmJYVkVhSFpJWm1velowaDZhVEJVTWtsQmNVTXhlREpDUTFka1QyODFkamgwZFcxeFVtb3ZibGx3WnprM2FtcFFRMHQxWTJSUE5tMHpOMlJqVDIxaE5EWm9OMDh3YTBod2Qwd3pibFZJUjBWeVNqVkVRUzloY0ZsdWQwVmxjMlY0VkdwVU9GTndMeXRpVkhGW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3JyaHhTUENUQnpXTUV4WnJMWXp1ZEVvZnlZSGlWVlJoU0pwajBPUTE4ZWN1NERQWFYxVGN0MXkzazdMTGlvN244aXpLdXEybTNUeEY5dlBkcWI5TlA2U2M5LW15YXB0cGJGcEhlRmtVTC1GNXl0bF9VQkZLcHdOOUNMNHdwNnlaLWpkWE5hZ3JtVV9xTDFDeVh3MW9tTkNnVG1KRjNHZDNseXFLSEhEZXJEcy1NUnBtS2p3U3dwWkNRSkdEUmNSb3ZXeUwxMnZqdzNMQkpNaG1VeHNFZEJhWlA1d0dkc2ZEOGxkS1lGVkZFY1owb3JNTnJVa1NNQWw2cEl4dGVmRVhpeTVscW1pUHpxX0xKMWVSSXJxWTBfIn0.eyJzaGEyNTYiOiJwWTdiYnR2ZVFqRzhHdFNPTForcDlUaFpVajRQVVo4Zi9WMGdtdzZ4U2JVPSJ9.WVNAn8GGOVdIknVAEwaX4iZ4b4SiqPX9dGdunXt-o0lhEuvyDObq8BuuyALmxaLeRcfwwOJj4PNb-WZ2RH-s9jUiUQsnPS43R9FhP1EL4NUv0CwUBmtw9GLC4oUxMmEkTZkgjmfqVD2RPwK_qUDBE42ZILJyfnFHwJ8z7dJp1BznYA2nBtsmms-ZVRlqx3YMrSKQVsgF_tNqfG2uTHkSWiTpV3906Nqzy3eLlsW5ac0WamgjfgRe-9yfWw4kJB-SZwCmXiJaFdrSRjg8RTjyv80A38KAE4FsxCTjYZbhz6acwLPEsi51rbCM9b-j1kM8CS0ip5wlTEmepa_oth3nnygRGlEmMjW9z7AcOzvVyHam0wMFeYI3UBFE4EVw6pATsiu7GyJNeKf4Q6IcPkTA9M1FK_JcKDevdjNJxvccifkFb7kMrJs8chXfOd5Fg3ewjTqCxwuPCfmMdSKm_i7gGEErHPNwbvlwfTN_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":"eyJhbGciOiJSUzI1NiIsInNqd2siOiJleUpoYkdjaU9pSlNVekkxTmlJc0ltdHBaQ0k2SWtGRVZTNHlNREEzTURJdVVpSjkuZXlKcmRIa2lPaUpTVTBFaUxDSnVJam9pY2toV1FrVkdTMUl4ZG5Ob1p5dEJhRWxuTDFORVVVOHplRFJyYWpORFZWUTNaa2R1U21oQmJYVkVhSFpJWm1velowaDZhVEJVTWtsQmNVTXhlREpDUTFka1QyODFkamgwZFcx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gGEErHPNwbvlwfTN_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.
Hi @Voxel07 for the logs. Here is the feedback from our team for options-
- Don’t report “intallSucceeded” state until all in the installation task(s) is fully competed.
- 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.
@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.
@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.
@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.
@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.
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.
- @vimeht for tracking.
from iot-hub-device-update.
Related Issues (20)
- Cannot Install device update agent 1.0.3 beta version for Debian11 Arm64 on Debian 11.8 running on Raspberry Pi 4 HOT 1
- Configuration file deviceupdate-agent.service is marked executable HOT 7
- Yocto Rpi3 Device is restarting again and again in a loop HOT 2
- Failed parse of JSON file in Rpi4 device HOT 6
- /usr/bin/adu-swupdate.sh never runs (swupdate:2 never used even when registered?) HOT 7
- The packages deployed through device update are not reflecting in the device hosted on ubuntu 22.04 HOT 2
- Ignore duplicate deployment workflow not working as expected HOT 5
- Device reporting new Contract Name & ContractId after device update and stays inProgress in ADU HOT 9
- A/B Update Erases ADU Configuration on Yocto Kirkstone Raspberry Pi 4 - 64 bit Example HOT 2
- A/B Update Fails on Yocto Kirkstone Raspberry Pi 4 - 64 bit Example do to invalid update image HOT 2
- Device update agent on bullseye 11 raspberry zero HOT 5
- pthread_mutex_unlock doesn't check whether arguments is NULL for windows, this may cause dos HOT 3
- DeviceManagementClient.GetDeviceModuleAsync does not return the ExtendedResultCode HOT 3
- Update status changes to "In Progress" sometime after "Succeeded". HOT 16
- AducIotAgent cannot find custom step handler HOT 7
- ADUC_Result_Install_RequiredReboot stills reboots immediately after HOT 4
- Seeking Documentation on Retry Behavior HOT 1
- Is_Installed Step runs multiple times in swupdatev2 handler HOT 3
- Registering extensions fails on arm32 due to bug in STRING_construct_sprintf() invocation
- Unable to use additional compatibility information HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iot-hub-device-update.