Hello,
I’m working on the offline updates with Verdin imx8mp board and customized Torizon OS based on 6.4 image.
I stopped aktualizr-torizon service as I want to control when to run updates. I provisioned the OS via tcbuild.yaml file and provided /etc/sota/conf.d/99-offline-updates.toml file with this contents:
[uptane]
enable_offline_updates = true
enable_online_updates = false
offline_updates_source = "/tmp/update" # update directory contains images and metadata folders
force_install_completion = true
What is happening when I run updates:
- I verify the updates via small python code on top of the aktualizr-torizon call to ensure the update is available with provided files and set the lock so Aktualizr doesn’t proceed with the updates.
- I run aktualizr-torizon again without the lock so it proceeds with primary and secondary updates. From the logs I see it goes well until the moment where I see this string
2024-07-12 13:43:22,996 - subprocess_logger - INFO - STDOUT: Event: InstallStarted
2024-07-12 13:43:23,083 - subprocess_logger - INFO - STDOUT: Installing package using ostree package manager
2024-07-12 13:43:27,716 - subprocess_logger - INFO - STDOUT: Commit metadata kargs=quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3
2024-07-12 13:43:35,229 - subprocess_logger - INFO - STDOUT: Freed objects: 642.8?kB
2024-07-12 13:43:35,268 - subprocess_logger - INFO - STDOUT: Performing sync()
2024-07-12 13:43:35,309 - subprocess_logger - INFO - STDOUT: Event: InstallTargetComplete, Result - Success
2024-07-12 13:43:35,309 - subprocess_logger - INFO - STDOUT: Updating containers via docker-compose
2024-07-12 13:43:35,320 - subprocess_logger - INFO - STDOUT: OSTree update pending. This is a synchronous update transaction.
2024-07-12 13:43:38,987 - subprocess_logger - INFO - STDOUT: Event: InstallTargetComplete, Result - Error
2024-07-12 13:43:39,023 - subprocess_logger - INFO - STDOUT: Event: AllInstallsComplete, Result - INTERNAL_ERROR
2024-07-12 13:43:39,024 - subprocess_logger - INFO - STDOUT: Update install completed. Releasing the update lock...
2024-07-12 13:43:39,026 - subprocess_logger - INFO - STDOUT: Exiting aktualizr so that pending updates can be applied after reboot
I expected the system reboot to happen because we have OS changes pending and it seems that the Aktualizr should trigger it as I defined the force reboot flag according to the docs aktualizr/docs/ota-client-guide/modules/ROOT/pages/aktualizr-config-options.adoc at master · advancedtelematic/aktualizr · GitHub and which was mentioned in some of the posts here.
If I do the reboot, it goes well, but no docker container is up and running until I run the aktualizr update process again, which completes the update process. At this point I see docker images
listing having current and previous versions of docker images.
To me it seems that if I don’t run any specific command on startup, it won’t finish pending update and start docker containers by itself, because the aktualizr-torizon service is intentionally disabled, do I understand the situation correctly?
Also, will the touch /run/need-reboot
command work if I run it manually so that ostree-pending-reboot.path service will trigger the reboot?
And one more question is - may I consider that the update process was completed successfully even if I see these lines in the log?
Event: InstallTargetComplete, Result - Error
Event: AllInstallsComplete, Result - INTERNAL_ERROR
Thank you!