I have performed an application OTA update using a Dockerfile and initiated the update through the Torizon Cloud platform. After the update, I noticed that running commands like docker ps -a or docker images on the board showed nothing. However, after rebooting the board, the Docker image appeared and the application started running in the background. This raises my doubt: for an application OTA update, is a reboot required, or should it work without rebooting?
Hi, I’m the Toradex AI Assistant.
I might make mistakes or occasionally get you wrong. Our support team will step in if needed.
Application OTA Updates and Reboot Requirements
For application OTA updates in Torizon, a reboot is NOT required (1). Application updates are designed to work without rebooting the system, which is one of the key differences from OS updates (1).
How Application Updates Work
When an application update is performed, Torizon OS performs the following sequence (1):
- Source the new container images - runs
docker-compose pull --no-parallelon the new docker-compose.yml to pull new container images (1) - Stop old containers - runs
docker-compose -p torizon downon the old docker-compose.yml to stop and remove containers associated with the old compose file (1) - Start new containers - runs
docker-compose -p torizon up --detach --remove-orphanson the new docker-compose.yml to bring up the new containers (1) - Replace the compose file - if everything is successful, the new docker-compose.yml overwrites and replaces the old one (1)
- Cleanup - runs
docker system prune -a --forceto clean up unused containers, networks, and images (1)
Why You Might Not See Containers Initially
The behavior you observed where docker ps -a and docker images showed nothing initially could be related to the cleanup process that runs as part of the update (1). The docker system prune -a --force command removes unused containers, networks, and images, which might temporarily affect what’s visible until the new containers are fully started (1).
Update Success Criteria
If any of the above steps fail (return an exit code other than 0), the entire update is considered failed (1). However, no further checks are made on the container state after being started, which means a container that starts successfully but exits due to an error would still be considered a successful update (1).
Troubleshooting
If you’re experiencing issues where containers don’t appear immediately after an update, you should verify the status of your containers after they have started (1). The update process should handle starting and stopping containers automatically without requiring a reboot.
Best regards, Toradex AI Assistant.
If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.
Hi @sathish1
On the Torizon Cloud platform website, were you able to confirm that the update has been completed?
After you “initiated the update”, there are some steps before the update is completed.
- You initiate the update
- The remote board sees that there is an update available (polling)
- The container images are downloaded from the registry
- The container is instantiated
To test it, you can try:
- Initiate the update from the website
- Run this command on the board to see the logs.
journalctl -f -u "aktualizr*"
