open-balena-api icon indicating copy to clipboard operation
open-balena-api copied to clipboard

update strategy and handover timeout not being detect with BALENA_ prefix

Open 20k-ultra opened this issue 4 years ago • 3 comments

There is a legacy device configuration called SUPERVISOR_UPDATE_STRATEGY and SUPERVISOR_HANDOVER_TIMEOUT which are prefixed with RESIN_ or now BALENA_ however it only works with RESIN_. This is because of https://github.com/balena-io/open-balena-api/blob/17f79c6b01bf9d58a8531c471ac0b8de590d0f9d/src/features/device-state/routes/state.ts#L200-L205 specifically looking for variables with RESIN_.

20k-ultra avatar Aug 12 '21 21:08 20k-ultra

I'm just documenting this issue. We don't mind that this exists because this is just for backwards compatibility. If you encounter this issue you must set the update strategy in your services as a label in the docker-compose file: https://www.balena.io/docs/reference/supervisor/docker-compose/#labels.

20k-ultra avatar Aug 12 '21 21:08 20k-ultra

Reopening this issue since there is no resolution either in the documentation or the API.

Although it is true that the way the supervisor understands release strategies is through labels, the we have also discussed having application level release strategies (see https://github.com/balena-os/balena-supervisor/issues/1103) and this method would be compatible with that, so I'm not entirely sure we want to move away from this method.

The simplest short term solution seems to be to update the code linked by @20k-ultra including the BALENA_SUPERVISOR_UPDATE_STRATEGY and BALENA_SUPERVISOR_HANDOVER_TIMEOUT

pipex avatar Nov 12 '21 19:11 pipex

[inspaya] This issue has attached support thread https://jel.ly.fish/b1dd2ce2-1a3f-4809-b9bc-b821fa7b9073

jellyfish-bot avatar Nov 12 '21 19:11 jellyfish-bot