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

Proxy entries not cleaned up when single user servers are stopped #775

Closed
yuvipanda opened this issue Sep 24, 2016 · 1 comment · Fixed by #776
Closed

Proxy entries not cleaned up when single user servers are stopped #775

yuvipanda opened this issue Sep 24, 2016 · 1 comment · Fixed by #776
Milestone

Comments

@yuvipanda
Copy link
Contributor

yuvipanda commented Sep 24, 2016

I'm running the proxy and the hub separately in installs (this allows me to restart them independently). This leads to some issues when the hub is restarted but the proxy isn't.

  1. Hub calls user.stop() on all currently running users
  2. This stops all the running singleuser services, but doesn't actually remove entries from the proxy!
  3. Hub comes back, correctly determins there are no singleuser servers running. But the Proxy still thinks they are, and so this state is mismatched
  4. Next time when you try to spawn something, the proxy proxies it back to where the singleuser server used to run, and fails with a 5xx error.
  5. Restarting the proxy clears the proxy route table, bringing it back in sync with what the hub sees. This 'fixes' the issue

This doesn't manifest itself in the traditional configuration of the hub managing the proxy, since the proxy does usually get restarted with the hub. It also doesn't manifest when c.JupyterHub.cleanup_servers = False, since single user servers aren't stopped when the hub restarts. So it only manifests when you are running the proxy and hub separately with cleanup_servers = True

I think the real fix is to also cleanup the routes in the proxy when cleaning up single user servers on restart.

@minrk
Copy link
Member

minrk commented Sep 25, 2016

Agreed. It checks that all the routes for running containers are present, and fills them in if not, but it doesn't do the opposite - finding routes for not running users, and removing those.

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

Successfully merging a pull request may close this issue.

2 participants