Hi,
We have manage to configure z2jh to spin up containers ran by specific UID/GID from our LDAP, but now we need those containers to be able to mount an NFS mount from outside of k8s, or we can also mount that NFS on each host from the k8s cluster and then mount local paths into the containers. Is that possible with z2jh ?
Hi @manics have created PV and PVC and it works fine, but when I try to mount it under /home, the spawn of the singleuser container fails due to impossibility of creation of /home/jovyan
it was a typo…sorry. Now I can mount it in /home/{username} and $HOME is properly set up, but still /home/jovyan is what you see when you open a terminal. the if you do :
cd $HOME
Error: failed to start container "notebook": Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "chdir to cwd (\"/home/moscardo\") set in config.json failed: permission denied": unknown
Is it maybe because it is trying to set the working directory as root and because NFS is no_root_squash it needs to be the user? Or maybe because the share is still not mounted at this point?
The share should be mounted before the pod starts. It’s possible your NFS server restricts the chown operation or imposes some other restrictions. Can you try running chmod on the NFS server to change the UID of the directory to your user, and remove CHOWN_HOME: 'yes' from your Z2JH config?