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

Error handling when swarm gets in an odd state #143

Open
Wildcarde opened this issue Feb 23, 2017 · 1 comment
Open

Error handling when swarm gets in an odd state #143

Wildcarde opened this issue Feb 23, 2017 · 1 comment

Comments

@Wildcarde
Copy link

Wildcarde commented Feb 23, 2017

I've run into 2 nodes in my swarm ending up in a state where the containers running on the node were labelled status 'dead', which based on my configuration in jupyterhub means they should have been removed. However the removal of these containers failed with a 'resource busy' error (similar to this moby/moby#31195).

Under this condition when the user attempts to reconnect, instead of launching a new container under a new name it finds the old one and attempts to relaunch it. Docker will not allow this because the container is flagged for removal. So instead the end user gets a 500 error and can't interact with the hub interface at all.

Would it be possible to add some checks for this so either errors make more sense or better a new container gets launched with an _ instead so the user can continue to work while the backend issue is resolved?

edit: This was resolved for the impacted users on the backend by sshing into the swarm nodes and issuing a 'docker rm -f' for each dead container. After that users could get new containers created again. If we could make the remove portion of dockerspawner do a forced removal that may resolve the issue on it's own.

@minrk
Copy link
Member

minrk commented Mar 1, 2017

Adding some extra error handling would indeed be great. If you have a traceback, we can make the changes in the right place. A PR would be very welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants