zero-to-jupyterhub-k8s icon indicating copy to clipboard operation
zero-to-jupyterhub-k8s copied to clipboard

Mounted files using `singleuser.extraFiles` partially remain after re-naming

Open M4C4R opened this issue 2 years ago • 0 comments
trafficstars

Bug description

When I mount a file using singleuser.extraFiles onto the user's home directory, then decide to rename the file using mountPath. The old file remains when the user restarts their server, albeit it is empty.

How to reproduce

  1. Download the latest release from https://hub.jupyter.org/helm-chart/ (3.0.3 for me), extract it, and change directory to it
  2. Deploy the helm chart:
helm upgrade --install jupyterhub . \
--set singleuser.extraFiles.test.mountPath="/home/jovyan/test" \
--set singleuser.extraFiles.test.stringData="abc"
  1. Launch a user's server using the UI and notice the file test exists
  2. Re-name the file and deploy again:
helm upgrade --install jupyterhub . \
--set singleuser.extraFiles.test.mountPath="/home/jovyan/test2" \
--set singleuser.extraFiles.test.stringData="abc"
  1. Restart the user's server and notice that there are now two files, one being the original, which is now empty.

Expected behaviour

I expected the original file to disappear as it is no longer being mounted.

Actual behaviour

The (now empty) file remains after being re-named.

Your personal set up

Distribution: zero-to-jupyterhub

I've observed this issue on a local Minikube cluster, as well as GKE on GCP.

M4C4R avatar Sep 13 '23 08:09 M4C4R