Skip to content
This repository was archived by the owner on Jan 24, 2018. It is now read-only.

shutdown idle containers#10

Merged
rgbkrk merged 3 commits intojupyter:masterfrom
minrk:cull
Sep 20, 2014
Merged

shutdown idle containers#10
rgbkrk merged 3 commits intojupyter:masterfrom
minrk:cull

Conversation

@minrk
Copy link
Copy Markdown
Member

@minrk minrk commented Sep 18, 2014

like it says on the tin.

every hour (configurable), it checks for idle containers and brings them down, removing the proxy route.

Comment thread rando.py Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to change this to 0.0.0.0? I'd rather not have these notebooks be public by default.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I didn't. Without this, I can't run the server under boot2docker. The containers never become accessible.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, maybe we make this configurable, leave the default as 127.0.0.1.

@ellisonbg
Copy link
Copy Markdown

LOL - upon seeing this Olivier said "great, I am glad you implemented it this way, that was I can write some javascipt that keeps it alive..."

Comment thread rando.py Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something we could do in the future here is also dump the logs of the container before we obliterate it.

@minrk minrk changed the title shutdown containers that have been idle for at least five minutes shutdown idle containers Sep 20, 2014
use the proxy's inactive_since REST API
and kill the proxy if the server exits
also changes default cull timeout to 1 hr
@minrk
Copy link
Copy Markdown
Member Author

minrk commented Sep 20, 2014

now configurable, with a default of one hour.

Comment thread rando.py
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, you're tracking which paths map to which containers!

Maybe I should just close #13 then and make use of the container IDs elsewhere.

@rgbkrk
Copy link
Copy Markdown
Member

rgbkrk commented Sep 20, 2014

This PR closes all containers created by this process. Upon a hot reload of tornado (change of the python script), does it keep the old values?

If we restart the process through other means, I take it we'll have to do maintenance to clean out old containers.

rgbkrk added a commit that referenced this pull request Sep 20, 2014
shutdown idle containers
@rgbkrk rgbkrk merged commit db53b0d into jupyter:master Sep 20, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants