Thanks! That explains a lot
I have a question about the way we are using the lock.
We have many devices in one application, and we want to be able to have full control about when we update them. So we want to update them one by one, make sure everything goes alright, go on to the next, etc.
So what we (want to) do: all the devices have the resin-updates.lock by default. We set it up in the Dockerfile with a command like this:
CMD touch /data/resin-updates.lock;*
Then we run a (python) script which uses the Resin API to iterate over an application’s devices and prompts the user to update each device. For that, it calls supervisor.update forcing a lock override to update each device… And we do this one device at a time.
This is actually based on a recommendation from @petrosagg if I remember well, but maybe things have changed in the Resin architecture for Resin 2, and this is not the right way to go any more.
So is this a good way of solving this, or should we be doing something else? Is it ok to have the lock permanently except if we want to update? What is the Resin-recommended way of updating devices one by one?
- Actually from what I read from a previous message in this post, I learned we have to acquire the lock in another way. But is it possible to do it from the Dockerfile?
(I can post this a separate thread if that’s better )