Closed saurabhwani5 closed 7 months ago
This issue is also seen in type of issue in good path scenario
Warning VolumeFailedDelete 25s (x167 over 11h) spectrumscale.csi.ibm.com_ibm-spectrum-scale-csi-provisioner-6dd44f9b4-pvvvd_3232e8a8-8dad-4f65-a291-b90c5575e30c rpc error: code = Unknown desc = unable to stat dir pvc-d80c2ec5-35c5-4eeb-9893-a45ac0e8645e/snapshot-vheldksd-0:[EFSSG0264C The path /ibm/fs1/pvc-d80c2ec5-35c5-4eeb-9893-a45ac0e8645e/snapshot-vheldksd-0 does not exist.]
closing as verified , thanks @hemalathagajendran
Describe the bug
When snapshot dir gets deleted accidentally,shallow copy volume doesn't get deleted with reason :
rpc error: code = Unknown desc = unable to stat dir pvc-afb220f3-dfd2-43d9-8031-d6c9de8c5aed/snapshot-5bba074e-da41-4901-8aa6-f1f78db36fa4:[EFSSG0264C The path /var/gpfs/fs0/pvc-afb220f3-dfd2-43d9-8031-d6c9de8c5aed/snapshot-5bba074e-da41-4901-8aa6-f1f78db36fa4 does not exist.]
How to Reproduce?
apiVersion: v1 kind: PersistentVolumeClaim metadata: name: scale-pvc-1 spec: accessModes:
apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: ibm-spectrum-scale-csi provisioner: spectrumscale.csi.ibm.com parameters: volBackendFs: "fs0" reclaimPolicy: Delete
[root@api.cnsa-saurabhwani1213.cp.fyre.ibm.com Upgradetesting]# oc get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE scale-pvc-1 Bound pvc-afb220f3-dfd2-43d9-8031-d6c9de8c5aed 1Gi RWX ibm-spectrum-scale-csi 3m48s [root@api.cnsa-saurabhwani1213.cp.fyre.ibm.com Upgradetesting]# [root@api.cnsa-saurabhwani1213.cp.fyre.ibm.com Upgradetesting]# oc get pods NAME READY STATUS RESTARTS AGE csi-scale-fsetdemo-pod-1 1/1 Running 0 3m52s
root@csi-scale-fsetdemo-pod-1:/# cd /usr/share/nginx/html/scale root@csi-scale-fsetdemo-pod-1:/usr/share/nginx/html/scale# touch test{1..10} root@csi-scale-fsetdemo-pod-1:/usr/share/nginx/html/scale# ls test1 test10 test2 test3 test4 test5 test6 test7 test8 test9
[root@api.cnsa-saurabhwani1213.cp.fyre.ibm.com Upgradetesting]# cat snapshot.yaml apiVersion: snapshot.storage.k8s.io/v1 kind: VolumeSnapshot metadata: name: ibm-spectrum-scale-snapshot spec: volumeSnapshotClassName: ibm-spectrum-scale-snapshotclass source: persistentVolumeClaimName: scale-pvc-1
apiVersion: snapshot.storage.k8s.io/v1 kind: VolumeSnapshotClass metadata: name: ibm-spectrum-scale-snapshotclass driver: spectrumscale.csi.ibm.com parameters: snapWindow: "30" #Optional : Time in minutes (default=30) deletionPolicy: Delete
[root@api.cnsa-saurabhwani1213.cp.fyre.ibm.com Upgradetesting]# oc apply -f snapshot.yaml volumesnapshot.snapshot.storage.k8s.io/ibm-spectrum-scale-snapshot created volumesnapshotclass.snapshot.storage.k8s.io/ibm-spectrum-scale-snapshotclass created
[root@api.cnsa-saurabhwani1213.cp.fyre.ibm.com Upgradetesting]# oc get vs -w NAME READYTOUSE SOURCEPVC SOURCESNAPSHOTCONTENT RESTORESIZE SNAPSHOTCLASS SNAPSHOTCONTENT CREATIONTIME AGE ibm-spectrum-scale-snapshot false scale-pvc-1 ibm-spectrum-scale-snapshotclass snapcontent-5bba074e-da41-4901-8aa6-f1f78db36fa4 16s ibm-spectrum-scale-snapshot true scale-pvc-1 1Gi ibm-spectrum-scale-snapshotclass snapcontent-5bba074e-da41-4901-8aa6-f1f78db36fa4 10s 24s
[root@api.cnsa-saurabhwani1213.cp.fyre.ibm.com Upgradetesting]# cat shallowCopy.yaml apiVersion: v1 kind: PersistentVolumeClaim metadata: name: scale-shallow-copy-pvc-1 spec: accessModes:
[root@api.cnsa-saurabhwani1213.cp.fyre.ibm.com Upgradetesting]# oc apply -f shallowCopy.yaml persistentvolumeclaim/scale-shallow-copy-pvc-1 created [root@api.cnsa-saurabhwani1213.cp.fyre.ibm.com Upgradetesting]# oc get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE scale-pvc-1 Bound pvc-afb220f3-dfd2-43d9-8031-d6c9de8c5aed 1Gi RWX ibm-spectrum-scale-csi 13m scale-shallow-copy-pvc-1 Bound pvc-76c07f21-9663-4612-a5af-d0ebe7d012ba 1Gi ROX ibm-spectrum-scale-csi 49s
[root@remote-saurabhwani1213-2 pvc-afb220f3-dfd2-43d9-8031-d6c9de8c5aed]# ls pvc-afb220f3-dfd2-43d9-8031-d6c9de8c5aed-data snapshot-5bba074e-da41-4901-8aa6-f1f78db36fa4 [root@remote-saurabhwani1213-2 pvc-afb220f3-dfd2-43d9-8031-d6c9de8c5aed]# rm -rf snapshot-5bba074e-da41-4901-8aa6-f1f78db36fa4/
[root@api.cnsa-saurabhwani1213.cp.fyre.ibm.com Upgradetesting]# oc delete pvc scale-shallow-copy-pvc-1 persistentvolumeclaim "scale-shallow-copy-pvc-1" deleted [root@api.cnsa-saurabhwani1213.cp.fyre.ibm.com Upgradetesting]# oc describe pv pvc-76c07f21-9663-4612-a5af-d0ebe7d012ba Name: pvc-76c07f21-9663-4612-a5af-d0ebe7d012ba Labels:
Annotations: pv.kubernetes.io/provisioned-by: spectrumscale.csi.ibm.com
volume.kubernetes.io/provisioner-deletion-secret-name:
volume.kubernetes.io/provisioner-deletion-secret-namespace:
Finalizers: [kubernetes.io/pv-protection external-attacher/spectrumscale-csi-ibm-com]
StorageClass: ibm-spectrum-scale-csi
Status: Released
Claim: ibm-spectrum-scale-csi/scale-shallow-copy-pvc-1
Reclaim Policy: Delete
Access Modes: ROX
VolumeMode: Filesystem
Capacity: 1Gi
Node Affinity:
Message:
Source:
Type: CSI (a Container Storage Interface (CSI) volume source)
Driver: spectrumscale.csi.ibm.com
FSType: gpfs
VolumeHandle: 0;3;4181049054023231843;263B0B0A:6589AA52;;pvc-76c07f21-9663-4612-a5af-d0ebe7d012ba;/mnt/fs0/pvc-afb220f3-dfd2-43d9-8031-d6c9de8c5aed/.snapshots/snapshot-5bba074e-da41-4901-8aa6-f1f78db36fa4/pvc-afb220f3-dfd2-43d9-8031-d6c9de8c5aed-data
ReadOnly: false
VolumeAttributes: csi.storage.k8s.io/pv/name=pvc-76c07f21-9663-4612-a5af-d0ebe7d012ba
csi.storage.k8s.io/pvc/name=scale-shallow-copy-pvc-1
csi.storage.k8s.io/pvc/namespace=ibm-spectrum-scale-csi
storage.kubernetes.io/csiProvisionerIdentity=1703587394100-8615-spectrumscale.csi.ibm.com
volBackendFs=fs0
Events:
Type Reason Age From Message
Warning VolumeFailedDelete 58s (x2 over 59s) spectrumscale.csi.ibm.com_ibm-spectrum-scale-csi-provisioner-765d779f6b-gjkhc_b983f2f8-f0f3-4464-a094-f633e7391e29 persistentvolume pvc-76c07f21-9663-4612-a5af-d0ebe7d012ba is still attached to node worker2.cnsa-saurabhwani1213.cp.fyre.ibm.com Warning VolumeFailedDelete 18s (x3 over 47s) spectrumscale.csi.ibm.com_ibm-spectrum-scale-csi-provisioner-765d779f6b-gjkhc_b983f2f8-f0f3-4464-a094-f633e7391e29 rpc error: code = Unknown desc = unable to stat dir pvc-afb220f3-dfd2-43d9-8031-d6c9de8c5aed/snapshot-5bba074e-da41-4901-8aa6-f1f78db36fa4:[EFSSG0264C The path /var/gpfs/fs0/pvc-afb220f3-dfd2-43d9-8031-d6c9de8c5aed/snapshot-5bba074e-da41-4901-8aa6-f1f78db36fa4 does not exist.]
/scale-csi/D.1080 csisnap.tar.gz