Open consideRatio opened 3 years ago
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
found this issue while looking for a similar solution to KubeSpawner's PreStop hook, actually needing this for the project I am working on right now.
Hi, I have a similar use case:
In our Jupyterhub deployment we have the possibility of assigning users to nodes with GPU, which are a "scarce" resource. For this reason, we would like to have different timeouts depending on which resources the users have booked, e.g. letting sessions expire after 2h since last_activity for nodes with GPUs and 6h for nodes using only CPU.
I was thinking about customizing the should_cull https://github.com/jupyterhub/jupyterhub-idle-culler/blob/main/jupyterhub_idle_culler/__init__.py#L238 with a configurable callable which takes as inputs the user and the server objects and returns a boolean. Does it make any sense? I can work on a PR in case you find it useful
Hi,
We would like to cull servers based on profile. That will be great! For example, delete the server only if it is a minimal notebook profile.
I have the exact case of @rccern. We would like to cull pods for some JHub profiles faster. Is there any workaround for this?
+1 from me as well! Would be great to have this functionality.
Proposed change
Just like the JupyterHub Spawner and JupyterHub Authenticator classes have various hooks that can be used to take various actions, I think it could make sense to expose some hooks to the JupyterHub idle culler.
I don't have a need for this personally, but reflecting on #24 adding
--cull-admin-users
I felt it could be relevant to allow for some custom logic to play a role in the decision to cull a user server or a JupyterHub user identity.Who would use this feature?
Anyone that would want to make culling decisions based on user state, such as belonging to a certain group or similar.
(Optional): Suggest a solution
We add hooks that we can configure using traitlets that are given some information of relevance and where their return value could influence culling decisions. I'm not sure what hooks would make sense.
Action points
Related issues / PRs
4, #8, #9, #25