Open ZubairLK opened 4 years ago
@ZubairLK I believe this needs to be implemented with adding --restart=always
to balena run
command in the start supervisor script.
https://github.com/balena-os/meta-balena/blob/v2.41.0/meta-balena-common/recipes-containers/resin-supervisor/resin-supervisor/start-resin-supervisor#L75
btw, probably it's a good moment to rename balena to balena-engine there
Ah. for some reason, I thought this should live in the Dockerfile. I'll check it out. Thanks @roman-mazur
Yeah, it's not a part of Dockerfile. The engine behavior is that it will restart unhealthy container when restart policy is set to always or on-failure.
the meta-balena issue was closed including the appropriate flag to the supervisor container start, should this issue be closed?
Currently the Dockerfile has the HEALTHCHECK command but does not ask the engine to attempt to restart the supervisor container if unhealthy.
We are moving this check from the OS into the balenaEngine.
So update to make balenaEngine restart the container if the supervisor is unhealthy.