balena-os / balenahup

BALENA Host os UPdater
https://balena.io/
36 stars 11 forks source link

upgrade-2.x: do not fail update if there is a scheduled SV update #387

Closed alexgg closed 1 year ago

alexgg commented 1 year ago

Currently, HUP fails if there is a scheduled supervisor update pending in the cloud to avoid concurrent updates.

This has caused a race condition as follows:

This change modifies the supervisor update logic to take into account the provided target version, and the current and scheduled target state version and acts accordingly.

Change-type: patch

alexgg commented 1 year ago

Manual tests: