how to revert balena supervisor upgrade


I ran an upgrade for supervisor but has been stuck on legacy one i guess. how can I revert this? there is no revert option on dashboard. core container couldnt also find dbus env variable I had to provide it like this:

image

core-next logs:

core-next DEBUG takeover: configuring legacy supervisor container=balena_supervisor
core-next DEBUG takeover: legacy supervisor already configured
core-next INFO takeover: close time.busy=8.49ms time.idle=648ms
core-next DEBUG bound to local address /tmp/run/helios.sock
core-next INFO api: ready
core-next INFO poll: starting
core-next INFO report: waiting for state changes
core-next INFO seek: waiting for target
core-next ERROR poll: invalid target release (eb6b4e8) for app b1d4a18ff67a40fc972b6234236a9417: hostapp should have a service with io.balena.image.class=hostapp label
core-next INFO seek:trigger_update: calling legacy Supervisor
core-next INFO seek:trigger_update: close time.busy=11.3ms time.idle=70.9µs
core-next ERROR seek:trigger_update: error=Target connection failed: error sending request for url (``http://10.114.104.1:48480/v1/update``)
core-next INFO seek: close time.busy=27.8ms time.idle=92.7ms
core-next INFO api: close time.busy=613µs time.idle=141ms
core-next INFO poll: close time.busy=14.5ms time.idle=128ms
core-next ERROR seek: error=failed to update state on legacy Supervisor: Target connection failed: error sending request for url (``http://10.114.104.1:48480/v1/update``)
core-next INFO report: close time.busy=12.4ms time.idle=121ms

b598760cf696 3816ddbc48ab "/usr/src/app/entry.…" 15 hours ago Restarting (1) Less than a second ago core_17214212_4370369_844251333a4511b75daedf70ccb981f7
468b677c2978 fdda9c102bde "/opt/helios/start.sh" 16 hours ago Restarting (1) 44 seconds ago core-next_17214213_4370369_844251333a4511b75daedf70ccb981f7

Core logs:
ln: /var/lib/docker: File exists
INFO: Found device /dev/mmcblk0p24 on current boot device mmcblk0, using as mount for '(resin|balena)-boot'.
INFO: Found device /dev/mmcblk0p27 on current boot device mmcblk0, using as mount for '(resin|balena)-state'.
INFO: Found device /dev/mmcblk0p28 on current boot device mmcblk0, using as mount for '(resin|balena)-data'.
ln: /var/lib/docker: File exists
INFO: Found device /dev/mmcblk0p24 on current boot device mmcblk0, using as mount for '(resin|balena)-boot'.
INFO: Found device /dev/mmcblk0p27 on current boot device mmcblk0, using as mount for '(resin|balena)-state'.
INFO: Found device /dev/mmcblk0p28 on current boot device mmcblk0, using as mount for '(resin|balena)-data'.
ln: /var/lib/docker: File exists
INFO: Found device /dev/mmcblk0p24 on current boot device mmcblk0, using as mount for '(resin|balena)-boot'.
INFO: Found device /dev/mmcblk0p27 on current boot device mmcblk0, using as mount for '(resin|balena)-state'.
INFO: Found device /dev/mmcblk0p28 on current boot device mmcblk0, using as mount for '(resin|balena)-data'.
ln: /var/lib/docker: File exists
INFO: Found device /dev/mmcblk0p24 on current boot device mmcblk0, using as mount for '(resin|balena)-boot'.
INFO: Found device /dev/mmcblk0p27 on current boot device mmcblk0, using as mount for '(resin|balena)-state'.
INFO: Found device /dev/mmcblk0p28 on current boot device mmcblk0, using as mount for '(resin|balena)-data'.
ln: /var/lib/docker: File exists
INFO: Found device /dev/mmcblk0p24 on current boot device mmcblk0, using as mount for '(resin|balena)-boot'.
INFO: Found device /dev/mmcblk0p27 on current boot device mmcblk0, using as mount for '(resin|balena)-state'.
INFO: Found device /dev/mmcblk0p28 on current boot device mmcblk0, using as mount for '(resin|balena)-data'.
ln: /var/lib/docker: File exists
INFO: Found device /dev/mmcblk0p24 on current boot device mmcblk0, using as mount for '(resin|balena)-boot'.
INFO: Found device /dev/mmcblk0p27 on current boot device mmcblk0, using as mount for '(resin|balena)-state'.
INFO: Found device /dev/mmcblk0p28 on current boot device mmcblk0, using as mount for '(resin|balena)-data'.
ln: /var/lib/docker: File exists
INFO: Found device /dev/mmcblk0p24 on current boot device mmcblk0, using as mount for '(resin|balena)-boot'.
INFO: Found device /dev/mmcblk0p27 on current boot device mmcblk0, using as mount for '(resin|balena)-state'.
INFO: Found device /dev/mmcblk0p28 on current boot device mmcblk0, using as mount for '(resin|balena)-data'.
ln: /var/lib/docker: File exists
INFO: Found device /dev/mmcblk0p24 on current boot device mmcblk0, using as mount for '(resin|balena)-boot'.
INFO: Found device /dev/mmcblk0p27 on current boot device mmcblk0, using as mount for '(resin|balena)-state'.
INFO: Found device /dev/mmcblk0p28 on current boot device mmcblk0, using as mount for '(resin|balena)-data'.
ln: /var/lib/docker: File exists

resolved by selecting supervisor version → 19.3.2 . didn’t notice there was another update xd

Thank you for reporting this @berkayg.

For future people coming into this ticket, this sort of issue relates to the split update process for the supervisor.

When triggering the Update supervisor button, two things happen.

  • The device is pinned to the target supervisor release on the cloud
  • A call to update-balena-supervisor script on the host is triggered via the cloudlink connection.

The core-next service is updated by the supervisor from the target state, but the (legacy) supervisor itself its updated by the script.

Sometimes when going to v19 from v18 or below, the call to update-balena-supervisor may fail to run for some reason. This means the supervisor will be stuck in the old version, while the new services will run but in a misconfigured state.

The solution usually is to call update-balena-supervisor and restart the supervisor via systemctl.

This is a side effect of the supervisor migration process. Eventually, the supervisor update will be performed by the supervisor itself, avoiding this issue.