csi-driver-smb: could not mount SMB share in 1.20

Due to my own mistake, I updated cluster to 1.20.0 version (luckily it’s not production)

Now I can’t mount SMB share and face such issue: Warning FailedMount 106s (x11 over 7m57s) kubelet MountVolume.NewMounter initialization failed for volume "pvc-1231231" : kubernetes.io/csi: expected valid fsGroupPolicy, received nil value or empty string

I tried to add those lines to DaemonSet/CSIDriver: fsGroupChangePolicy: None fsGroupPolicy: None Didn’t work out either.

So, any quick fix solutions before next release of driver?

Environment:

  • CSI Driver version: 0.5.0
  • Kubernetes version (use kubectl version): 1.20.0
  • OS (e.g. from /etc/os-release): Ubuntu 20.04.1 LTS

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 20 (5 by maintainers)

Commits related to this issue

Most upvoted comments

the error(etes.io/csi: expected valid fsGroupPolicy, received nil value or empty string) happened here: https://github.com/kubernetes/kubernetes/blob/6d5cb36d36f34cb4f5735b6adcd5ea8ebb4440ba/pkg/volume/csi/csi_plugin.go#L910-L913 @huffmanca looks like this is a backward-compatibility issue, if csiDriver.Spec.FSGroupPolicy is not specified in k8s 1.20, what about return storage.ReadWriteOnceWithFSTypeFSGroupPolicy, nil by default? @jmarcedwards one workaround is disable CSIVolumeFSGroupPolicy in kubelet by --feature-gates=CSIVolumeFSGroupPolicy=false

Thanks! This totally unblocked me from my CSI issues. Thanks!

Did it work for you to disable the CSIVolumeFSGroupPolicy with the --feature-gates? How do you set this on the kubelet with kubectl?

Thanks, Marc

I added --feature-gates=CSIVolumeFSGroupPolicy=false to the end of ExecStart= in /etc/systemd/system/kubelet.service.d/10-kubeadm.conf

It seems the problem was caused by incompatibility of the versions kubelet v1.20 and apiservers v1.19. After all apiservers upgraded, everything if working perfectly.

the error(etes.io/csi: expected valid fsGroupPolicy, received nil value or empty string) happened here: https://github.com/kubernetes/kubernetes/blob/6d5cb36d36f34cb4f5735b6adcd5ea8ebb4440ba/pkg/volume/csi/csi_plugin.go#L910-L913 @huffmanca looks like this is a backward-compatibility issue, if csiDriver.Spec.FSGroupPolicy is not specified in k8s 1.20, what about return storage.ReadWriteOnceWithFSTypeFSGroupPolicy, nil by default? @jmarcedwards one workaround is disable CSIVolumeFSGroupPolicy in kubelet by --feature-gates=CSIVolumeFSGroupPolicy=false

Thanks! This totally unblocked me from my CSI issues. Thanks!

Did it work for you to disable the CSIVolumeFSGroupPolicy with the --feature-gates? How do you set this on the kubelet with kubectl?

Thanks, Marc