Closed dzanto closed 1 month ago
@dzanto Did you disable multi-vcenter-csi-topology
flag in internal-feature-states.csi.vsphere.vmware.com
configmap after the driver was first initialized ?
multi-vcenter-csi-topology
option absent in internal-feature-states.csi.vsphere.vmware.com
configmap.
kind: ConfigMap
apiVersion: v1
metadata:
annotations:
meta.helm.sh/release-name: vsphere-csi
meta.helm.sh/release-namespace: kube-system
labels:
app.kubernetes.io/managed-by: Helm
name: internal-feature-states.csi.vsphere.vmware.com
namespace: kube-system
data:
async-query-volume: 'false'
block-volume-snapshot: 'false'
cnsmgr-suspend-create-volume: 'false'
csi-auth-check: 'false'
csi-migration: 'false'
csi-windows-support: 'false'
improved-csi-idempotency: 'false'
improved-volume-topology: 'false'
list-volumes: 'false'
max-pvscsi-targets-per-vm: 'false'
online-volume-extend: 'false'
pv-to-backingdiskobjectid-mapping: 'false'
topology-preferential-datastores: 'false'
trigger-csi-fullsync: 'false'
use-csinode-id: 'true'
I create custom StorageClass with csi.storage.k8s.io/fstype: nfs4
and crashes go away. Default StorageClass (from rancher helm chart) not contain this parameter.
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: vsphere-nfs
parameters:
csi.storage.k8s.io/fstype: nfs4
provisioner: csi.vsphere.vmware.com
reclaimPolicy: Delete
volumeBindingMode: Immediate
But when I create PVC, PV doesn't appear.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nfs-client-pvc
spec:
storageClassName: vsphere-nfs
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Mi
RWX work only when I create PVC and PV manually, how there https://github.com/kubernetes-sigs/vsphere-csi-driver/blob/master/example/vanilla-k8s-RWM-filesystem-volumes/example-static-fileshare-provisioning.yaml
How automatically create PV?
Looks like the vSphere CSI driver was not deployed properly. vSphere CSI driver v3.0.1 has multi-vcenter-csi-topology
feature gate set to true.
Refer to https://github.com/kubernetes-sigs/vsphere-csi-driver/blob/v3.0.1/manifests/vanilla/vsphere-csi-driver.yaml#L164C39-L164C39
I use rancher's helm chart: https://artifacthub.io/packages/helm/rke2-charts/rancher-vsphere-csi
In this topology
option is disabled by default.
The topology flag in provisioner is set to false by default in our YAML as well. It is only set to true when a customer chooses to use topology in their environment.
The multi-vcenter-csi-topology
feature gate we are talking about is present in a configmap with name internal-feature-states.csi.vsphere.vmware.com
in namespace vmware-system-csi
. This should be set to true if you are using vSphere CSI driver v3.0.1
I added multi-vcenter-csi-topology: true
to configmap, but it didn't help. Also I tried multi-vcenter-csi-topology: false
.
vsphere-csi-controller again crashed after creating PVC.
Can you post the logs when you set multi-vcenter-csi-topology
to true in configmap?
{"level":"info","time":"2024-01-30T06:39:53.042383033Z","caller":"vanilla/controller.go:1805","msg":"CreateVolume: called with args {Name:pvc-13e4061b-61d6-4f6a-ad6a-ef7d1425dc4e CapacityRange:required_bytes:10485760 VolumeCapabilities:[mount:<fs_type:\"nfs4\" > access_mode:<mode:MULTI_NODE_MULTI_WRITER > ] Parameters:map[] Secrets:map[] VolumeContentSource:<nil> AccessibilityRequirements:<nil> XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0}","TraceId":"2177c87f-8ff3-406f-8ffa-b366a1d14a12"}
panic: runtime error: invalid memory address or nil pointer dereference
2024-01-30T06:39:53.059969372Z [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x1a4f182]
2024-01-30T06:39:53.059974632Z
2024-01-30T06:39:53.059977523Z goroutine 654 [running]:
2024-01-30T06:39:53.059980332Z sigs.k8s.io/vsphere-csi-driver/v3/pkg/csi/service/common.(*AuthManager).GetFsEnabledClusterToDsMap(0x0, {0x26af658?, 0xc0000585b8?})
2024-01-30T06:39:53.059983223Z /build/pkg/csi/service/common/authmanager.go:137 +0x62
2024-01-30T06:39:53.059986273Z sigs.k8s.io/vsphere-csi-driver/v3/pkg/csi/service/vanilla.(*controller).createFileVolume(0xc00034a190, {0x26af658, 0xc000632300}, 0xc0001b2770)
2024-01-30T06:39:53.059989283Z /build/pkg/csi/service/vanilla/controller.go:1734 +0xcf3
2024-01-30T06:39:53.059992373Z sigs.k8s.io/vsphere-csi-driver/v3/pkg/csi/service/vanilla.(*controller).CreateVolume.func1()
2024-01-30T06:39:53.059995143Z /build/pkg/csi/service/vanilla/controller.go:1836 +0x2c5
2024-01-30T06:39:53.060001453Z sigs.k8s.io/vsphere-csi-driver/v3/pkg/csi/service/vanilla.(*controller).CreateVolume(0xc00034a190, {0x26af658, 0xc000fd8db0}, 0xc0001b2770)
2024-01-30T06:39:53.060004383Z /build/pkg/csi/service/vanilla/controller.go:1858 +0x1bb
2024-01-30T06:39:53.060007163Z github.com/container-storage-interface/spec/lib/go/csi._Controller_CreateVolume_Handler({0x229bba0?, 0xc00034a190}, {0x26af658, 0xc000fd8db0}, 0xc0003bb800, 0x0)
/go/pkg/mod/github.com/container-storage-interface/spec@v1.7.0/lib/go/csi/csi.pb.go:5671 +0x170
2024-01-30T06:39:53.060013863Z google.golang.org/grpc.(*Server).processUnaryRPC(0xc000196a80, {0x26b6218, 0xc000bea9c0}, 0xc0002797a0, 0xc000a37860, 0x38db8a0, 0x0)
/go/pkg/mod/google.golang.org/grpc@v1.47.0/server.go:1283 +0xcfe
google.golang.org/grpc.(*Server).handleStream(0xc000196a80, {0x26b6218, 0xc000bea9c0}, 0xc0002797a0, 0x0)
/go/pkg/mod/google.golang.org/grpc@v1.47.0/server.go:1620 +0xa2f
2024-01-30T06:39:53.060029353Z google.golang.org/grpc.(*Server).serveStreams.func1.2()
/go/pkg/mod/google.golang.org/grpc@v1.47.0/server.go:922 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
/go/pkg/mod/google.golang.org/grpc@v1.47.0/server.go:920 +0x28a
Hi, have you found a solution ?
I have the same issue with my clusters rke2 and k3s and the helm charts rancher-vsphere-csi:103.0.0+up3.0.2-rancher1
{"level":"info","time":"2024-03-15T15:34:05.026383613Z","caller":"vanilla/controller.go:2719","msg":"ControllerGetCapabilities: called with args {XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0}","TraceId":"91f15cdb-ed37-4014-b79e-ebd785e54684"}
{"level":"info","time":"2024-03-15T15:34:24.880189533Z","caller":"vanilla/controller.go:1806","msg":"CreateVolume: called with args {Name:pvc-2a06d694-903f-41da-85bb-1475e20d2ff9 CapacityRange:required_bytes:1073741824 VolumeCapabilities:[mount:<fs_type:\"nfs4\" > access_mode:<mode:MULTI_NODE_MULTI_WRITER > ] Parameters:map[] Secrets:map[] VolumeContentSource:<nil> AccessibilityRequirements:<nil> XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0}","TraceId":"a2fd7e91-f23e-44f9-8037-2a0c13595c03"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x1b24e65]
goroutine 275 [running]:
sigs.k8s.io/vsphere-csi-driver/v3/pkg/csi/service/vanilla.(*controller).createFileVolume(0xc0000a1c20, {0x26b2d98, 0xc000874660}, 0xc0004e2380)
/build/pkg/csi/service/vanilla/controller.go:1737 +0xd05
sigs.k8s.io/vsphere-csi-driver/v3/pkg/csi/service/vanilla.(*controller).CreateVolume.func1()
/build/pkg/csi/service/vanilla/controller.go:1849 +0x3d7
sigs.k8s.io/vsphere-csi-driver/v3/pkg/csi/service/vanilla.(*controller).CreateVolume(0xc0000a1c20, {0x26b2d98, 0xc00085ce10}, 0xc0004e2380)
/build/pkg/csi/service/vanilla/controller.go:1859 +0x1bb
github.com/container-storage-interface/spec/lib/go/csi._Controller_CreateVolume_Handler({0x229ed80?, 0xc0000a1c20}, {0x26b2d98, 0xc00085ce10}, 0xc0004fc660, 0x0)
/go/pkg/mod/github.com/container-storage-interface/spec@v1.7.0/lib/go/csi/csi.pb.go:5671 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0002cfc00, {0x26b9978, 0xc000557ba0}, 0xc0002eea20, 0xc000875ad0, 0x38e08a0, 0x0)
/go/pkg/mod/google.golang.org/grpc@v1.47.0/server.go:1283 +0xcfe
google.golang.org/grpc.(*Server).handleStream(0xc0002cfc00, {0x26b9978, 0xc000557ba0}, 0xc0002eea20, 0x0)
/go/pkg/mod/google.golang.org/grpc@v1.47.0/server.go:1620 +0xa2f
google.golang.org/grpc.(*Server).serveStreams.func1.2()
/go/pkg/mod/google.golang.org/grpc@v1.47.0/server.go:922 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
/go/pkg/mod/google.golang.org/grpc@v1.47.0/server.go:920 +0x28a
Anything else we need to know?:
The vSAN File Service is working because I tried to create a File NFS share and I able to mount it manually on a node of the k8s cluster
Environment:
Ok after few weeks I found the solution
Edit in your configMap :
csi-auth-check: 'false'
-> csi-auth-check: 'true'
Restart Pods of the vSphere plugin and recreate PVC
@dzanto Let me know if this helped you
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/reopen
/remove-lifecycle rotten
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
/kind bug
What happened:
I have install vSphere Cloud Provider Interface (CPI) and vSphere Container Storage Interface (CSI) to kubernetes cluster from Rancher Apps, and mount RWO (ReadWtiteOnce), it's works fine. Then I try to create PVC (PersistentVolumeClaim) with RWX (ReadWtiteMany) mode, but csi-provisioner and vsphere-csi-controller begin restarting with logs:
csi-provisioner:
vsphere-csi-controller
Environment: