Closed mgotham900 closed 5 years ago
Have you mounted a persistent volume under /home/jovyan
? This would prevent the directory being moved. You could try changing the mount location ({username}
should be expanded): https://github.com/jupyterhub/zero-to-jupyterhub-k8s/blob/9c15a42b1227f3b54826f273f1689e4dc8c8e12e/jupyterhub/values.yaml#L238
I didn't explicitly mentioned the persistent volume to be mounted under /home/jovyan. I just configured the storage as per "Zero to JupyterHub with Kubernetes". However, if we need to explicitly mention the homeMountPath, can you please help me with the configuration. Should it be as below: singleuser: storage: homeMountPath: /home/{username}
Your help is highly appreciated. Thanks in advance
Finally, i made this change and it worked. However, now getting the permission issues for the userhome directory.
Log Message: PermissionError: [Errno 13] Permission denied: '/home/user1/.local'
here is the config.yaml
singleuser: defaultUrl: "/lab" uid: 0 fsGid: 0 extraEnv: CHOWN_HOME: 'yes' CHOWN_HOME_OPTS: -R storage: homeMountPath: /home/{username} extraVolumes:
Hi, I need help changing jovyan to {username} at all places. What worked for you?
Thanks @mgotham900, this config worked for me
singleuser:
uid: 0
extraEnv:
CHOWN_HOME: 'yes'
storage:
homeMountPath: /home/{username}
hub:
extraConfig: |
c.Spawner.cmd = ['start.sh','jupyterhub-singleuser','--allow-root']
c.KubeSpawner.args = ['--allow-root']
def notebook_dir_hook(spawner):
spawner.environment = {'NB_USER':spawner.user.name,'NB_UID':'1000'}
c.Spawner.pre_spawn_hook = notebook_dir_hook
Hi, I was able to change the username and home mount but the gitpuller now populates the jovyan home and not the username home
Everything works well until we wanted to set the NB_USER to the logged in user. When changed the config to run as root and start.sh as default cmd, getting the below error in the log and the container is failing to start. Any help is highly appreciated. @yuvipanda @ryanlovett
Set username to: user1 Relocating home dir to /home/user1 mv: cannot move '/home/jovyan' to '/home/user1': Device or resource busy
Here is the config.yaml