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.
When we try to restore snapshot with readonlymany(shallow copy volume creation) from local filesystem to remote filesystem then that is not supported currently and vice versa. This can be improvement in shallow copy feature.
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: ibm-spectrum-scale-csi-remote
provisioner: spectrumscale.csi.ibm.com
parameters:
volBackendFs: "remotetest"
reclaimPolicy: Delete
k8s# oc apply -f shallowcopy.yaml
pod/csi-scale-fsetdemo-pod-remote created
persistentvolumeclaim/scale-advance-pvc-remote created
storageclass.storage.k8s.io/ibm-spectrum-scale-csi-remote created
6. Check the shallow copy PVC description
k8s# oc get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
scale-advance-pvc-remote Pending ibm-spectrum-scale-csi-remote 3m25s
scale-pvc-1 Bound pvc-8b4f6188-9699-4f2a-a9ac-e9b6e6550aa6 1Gi RWX ibm-spectrum-scale-csi 10m
k8s# oc describe pvc scale-advance-pvc-remote
Name: scale-advance-pvc-remote
Namespace: ibm-spectrum-scale-csi-driver
StorageClass: ibm-spectrum-scale-csi-remote
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
DataSource:
APIGroup: snapshot.storage.k8s.io
Kind: VolumeSnapshot
Name: ibm-spectrum-scale-snapshot
Used By: csi-scale-fsetdemo-pod-remote
Events:
Type Reason Age From Message
Warning ProvisioningFailed 3m34s persistentvolume-controller storageclass.storage.k8s.io "ibm-spectrum-scale-csi-remote" not found
Normal Provisioning 13s (x9 over 3m23s) spectrumscale.csi.ibm.com_ibm-spectrum-scale-csi-provisioner-c48d8df47-hbxl2_d3cb0bfd-0768-460b-9e90-1f5e1f417736 External provisioner is provisioning volume for claim "ibm-spectrum-scale-csi-driver/scale-advance-pvc-remote"
Normal ExternalProvisioning 8s (x15 over 3m23s) persistentvolume-controller waiting for a volume to be created, either by external provisioner "spectrumscale.csi.ibm.com" or manually created by system administrator
Warning ProvisioningFailed 2s (x9 over 3m17s) spectrumscale.csi.ibm.com_ibm-spectrum-scale-csi-provisioner-c48d8df47-hbxl2_d3cb0bfd-0768-460b-9e90-1f5e1f417736 failed to provision volume with StorageClass "ibm-spectrum-scale-csi-remote": rpc error: code = Unimplemented desc = creating volume from snapshot across clusters is not supported
k8s#
## Expected behavior
Shallow copy should be created in cross cluster as there is no copy operation
## Logs
scale-csi/D.1078
csisnap.tar.gz
we are not adding support for cross cluster shallow copy creation in CSI 2.11.0 and it will give error as creating volume from snapshot across clusters is not supported
Describe the bug
When we try to restore snapshot with readonlymany(shallow copy volume creation) from local filesystem to remote filesystem then that is not supported currently and vice versa. This can be improvement in shallow copy feature.
How to Reproduce?
Install CSI 2.11 with driver images from #1067 :
Create PVC on local cluster :
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: "fs1" reclaimPolicy: Delete k8s# oc apply -f apply.yaml pod/csi-scale-fsetdemo-pod-1 created persistentvolumeclaim/scale-pvc-1 created storageclass.storage.k8s.io/ibm-spectrum-scale-csi created
k8s# oc get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE scale-pvc-1 Bound pvc-8b4f6188-9699-4f2a-a9ac-e9b6e6550aa6 1Gi RWX ibm-spectrum-scale-csi 98s k8s# oc get pods NAME READY STATUS RESTARTS AGE csi-scale-fsetdemo-pod-1 1/1 Running 0 102s 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
k8s# 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 k8s# 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
k8s# cat shallowcopy.yaml apiVersion: v1 kind: Pod metadata: name: csi-scale-fsetdemo-pod-remote labels: app: nginx spec: containers:
apiVersion: v1 kind: PersistentVolumeClaim metadata: name: scale-advance-pvc-remote spec: accessModes:
apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: ibm-spectrum-scale-csi-remote provisioner: spectrumscale.csi.ibm.com parameters: volBackendFs: "remotetest" reclaimPolicy: Delete k8s# oc apply -f shallowcopy.yaml pod/csi-scale-fsetdemo-pod-remote created persistentvolumeclaim/scale-advance-pvc-remote created storageclass.storage.k8s.io/ibm-spectrum-scale-csi-remote created
k8s# oc get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE scale-advance-pvc-remote Pending ibm-spectrum-scale-csi-remote 3m25s scale-pvc-1 Bound pvc-8b4f6188-9699-4f2a-a9ac-e9b6e6550aa6 1Gi RWX ibm-spectrum-scale-csi 10m k8s# oc describe pvc scale-advance-pvc-remote Name: scale-advance-pvc-remote Namespace: ibm-spectrum-scale-csi-driver StorageClass: ibm-spectrum-scale-csi-remote 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
DataSource:
APIGroup: snapshot.storage.k8s.io
Kind: VolumeSnapshot
Name: ibm-spectrum-scale-snapshot
Used By: csi-scale-fsetdemo-pod-remote
Events:
Type Reason Age From Message
Warning ProvisioningFailed 3m34s persistentvolume-controller storageclass.storage.k8s.io "ibm-spectrum-scale-csi-remote" not found Normal Provisioning 13s (x9 over 3m23s) spectrumscale.csi.ibm.com_ibm-spectrum-scale-csi-provisioner-c48d8df47-hbxl2_d3cb0bfd-0768-460b-9e90-1f5e1f417736 External provisioner is provisioning volume for claim "ibm-spectrum-scale-csi-driver/scale-advance-pvc-remote" Normal ExternalProvisioning 8s (x15 over 3m23s) persistentvolume-controller waiting for a volume to be created, either by external provisioner "spectrumscale.csi.ibm.com" or manually created by system administrator Warning ProvisioningFailed 2s (x9 over 3m17s) spectrumscale.csi.ibm.com_ibm-spectrum-scale-csi-provisioner-c48d8df47-hbxl2_d3cb0bfd-0768-460b-9e90-1f5e1f417736 failed to provision volume with StorageClass "ibm-spectrum-scale-csi-remote": rpc error: code = Unimplemented desc = creating volume from snapshot across clusters is not supported k8s#