-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NFS ID Mapping in Kubernetes #831
Comments
I also encountered this problem. I am using the same setup in GKE, and the log says this when the Sysbox pod starts up
These are NFSv3 netapp volumes that I am connecting to the pod through PVC. They work on regular container setup. I found that only some types of volumes have been confirmed to work. Is this a limitation of GKE node linux kernel/volume type/shiftfs or something else? |
Hello,
Because of this we are unable to use shared NFS volumes for our CI/CD pipelines. This limitation is unfortunately causing a slowdown in the overall execution of the pipelines. |
Hi folks, thanks for giving Sysbox a try, and apologies for the belated response. The problem is that neither shiftfs nor idmapped mounts, the two mechanisms used by Sysbox to map filesytem user-ID and group-IDs inside the rootless container, work with NFS unfortunately. This is why inside the Sysbox container the NFS share files show up with The easiest solution would be for NFS to support idmapped mounts, but I am not aware of any plans at the moment to do this. Alternatively, we could add some trickery in Sysbox to create dedicated NFS client mounts for each container and use NFS ID-mapping options to ensure the files show up with proper user and group-IDs inside the container, but this requires more investigation and work, and we currently don't have sufficient cycles for it. I don't know of any other solution unfortunately. Maybe using bindfs could work (?), though not sure how it may affect performance. |
Hey guys! I attempted to use sudo bindfs -o force-user=root,force-group=root,perms=0755 /mnt/nfs_share/docker /mnt/bindfs/docker However, I encountered the following error when running Docker:
It appears that Unfortunately, there's a lack of information on using I'm exploring alternative solutions or workarounds for my problem. If anyone has experience or insights on integrating |
BTW, Is there a way to share a directory between hosts so that it can be mapped to a Sysbox container? I've tried methods like SSHFS and others, but none seem to work. Syncing files with rsync is an option but it's quite inconvenient. Are there any solutions or workarounds to this problem? |
That sounds like a small bug in Sysbox: it expects the underlying filesystem to support ACLs, but apparently not all filesystems do. Ideally Sysbox should first check if it does, and if not, simply skip checking the ACLs and continue. As a quick and dirty work-around, you could try commenting the It's not a proper fix, but at least will get you past that issue and see if the bindfs / NFS mount works. |
@bushev did you test it? I wonder if a fix in sysbox to check whether ACLs are available or not could work. |
I tried using the bindfs from inside the container, but that would require the |
Hey! No, unfortunately, I couldn’t get it to work with BindFS. I ran into issues with symbolic links and ACL. I haven’t revisited the problem since then. |
Just FYI, regarding
That bug was fixed in v0.6.5. Not a solution to this issue, just a minor improvement. |
I am mounting an NFS volume in my Kubernetes container. If I use the default runtimeClass, it works as expected - The file ownership is mapped to the users in the container, ie:
If I change only the runtimeClass to
sysbox-runc
, the file ownership is not mapped - Everything is owned bynobody:nogroup
:I'm running in GKE, and using the
Ubuntu with containerd (ubuntu_containerd)
node type as was suggested in the docs, the kernel is version5.15.0-1061-gke
and shiftfs appears to be installed. The documentation suggests that with this kernel version and shiftfs the ID mapping should work. Any ideas?The text was updated successfully, but these errors were encountered: