Open droctothorpe opened 2 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:
The idle culler is agnostic to the underlying spawner. Assuming you're right about the cause it sounds like the fix needs to be in KubeIngressProxy not this repo. Is that your understanding? If so I'll transfer the issue to KubeSpawner.
Thanks for getting back to me, @manics!
KIP just creates the ingress resources. The nginx ingress controller is what's actually responsible for managing the proxy, and it's completely oblivious to the concept of last_activity
, since that's a very JH / configurable-http-proxy convention.
I guess what I'm wondering if it makes sense to either modify jupyterhub-idle-culler or create a discrete culler that's more generic / isn't contingent on the use of configurable-http-proxy.
Some approaches that come to mind:
Totally understand if this is out of scope. We're pretty unique in our adoption of KIP I suspect.
Hm, alternatively, why not hit the /api/status endpoints of the notebooks? I think that's what KF does: https://github.com/kubeflow/kubeflow/blob/master/components/notebook-controller/pkg/culler/culler.go.
There are some past discussions on supporting plugins or configurable hooks:
No progress yet, but maybe your use-case could be a driver?
If you haven't already seen https://discourse.jupyter.org/t/which-is-the-correct-way-to-cull-idle-kernels-and-notebook/8123/7 it explains some of the complexity of idle detection?
Did you see https://discourse.jupyter.org/t/jupyterhub-amalthea/12208 (posted today)? Might be worth seeing how they implemented idle culling.
Proposed change
We use JupyterHub + KubeIngressProxy + the nginx ingress controller. Based on the docs, I suspect that the
last_activity
is never updated, so notebooks are culled even when they're active.Are there any plans to integrate these two capabilities? If not, would you be open to a PR to that effect (assuming it's possible)?
Thanks!