Skip to content

Add implementation for delete_forever #512

@richardbrinkman

Description

@richardbrinkman

Currently DockerSpawner does not implement the delete_forever function and since the implementation of it in the parent Spawner class is empty, nothing special happens when a user is deleted. If users have persistent storage such as user volumes or bind mounts, it will never be deleted.

Proposed change

Add a configurable option to turn on of off automatic deletion of persistent storage, for example: c.DockerSpawner.delete_persistent_storage_on_user_deletion = True.

Implement the DockerSpawner.delete_forever function that checks whether the volume of bind mount should be deleted.

Alternative options

Always delete persistent storage on user deletion, but that will be an backwards incompatible change.

Who would use this feature?

Admins that delete users. With the proposed feature they don't have to ssh into their Hub and perform a docker volume rm jupyter-hub-<username> any more.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions