-
Notifications
You must be signed in to change notification settings - Fork 69
Description
After upgrade to CSI driver 3.0.0, we cannot create PVC from Volume Snapshots
:~|⇒ oc get volumesnapshotcontent -A
NAME READYTOUSE RESTORESIZE DELETIONPOLICY DRIVER VOLUMESNAPSHOTCLASS VOLUMESNAPSHOT VOLUMESNAPSHOTNAMESPACE AGE
snapcontent-a5d0c29e-d1bb-464d-9cb2-44301e9f95b3 true 161061273600 Delete csi.hpe.com hpe-snapshot elasticsearch-bss-master-elasticsearch-bss-master-0-snap test-ns 28m
|⇒ oc edit volumesnapshotcontent snapcontent-a5d0c29e-d1bb-464d-9cb2-44301e9f95b3
name: snapcontent-a5d0c29e-d1bb-464d-9cb2-44301e9f95b3
resourceVersion: "209518740"
uid: 2da35b58-1783-4497-b212-6884b6bcb04d
spec:
deletionPolicy: Delete
driver: csi.hpe.com
source:
volumeHandle: pvc-06160b6f-69b2-406a-9f86-c53b1dc32002
sourceVolumeMode: Filesystem
volumeSnapshotClassName: hpe-snapshot
volumeSnapshotRef:
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshot
name: elasticsearch-bss-master-elasticsearch-bss-master-0-snap
namespace: test-ns
resourceVersion: "209498560"
uid: a5d0c29e-d1bb-464d-9cb2-44301e9f95b3
status:
creationTime: 1756877692000000000
readyToUse: true
restoreSize: 161061273600
snapshotHandle: snapshot-a5d0c29e-d1bb-464d-9cb2-44301e9f95b3
oc get pv pvc-06160b6f-69b2-406a-9f86-c53b1dc32002
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS VOLUMEATTRIBUTESCLASS REASON AGE
pvc-06160b6f-69b2-406a-9f86-c53b1dc32002 150Gi RWO Retain Bound test-ns/elasticsearch-bss-master-elasticsearch-bss-master-0 3par-sc 113d
:~|⇒ cat test-resto.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: test-restore
spec:
dataSource:
name: snapcontent-a5d0c29e-d1bb-464d-9cb2-44301e9f95b3
kind: VolumeSnapshot
apiGroup: snapshot.storage.k8s.io
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 150Gi
:~|⇒ oc apply -f test-resto.yaml
persistentvolumeclaim/test-restore created
:~|⇒ oc get pvc | grep test
test-restore Pending 3par-sc 4s
1:~|⇒ oc describe pvc test-restore
Name: test-restore
Namespace: test-ns
StorageClass: 3par-sc
Status: Pending
Volume:
Labels:
Annotations: volume.beta.kubernetes.io/storage-provisioner: csi.hpe.com
volume.kubernetes.io/storage-provisioner: csi.hpe.com
Finalizers: [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode: Filesystem
DataSource:
APIGroup: snapshot.storage.k8s.io
Kind: VolumeSnapshot
Name: snapcontent-a5d0c29e-d1bb-464d-9cb2-44301e9f95b3
Used By:
Events:
Type Reason Age From Message
Normal Provisioning 6s (x5 over 21s) csi.hpe.com_hpdboco13.XXXXXXXX_60d86492-2066-4337-9298-5aec95ad6b89 External provisioner is provisioning volume for claim "test-ns/test-restore"
Warning ProvisioningFailed 6s (x5 over 21s) csi.hpe.com_hpdboco13.XXXXXX_60d86492-2066-4337-9298-5aec95ad6b89 failed to provision volume with StorageClass "3par-sc": error getting handle for DataSource Type VolumeSnapshot by Name snapcontent-a5d0c29e-d1bb-464d-9cb2-44301e9f95b3: error getting snapshot snapcontent-a5d0c29e-d1bb-464d-9cb2-44301e9f95b3 from api server: volumesnapshots.snapshot.storage.k8s.io "snapcontent-a5d0c29e-d1bb-464d-9cb2-44301e9f95b3" not found
Normal ExternalProvisioning 4s (x3 over 21s) persistentvolume-controller Waiting for a volume to be created either by the external provisioner 'csi.hpe.com' or manually by the system administrator. If volume creation is delayed, please verify that the provisioner is running and correctly registered.
Even though the volume snapshoft exist, it says that it cant be find.
The volume exist on 3par side as well