New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure we don't kill a locked user's app if the supervisor crashes and restarts #20

Closed
pcarranzav opened this Issue Nov 30, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@pcarranzav
Copy link
Member

pcarranzav commented Nov 30, 2015

Every time the supervisor starts, it clears all locks by doing unlockAndStart(app).
However, it should check whether the app container is already running and should have some way to identify if the lock belongs to the app (and not to a previously crashed supervisor) - in this case, it should not unlock since it means the app is actually locked and in a critical section.

Front logo Front conversations

@pcarranzav pcarranzav added the bug label Nov 30, 2015

@pcarranzav pcarranzav added type/bug and removed bug labels Jul 1, 2016

@lekkas

This comment has been minimized.

Copy link
Member

lekkas commented Feb 3, 2017

pcarranzav added a commit that referenced this issue Mar 7, 2017

Issue #20: Change the update lock to a temporary filesystem
The lock is now located at `/tmp/resin-supervisor/<appId>/` on the host, and `/tmp/resin/`
on the user container. The old lock location is supported only in Resin OS 1.X (and both locks are
taken in that case).

This fixes the race condition when the app is started before the supervisor, and takes a lock that is
cleared on supervisor startup.

Change-Type: major
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>

@wafflebot wafflebot bot added the flow/in-progress label Mar 7, 2017

pcarranzav added a commit that referenced this issue Mar 7, 2017

Issue #20: Change the update lock to a temporary filesystem
The lock is now located at `/tmp/resin-supervisor/<appId>/` on the host, and `/tmp/resin/`
on the user container. The old lock location is supported only in Resin OS 1.X (and both locks are
taken in that case).

This fixes the race condition when the app is started before the supervisor, and takes a lock that is
cleared on supervisor startup.

Change-Type: major
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>

pcarranzav added a commit that referenced this issue Mar 9, 2017

Issue #20: Change the update lock to a temporary filesystem
The lock is now located at `/tmp/resin-supervisor/<appId>/` on the host, and `/tmp/resin/`
on the user container. The old lock location is supported only in Resin OS 1.X (and both locks are
taken in that case).

This fixes the race condition when the app is started before the supervisor, and takes a lock that is
cleared on supervisor startup.

Change-Type: major
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>

@wafflebot wafflebot bot removed the flow/in-review label Mar 9, 2017

pcarranzav added a commit that referenced this issue Mar 9, 2017

Issue #20: Change the update lock to a temporary filesystem
The lock is now located at `/tmp/resin-supervisor/<appId>/` on the host, and `/tmp/resin/`
on the user container. The old lock location is supported only in Resin OS 1.X (and both locks are
taken in that case).

This fixes the race condition when the app is started before the supervisor, and takes a lock that is
cleared on supervisor startup.

Change-Type: major
Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment