That’s an interesting idea. Thanks for the suggestion. I’ll create a feature request on your behalf in our internal system.
Until we build such a feature, could you embed such logic into your deployment code?
So you could use balena API / SDK to check after you make a deployment, when the application is on a new version, you trigger a reboot command right after (via API / SDK as well).
@gelbal thank you for your response. We are using Python SDK inside containers to restart them. How can we monitor that from the container itself? does supervisor provide any information to create the trigger?
Hi Farzad,
I wonder if https://www.balena.io/docs/reference/supervisor/supervisor-api/#get-v2applicationsstate will do the job for you. I am thinking in the ways of comparing the release ID to a saved value. If the saved value is different from the retrieved value - save the new value and reboot.
Of course you would have to be very careful to not run into a boot loop …