samba-in-kubernetes / samba-operator

An operator for a Samba as a service on PVCs in kubernetes
Apache License 2.0
120 stars 24 forks source link

Support for Longhorn volumes? #306

Closed mnarrell closed 1 year ago

mnarrell commented 1 year ago

I have existing Longhorn PersistentVolumes and PersistentVolumeClaims, but get the same OSError: [Errno 95] Operation not supported thats reported in #294, with the same traceback.

Is there support for Longhorn volumes, or is there additional configuration necessary for these volumes?

mnarrell commented 1 year ago

Seems to be an issue with ReadWriteMany PVCs

phlogistonjohn commented 1 year ago

Hi, thanks for trying out the samba-operator!

I was momentarily confused because I thought of Windows Longhorn (also) first., before realizing that you must be referring to https://longhorn.io/ instead. :-D

I don't know if longhorn.io RWX volumes support xattrs. I found this closed issue of theirs which implies that (maybe?) longhorn rwx volumes are based on NFS and do not support xattrs. Regardless, if the underlying storage does not support xattrs then we will hit errors trying to execute the sambacc code that sets permissions. That code uses a sentinel xattr to indicate that it set the permissions once and so if the permissions are different it was done by a user and not to overwrite those newer permissions.

The sambacc configuration file can be configured not to do this, and to leave the permissions as whatever they are before starting, but currently there's no mechanism in samba-operator to skip this... I think. Note that our not-yet-implemented but planned support to serve NT ACLs using samba also would require (probably) xattrs. But it might be a good idea to give an option to disable the sambacc permissions feature.

One last thought: if longhorn.io RWX support is based on NFS, you should be aware that there are other issues running SMB on top of NFS (as discussed in #294). So if this is the case you may want to stick to RWO or a different RWX provider.

mnarrell commented 1 year ago

Thanks for looking into this.