metal-stack/csi-driver-lvm

chmod 0777 causes recursively setting volume ownership even with fsGroupChangePolicy: OnRootMismatch

jonasasx opened this issue · 2 comments

kubelet on mounting PV checks SGID flag (0x2000). If it is absent, recursively setting volume ownership starts.
https://github.com/kubernetes/kubernetes/blob/master/pkg/volume/volume_linux.go#L153

mountLV method must not clear SGID flag https://github.com/metal-stack/csi-driver-lvm/blob/master/pkg/lvm/lvm.go#L210.

Why chmod command on mounting is needed?

@mwennrich, @majst01 Could you comment it?