Skip to content
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 · Fixed by #395
Closed
Assignees
Labels

Comments

@pcarranzav
Copy link
Contributor

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
Copy link
Contributor

lekkas commented Feb 3, 2017

pcarranzav pushed a commit that referenced this issue Mar 7, 2017
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>
@ghost ghost assigned pcarranzav Mar 7, 2017
@ghost ghost added the flow/in-progress label Mar 7, 2017
pcarranzav pushed a commit that referenced this issue Mar 7, 2017
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 pushed a commit that referenced this issue Mar 9, 2017
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>
@ghost ghost removed the flow/in-review label Mar 9, 2017
pcarranzav pushed a commit that referenced this issue Mar 9, 2017
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
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants