balena-os / balenahup

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

HUP updates to the wrong supervisor version if scheduled version < target version #403

Open pipex opened 3 months ago

pipex commented 3 months ago

In the HUP script

https://github.com/balena-os/balenahup/blob/master/upgrade-2.x.sh#L387-L404

the supervisor target state is only patched if SCHEDULED_VERSION < CURRENT_VERSION but it is not patched if CURRENT_VERSION < SCHEDULED_VERSION < TARGET_VERSION

However this can cause issues as the scheduled version could be incompatible with the target OS

See: https://balena.zendesk.com/agent/tickets/3772