everware / jupyterhub

Multi-user server for Jupyter notebooks
Other
1 stars 3 forks source link

Stop containers on shutdown #4

Closed betatim closed 8 years ago

betatim commented 8 years ago

Need to keep track of all containers we start so we can shut them down properly when stopping the hub.

betatim commented 8 years ago

Having though about this a bit I think we should remove the container (not the image) when a user logs out. It means there is no state. If I login with a user name/repo combo, I always get the same thing. No matter whether I previously logged in with this combo or not.

Pros:

Cons:

OmeGak commented 8 years ago

If we added OAuth we could make Everware to save your modifications on GitHub. If the user has write rights on the repo, we would simply create a new commit and push it. Otherwise, we fork the repo for the user and commit there.

ibab commented 8 years ago

I think one problem with shutdown on logout is that we would have to keep a lot of containers running all the time. (One for every user that hasn't logged out) So maybe there should still be an inactivity period (of let's say a few hours) after which the container is stopped.

betatim commented 8 years ago

Good point. In tmpnb there is a inactivity culler, if it isn't already in jupyterhub we should add that.

Removing a container on logout makes the problem a little less worse. Right now we are accumulating containers like crazy :)

Auto pushing is an interesting idea, though it makes me a little nervous (pushing to master :danger: ) We could create a new branch though (with some clever naming scheme?) and push to that on github. Maybe add it as an option/button that is shown on logout?

On Sun, Aug 2, 2015 at 11:01 AM Igor Babuschkin notifications@github.com wrote:

I think one problem with shutdown on logout is that we would have to keep a lot of containers running all the time. (One for every user that hasn't logged out) So maybe there should still be an inactivity period (of let's say a few hours) after which the container is stopped.

— Reply to this email directly or view it on GitHub https://github.com/everware/jupyterhub/issues/4#issuecomment-127000334.

betatim commented 8 years ago

This is also done I think. If participants disagree, reopen it in everware/everware