Skip to content

Single-user notebooks are not shut down properly with jupyterhub-singleuser. #50

@slavoutich

Description

@slavoutich

(Further is valid for SlurmSpawner, probably also for other spawners)

Expected behaviour: Usual Jupyter notebook and LocalProcessSpawner are sending the notebooks kernels interrupt signal, after which shutdown_kernel method is called. Kernels have time to collect some resources, save notebooks, etc.

Actual behaviour: kernels are just immediately killed (scancel just brutally terminate the job, for example).

Why this is important (for me): I have written a KernelManager, which launches Jupyter kernels as SLURM jobs in a configurable manner. It seems to work nicely in a standalone notebook and with LocalProcessSpawner, but when it is used with BatchSpawner, notebook jobs are staying in queue after the jupyterhub-singleuser termination, because shutdown_kernel is not called.

Additional notes. I have made an attempt to fix this in this branch, but this seems not to work out. The complication is that I do not have normal testing setup for SLURM+JupyterHub (I am not a root on a cluster and somehow fail to get SLURM working for now locally).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions