The IBM Spectrum Scale Container Storage Interface (CSI) project enables container orchestrators, such as Kubernetes and OpenShift, to manage the life-cycle of persistent storage.
Apache License 2.0
68
stars
49
forks
source link
Custom Volume Prefix fails for wrong values such as empty string #1212
When wrong values are added in Custom volume prefix name that time PVC creation fails , For wrong values PVC name should be created with default parameters
How to Reproduce?
Please list the steps to help development teams reproduce the behavior
[root@ocp Upgradetesting]# oc get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS VOLUMEATTRIBUTESCLASS AGE
scale-advance-pvc-1 Pending ibm-spectrum-scale-csi-advance 31m
5. Check PVC logs
[root@ocp Upgradetesting]# oc describe pvc
Name: scale-advance-pvc-1
Namespace: ibm-spectrum-scale-csi
StorageClass: ibm-spectrum-scale-csi-advance
Status: Pending
Volume:
Labels:
Annotations: volume.beta.kubernetes.io/storage-provisioner: spectrumscale.csi.ibm.com
volume.kubernetes.io/storage-provisioner: spectrumscale.csi.ibm.com
Finalizers: [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode: Filesystem
Used By: csi-scale-fsetdemo-pod-2
Events:
Type Reason Age From Message
Warning ProvisioningFailed 32m persistentvolume-controller storageclass.storage.k8s.io "ibm-spectrum-scale-csi-advance" not found
Normal Provisioning 30m spectrumscale.csi.ibm.com_ibm-spectrum-scale-csi-provisioner-67ddbdccb5-hqng7_eaa9f796-2490-47e3-bd4e-b20a93638b2c External provisioner is provisioning volume for claim "ibm-spectrum-scale-csi/scale-advance-pvc-1"
Warning ProvisioningFailed 27m spectrumscale.csi.ibm.com_ibm-spectrum-scale-csi-provisioner-67ddbdccb5-hqng7_2880e2c5-8f95-430f-8675-70e80b92761e failed to provision volume with StorageClass "ibm-spectrum-scale-csi-advance": rpc error: code = Internal desc = unable to check if directory path [LW/ -2ef6155d-260c-41d1-9eac-96e933bb565d] exists in filesystem [fs0]. Error : rpc error: code = Internal desc = remote call failed with response &{{404 The requested URL was not found.} { 0 0}}: GET request https://ocp:443/scalemgmt/v2/filesystems/fs0/owner/LW%2F -2ef6155d-260c-41d1-9eac-96e933bb565d, user: CsiAdmin, param: { }, response: &{404 Not Found 404 HTTP/1.1 1 1 map[Access-Control-Allow-Credentials:[true] Access-Control-Allow-Headers:[Authorization,Content-Type,Accept] Access-Control-Allow-Methods:[GET, POST, PUT, DELETE] Cache-Control:[no-cache="set-cookie, set-cookie2" private] Content-Language:[en-US] Content-Length:[91] Content-Type:[application/json] Date:[Tue, 10 Sep 2024 03:44:32 GMT] Expires:[Thu, 01 Dec 1994 16:00:00 GMT] Set-Cookie:[LtpaToken2=TiHOtC/A/Ak1fQL5JyzCb74Mfu7f2I3RCOheLEpCwV1nI7as7Kp9S5MOgYpnzX99AXWGnQIEsQs0BWW5TD+GLVe6H5eOqRrRQurniiSN1BopPn9ln7WG2wu8rEw/mo1WBXqQiUyX+b2ErfXtGG8B8eJoUR4ceAY22k3Kn0F98o4Nxk/jrm7poc3MQ9mEWCTLuFlK4azfw96sJBeqiRHXJwb58A4jCTHxTXnDmPCLdMLSAeYuKphUlwBuBwSAtmcT/+ecnNDJyz4oiePFCY5WrAlldZKSLVldF7lgwzBE7G1KbLFHV7P+p6ZjNb8kN/6m; Path=/; HttpOnly; SameSite=Strict JSESSIONID=0000KcB41pNhirXlgl2u_UPYJtP:e46b01b9-f359-487f-81fc-ae53dba1552f; Path=/; Secure; HttpOnly; SameSite=Strict cc89a2ae1729bdcc79a819d442b16ed4=0c5f025487b88ab7972a2778fd0e59b9; path=/; HttpOnly; Secure; SameSite=None] Strict-Transport-Security:[max-age=31536000] X-Content-Type-Options:[nosniff]] 0xc00012e240 91 [] false false map[] 0xc0004b8360 0xc000355130}
Warning ProvisioningFailed 27m spectrumscale.csi.ibm.com_ibm-spectrum-scale-csi-provisioner-67ddbdccb5-hqng7_2880e2c5-8f95-430f-8675-70e80b92761e failed to provision volume with StorageClass "ibm-spectrum-scale-csi-advance": rpc error: code = Internal desc = unable to check if directory path [LW/ -2ef6155d-260c-41d1-9eac-96e933bb565d] exists in filesystem [fs0]. Error : rpc error: code = Internal desc = remote call failed with response &{{404 The requested URL was not found.} { 0 0}}: GET request https://ocp:443/scalemgmt/v2/filesystems/fs0/owner/LW%2F -2ef6155d-260c-41d1-9eac-96e933bb565d, user: CsiAdmin, param: { }, response: &{404 Not Found 404 HTTP/1.1 1 1 map[Access-Control-Allow-Credentials:[true] Access-Control-Allow-Headers:[Authorization,Content-Type,Accept] Access-Control-Allow-Methods:[GET, POST, PUT, DELETE] Cache-Control:[no-cache="set-cookie, set-cookie2" private] Content-Language:[en-US] Content-Length:[91] Content-Type:[application/json] Date:[Tue, 10 Sep 2024 03:44:34 GMT] Expires:[Thu, 01 Dec 1994 16:00:00 GMT] Set-Cookie:[LtpaToken2=TiHOtC/A/Ak1fQL5JyzCb74Mfu7f2I3RCOheLEpCwV1nI7as7Kp9S5MOgYpnzX99AXWGnQIEsQs0BWW5TD+GLVe6H5eOqRrRQurniiSN1BopPn9ln7WG2wu8rEw/mo1WBXqQiUyX+b2ErfXtGG8B8eJoUR4ceAY22k3Kn0F98o4Nxk/jrm7poc3MQ9mEWCTLuFlK4azfw96sJBeqiRHXJwb58A4jCTHxTXnDmPCLdMLSAeYuKphUlwBuBwSAtmcT/+ecnNDJyz4oiePFCY5WrAlldZKSLVldF7lgwzBE7G1KbLFHV7P+p6ZjNb8kN/6m; Path=/; HttpOnly; SameSite=Strict JSESSIONID=0000yo1rmgMgm0jCL1P34Bs-5GO:e46b01b9-f359-487f-81fc-ae53dba1552f; Path=/; Secure; HttpOnly; SameSite=Strict cc89a2ae1729bdcc79a819d442b16ed4=0c5f025487b88ab7972a2778fd0e59b9; path=/; HttpOnly; Secure; SameSite=None] Strict-Transport-Security:[max-age=31536000] X-Content-Type-Options:[nosniff]] 0xc00012ee80 91 [] false false map[] 0xc000175320 0xc000355130}
## Expected behavior
PVC should get create with default volume prefix name
### Logs
Describe the bug
When wrong values are added in Custom volume prefix name that time PVC creation fails , For wrong values PVC name should be created with default parameters
How to Reproduce?
Please list the steps to help development teams reproduce the behavior
[root@ocp prefix]# oc get pods NAME READY STATUS RESTARTS AGE csi-scale-fsetdemo-pod-2 1/1 Running 0 7m41s ibm-spectrum-scale-csi-94tz7 3/3 Running 0 2s ibm-spectrum-scale-csi-attacher-6bccf7dfc6-g66cp 1/1 Running 0 4s ibm-spectrum-scale-csi-attacher-6bccf7dfc6-n8t4d 1/1 Running 0 4s ibm-spectrum-scale-csi-hnxx4 0/3 ContainerCreating 0 0s ibm-spectrum-scale-csi-operator-9cd57d5d9-skwhv 1/1 Running 0 22h ibm-spectrum-scale-csi-provisioner-67ddbdccb5-hqng7 1/1 Running 0 4s ibm-spectrum-scale-csi-r6kn4 3/3 Running 0 4s ibm-spectrum-scale-csi-resizer-7795c6bbd4-kjjvm 1/1 Running 0 4s ibm-spectrum-scale-csi-snapshotter-757c6b747-tjl8l 1/1 Running 0 4s [root@ocp prefix]# oc exec -it ibm-spectrum-scale-csi-hnxx4 -- env PATH=/chroot:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin TERM=xterm HOSTNAME=worker2.ocp NSS_SDB_USE_CACHE=no CSI_CG_PREFIX=807ac17b-e864-48d7-9b3a-4f2f4e05d9b1 DISCOVER_CG_FILESET=ENABLED SKIP_MOUNT_UNMOUNT=yes worker0.ocp=worker0 SHORTNAME_NODE_MAPPING=yes worker1.ocp=worker1 CSI_ENDPOINT=unix:///var/lib/kubelet/plugins/spectrumscale.csi.ibm.com/csi.sock KUBELET_ROOT_DIR_PATH=/var/lib/kubelet NODE_ID=worker2.ocp worker2.ocp=worker2 LOGLEVEL=TRACE master2.ocp=master2 CNSADeployment=True NODEPUBLISH_METHOD=BINDMOUNT PERSISTENT_LOG=DISABLED VOLUME_NAME_PREFIX= VOLUME_STATS_CAPABILITY=ENABLED master0.ocp=master0 master1.ocp=master1 KUBERNETES_PORT_443_TCP_PROTO=tcp KUBERNETES_PORT_443_TCP_PORT=443 KUBERNETES_PORT_443_TCP_ADDR=172.30.0.1 KUBERNETES_SERVICE_HOST=172.30.0.1 KUBERNETES_SERVICE_PORT=443 KUBERNETES_SERVICE_PORT_HTTPS=443 KUBERNETES_PORT=tcp://172.30.0.1:443 KUBERNETES_PORT_443_TCP=tcp://172.30.0.1:443 container=oci version=2.13.0 commit=08bd5644f18d2a3a36b862602e0ce34eae141058 build_date=Mon 26 Aug 2024 07:42:11 PM UTC HOME=/root
[root@ocp Upgradetesting]# oc apply -f apply.yaml pod/csi-scale-fsetdemo-pod-2 created persistentvolumeclaim/scale-advance-pvc-1 created storageclass.storage.k8s.io/ibm-spectrum-scale-csi-advance created [root@ocp Upgradetesting]# cat apply.yaml apiVersion: v1 kind: Pod metadata: name: csi-scale-fsetdemo-pod-2 labels: app: nginx spec: containers:
apiVersion: v1 kind: PersistentVolumeClaim metadata: name: scale-advance-pvc-1 spec: accessModes:
apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: ibm-spectrum-scale-csi-advance provisioner: spectrumscale.csi.ibm.com parameters: volBackendFs: "fs0" volDirBasePath: "LW" reclaimPolicy: Delete
[root@ocp Upgradetesting]# oc get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS VOLUMEATTRIBUTESCLASS AGE scale-advance-pvc-1 Pending ibm-spectrum-scale-csi-advance 31m
[root@ocp Upgradetesting]# oc describe pvc Name: scale-advance-pvc-1 Namespace: ibm-spectrum-scale-csi StorageClass: ibm-spectrum-scale-csi-advance Status: Pending Volume: Labels:
Annotations: volume.beta.kubernetes.io/storage-provisioner: spectrumscale.csi.ibm.com
volume.kubernetes.io/storage-provisioner: spectrumscale.csi.ibm.com
Finalizers: [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode: Filesystem
Used By: csi-scale-fsetdemo-pod-2
Events:
Type Reason Age From Message
Warning ProvisioningFailed 32m persistentvolume-controller storageclass.storage.k8s.io "ibm-spectrum-scale-csi-advance" not found Normal Provisioning 30m spectrumscale.csi.ibm.com_ibm-spectrum-scale-csi-provisioner-67ddbdccb5-hqng7_eaa9f796-2490-47e3-bd4e-b20a93638b2c External provisioner is provisioning volume for claim "ibm-spectrum-scale-csi/scale-advance-pvc-1" Warning ProvisioningFailed 27m spectrumscale.csi.ibm.com_ibm-spectrum-scale-csi-provisioner-67ddbdccb5-hqng7_2880e2c5-8f95-430f-8675-70e80b92761e failed to provision volume with StorageClass "ibm-spectrum-scale-csi-advance": rpc error: code = Internal desc = unable to check if directory path [LW/ -2ef6155d-260c-41d1-9eac-96e933bb565d] exists in filesystem [fs0]. Error : rpc error: code = Internal desc = remote call failed with response &{{404 The requested URL was not found.} { 0 0}}: GET request https://ocp:443/scalemgmt/v2/filesystems/fs0/owner/LW%2F -2ef6155d-260c-41d1-9eac-96e933bb565d, user: CsiAdmin, param: { }, response: &{404 Not Found 404 HTTP/1.1 1 1 map[Access-Control-Allow-Credentials:[true] Access-Control-Allow-Headers:[Authorization,Content-Type,Accept] Access-Control-Allow-Methods:[GET, POST, PUT, DELETE] Cache-Control:[no-cache="set-cookie, set-cookie2" private] Content-Language:[en-US] Content-Length:[91] Content-Type:[application/json] Date:[Tue, 10 Sep 2024 03:44:32 GMT] Expires:[Thu, 01 Dec 1994 16:00:00 GMT] Set-Cookie:[LtpaToken2=TiHOtC/A/Ak1fQL5JyzCb74Mfu7f2I3RCOheLEpCwV1nI7as7Kp9S5MOgYpnzX99AXWGnQIEsQs0BWW5TD+GLVe6H5eOqRrRQurniiSN1BopPn9ln7WG2wu8rEw/mo1WBXqQiUyX+b2ErfXtGG8B8eJoUR4ceAY22k3Kn0F98o4Nxk/jrm7poc3MQ9mEWCTLuFlK4azfw96sJBeqiRHXJwb58A4jCTHxTXnDmPCLdMLSAeYuKphUlwBuBwSAtmcT/+ecnNDJyz4oiePFCY5WrAlldZKSLVldF7lgwzBE7G1KbLFHV7P+p6ZjNb8kN/6m; Path=/; HttpOnly; SameSite=Strict JSESSIONID=0000KcB41pNhirXlgl2u_UPYJtP:e46b01b9-f359-487f-81fc-ae53dba1552f; Path=/; Secure; HttpOnly; SameSite=Strict cc89a2ae1729bdcc79a819d442b16ed4=0c5f025487b88ab7972a2778fd0e59b9; path=/; HttpOnly; Secure; SameSite=None] Strict-Transport-Security:[max-age=31536000] X-Content-Type-Options:[nosniff]] 0xc00012e240 91 [] false false map[] 0xc0004b8360 0xc000355130} Warning ProvisioningFailed 27m spectrumscale.csi.ibm.com_ibm-spectrum-scale-csi-provisioner-67ddbdccb5-hqng7_2880e2c5-8f95-430f-8675-70e80b92761e failed to provision volume with StorageClass "ibm-spectrum-scale-csi-advance": rpc error: code = Internal desc = unable to check if directory path [LW/ -2ef6155d-260c-41d1-9eac-96e933bb565d] exists in filesystem [fs0]. Error : rpc error: code = Internal desc = remote call failed with response &{{404 The requested URL was not found.} { 0 0}}: GET request https://ocp:443/scalemgmt/v2/filesystems/fs0/owner/LW%2F -2ef6155d-260c-41d1-9eac-96e933bb565d, user: CsiAdmin, param: { }, response: &{404 Not Found 404 HTTP/1.1 1 1 map[Access-Control-Allow-Credentials:[true] Access-Control-Allow-Headers:[Authorization,Content-Type,Accept] Access-Control-Allow-Methods:[GET, POST, PUT, DELETE] Cache-Control:[no-cache="set-cookie, set-cookie2" private] Content-Language:[en-US] Content-Length:[91] Content-Type:[application/json] Date:[Tue, 10 Sep 2024 03:44:34 GMT] Expires:[Thu, 01 Dec 1994 16:00:00 GMT] Set-Cookie:[LtpaToken2=TiHOtC/A/Ak1fQL5JyzCb74Mfu7f2I3RCOheLEpCwV1nI7as7Kp9S5MOgYpnzX99AXWGnQIEsQs0BWW5TD+GLVe6H5eOqRrRQurniiSN1BopPn9ln7WG2wu8rEw/mo1WBXqQiUyX+b2ErfXtGG8B8eJoUR4ceAY22k3Kn0F98o4Nxk/jrm7poc3MQ9mEWCTLuFlK4azfw96sJBeqiRHXJwb58A4jCTHxTXnDmPCLdMLSAeYuKphUlwBuBwSAtmcT/+ecnNDJyz4oiePFCY5WrAlldZKSLVldF7lgwzBE7G1KbLFHV7P+p6ZjNb8kN/6m; Path=/; HttpOnly; SameSite=Strict JSESSIONID=0000yo1rmgMgm0jCL1P34Bs-5GO:e46b01b9-f359-487f-81fc-ae53dba1552f; Path=/; Secure; HttpOnly; SameSite=Strict cc89a2ae1729bdcc79a819d442b16ed4=0c5f025487b88ab7972a2778fd0e59b9; path=/; HttpOnly; Secure; SameSite=None] Strict-Transport-Security:[max-age=31536000] X-Content-Type-Options:[nosniff]] 0xc00012ee80 91 [] false false map[] 0xc000175320 0xc000355130}
/scale-csi/D.1212 mustgather.tar.gz