An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
The behavior you're experiencing with Azure IoT Edge, where only the edgeAgent starts after an offline reboot, is likely due to the absence of a battery-backed RTC (Real-Time Clock) on your device. When the device is powered on without an RTC, the system time resets to 1970, which can lead to issues with the edgeAgent reading the backup configuration from /tmp/edgeAgent/edgeAgent/backup.json. This file does not persist across reboots, causing the edgeAgent to report an empty config and fail to start other modules.
The expected behavior is that previously running modules should start from cached deployment and images, but without the correct time, the edgeAgent cannot obtain the module identities from the IoT Hub, leading to the issues you're seeing.
To improve reliability in starting modules offline after a reboot, consider the following:
- RTC Implementation: If possible, implement a battery-backed RTC to maintain the system time across reboots. This would help the
edgeAgentcorrectly read the backup configuration. - Local Configuration: Ensure that your device can handle local configurations effectively, allowing it to start modules based on cached deployment information even when offline.
- Deployment Strategy: Review your deployment strategy to ensure that it accounts for scenarios where devices may reboot without network connectivity.
Currently, there may not be a supported way to make IoT Edge reliably start modules offline after a reboot without addressing the RTC issue or ensuring the configuration persists across reboots.
References: