Balena Update Lock

Hi,

I am currently implementing the balena update locking mechanism for my devices on Balena. I noticed that when the update lock is there, the supervisor does not allow you to restart the container or reboot the device, the only way is to force the device to reboot. My question is whether I am able to restart the container for the device while the update lock is there without applying a pending update?

Thanks,
Ross

Hi,

You can pin the device to the current release (https://www.balena.io/docs/learn/deploy/release-strategy/release-policy/#pin-device-to-a-release). After pinning, the lock can be overriden and the supervisor will allow restarting the container without updating the OS.

Hi @Ereski,

I just tried adding the updates.lock file and then deploying an image to the application my device is in, then I pinned the device to the current release its in and tried to restart the container and reboot the device, neither of these worked and the dashboard was complaining about the update.lock file.

Thanks,
Ross

Hi Ross,

You’re correct about the UI honouring the update.lock file. I think what @ereski was suggesting was removing the lock file and using release pinning to stop devices from updating.

Regardless, when the lock is present you can select to override the lock in the device dropdown or you can force it to reboot in the device’s actions menu.

Thanks,
James.

Hi @jimsynz,

I know I can override the lock and force it to reboot, however, my question is whether it’s possible to restart the container without applying updates. So if I was to remove the lockfile and pin the release to the current one, I would be able to restart the container?

Thanks,
Ross

Hi Ross. That sounds right to me; if you enable release pinning then the application containers won’t get updated, and then if you remove the lock you’ll be free to restart the containers.