Open igor-msk opened 1 month ago
could you provide the csi driver logs on that node? The mountOptions
should be contained in mount_flags
in the /NodeStageVolume
logs
https://github.com/kubernetes-csi/csi-driver-smb/blob/master/docs/csi-debug.md#case2-volume-mountunmount-failed
here are example logs, the mountOptions are in the mount_flags
in e2e tests:
[pod/csi-smb-node-c5hcp/smb] I0711 03:17:31.508163 1 utils.go:76] GRPC call: /csi.v1.Node/NodeStageVolume
[pod/csi-smb-node-c5hcp/smb] I0711 03:17:31.508183 1 utils.go:77] GRPC request: {"secrets":"***stripped***","staging_target_path":"/var/lib/kubelet/plugins/kubernetes.io/csi/pv/pvc-a97eeda9-acb9-4ba9-959b-5f27d0742570/globalmount","volume_capability":{"AccessType":{"Mount":{"mount_flags":["dir_mode=0777","file_mode=0777"]}},"access_mode":{"mode":1}},"volume_context":{"csi.storage.k8s.io/pv/name":"pvc-a97eeda9-acb9-4ba9-959b-5f27d0742570","csi.storage.k8s.io/pvc/name":"pvc-grsdz","csi.storage.k8s.io/pvc/namespace":"smb-6174","source":"//smb-server.default.svc.cluster.local/share","storage.kubernetes.io/csiProvisionerIdentity":"1720667723125-4346-smb.csi.k8s.io","subdir":"pvc-a97eeda9-acb9-4ba9-959b-5f27d0742570"},"volume_id":"smb-server.default.svc.cluster.local/share#pvc-a97eeda9-acb9-4ba9-959b-5f27d0742570##"}
MountOptions declared in StorageClass don't seem to apply
What happened: the PVC got created but remained in Pending state with the following error -
Warning ProvisioningFailed 1s (x2 over 2s) smb.csi.k8s.io_dev-kuber-node-pool-cpu-3l215_8522d1a0-224f-4c17-9bf7-07ed1b0e8161 failed to provision volume with StorageClass "smb-sbf-it-cam-dockerwebservice": rpc error: code = Internal desc = failed to mount smb server: rpc error: code = Internal desc = MkdirAll /tmp/pvc-6a28c399-6f67-4d2d-a7d5-c07d423b954e failed with error: mkdir /tmp/pvc-6a28c399-6f67-4d2d-a7d5-c07d423b954e: read-only file system
What you expected to happen: SMB successfully mounted. I got it to work only by manually creating a PV and declaring the MountOptions in the PV nstread of declaring them in the StorageClass, but I need many PVs in subdirs with PVC names, so providing PVs with montOptions manually is not an option.
How to reproduce it: Try Option 1 - use a SatefullSet with a StorageClass without manually creating PVs
Environment:
CSI Driver version: csi-provisioner:v4.0.0
Kubernetes version (use
kubectl version
):Server Version: version.Info{Major:"1", Minor:"28+", GitVersion:"v1.28.3-r0-28.0.21.7", GitCommit:"db59dc8d4317f42fd5dd69f42dcd73088b83db13", GitTreeState:"clean", BuildDate:"2024-03-05T06:44:38Z", GoVersion:"go1.20.12", Compiler:"gc", Platform:"linux/amd64"}
OS (e.g. from /etc/os-release):
SMB folders are on Windows host