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

Update the cull_idle_servers script #556

Closed
wants to merge 1 commit into from

Conversation

jtpio
Copy link
Contributor

@jtpio jtpio commented Apr 23, 2020

Update the cull_idle_servers.py script to the latest from JupyterHub: https://github.com/jupyterhub/jupyterhub/blob/8d505548494ad629cc9501f084c6ec4d7646cf98/examples/cull-idle/cull_idle_servers.py

This should fix #547.

  • Add / update documentation
  • Add tests

@jtpio
Copy link
Contributor Author

jtpio commented Apr 23, 2020

Tested on a VM after setting the timeout to 60s with sudo tljh-config set services.cull.timeout 60.

After starting a named server:

image

~60 seconds later:

image

@jtpio jtpio marked this pull request as ready for review April 23, 2020 10:23
@jtpio
Copy link
Contributor Author

jtpio commented Apr 23, 2020

Some of the changes are coming from the black formatting in jupyterhub.

Also should we add tests for culling named servers? (in this PR or a separate one)
There seems to be some in https://github.com/jupyterhub/the-littlest-jupyterhub/blob/master/integration-tests/test_hub.py

@jtpio jtpio force-pushed the update-cull-service branch from a2899cd to ac2e22d Compare April 23, 2020 13:11
@GeorgianaElena
Copy link
Member

Also should we add tests for culling named servers? (in this PR or a separate one)
There seems to be some in https://github.com/jupyterhub/the-littlest-jupyterhub/blob/master/integration-tests/test_hub.py

I believe adding a test would be very useful. Although the PR is pretty big already, I think it's better to have them together (code and test) in this PR to make sure it works before merging. What do you think?

Thanks for working on this @jtpio.

@jtpio
Copy link
Contributor Author

jtpio commented Apr 27, 2020

That would be better indeed.

Taking a closer look, it seems that we would need to add support for named servers to hubtraf too: https://github.com/yuvipanda/hubtraf/blob/37de44df5a2110c18bae4fb426566fddf1c1a05c/hubtraf/user.py#L80

@jtpio
Copy link
Contributor Author

jtpio commented Apr 27, 2020

This will actually be replaced by #559.

@yuvipanda
Copy link
Collaborator

@jtpio damn, I did not see this! so sorry :(

@jtpio
Copy link
Contributor Author

jtpio commented Apr 27, 2020

No problem, #559 is much better!

@jtpio
Copy link
Contributor Author

jtpio commented May 5, 2020

Fixed by #559.

@jtpio jtpio closed this May 5, 2020
@jtpio jtpio deleted the update-cull-service branch May 5, 2020 09:10
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 this pull request may close these issues.

Should the idle culler also cull named servers?
3 participants