I would like to understand how the balena update mechanism is working in detail.
What is the trigger for a device, to pull the update from the balena cloud (some devices are updating immediately, others only after some time)
What is the detailed procedure/order of update of serveral services on a device? Is it done in a strict order, parallel? I’ve noticed that in some fleets first it updates last 3 services from docker-compose file, then all the others.
Are you looking for the OS update mechanism or fleet update? Based on your second question, we do have some documentation on adjusting update strategy based on your requirements. See: Fleet update strategy - Balena Documentation
Let us know if the above helps and I would also love to get some details on your use case.
Thanks for clarifying. Glad the link helps. For order of service update; this should be heavily derived from compose which uses the following to determine the order: depends_on, links, volumes_from, and network_mode: "service:...".
A quick update about my initial request. My request is more about how balena acts in default way.
I’m more concerned about single device update in fleet. Let’s say my fleet has 50 devices, pinned to latest release.
If I create new release for a fleet: some devices will start updating sooner then others. What are conditions or trigger to start update process?
Another case: each device runs several services. Some services might be running a script while process to kill is activated. All devices are under [download-then-kill] update strategy but some services are updated before the others, what is default balena service update sequence?
This thread / discussion was finalized elsewhere, but I wanted to close the loop about the final answer.
In the case where a critical service is running and shouldn’t be halted in order to complete an update, we provide a method to schedule or fully lock services from being killed by the Supervisor: