-
Notifications
You must be signed in to change notification settings - Fork 308
Description
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.