Why CDI is using VolumeSnapshotClass of another storage class while taking PVC snapshot in OpenShift Virtualization?
Issue
- There are two storage classes in the cluster and both are having the same provisioner:
# oc get sc sc-gold -o yaml |yq '.provisioner'
hspc.csi.hitachi.com
# oc get sc sc-silver -o yaml |yq '.provisioner'
hspc.csi.hitachi.com
- There are corresponding VolumeSnapshotClass for each StorageClass with the same driver name:
# oc get volumesnapshotclasses.snapshot.storage.k8s.io snapshotclass-gold -o json | jq '.driver'
"hspc.csi.hitachi.com"
# oc get volumesnapshotclasses.snapshot.storage.k8s.io snapshotclass-silver -o json | jq '.driver'
"hspc.csi.hitachi.com"
- While taking the snapshot for a PVC in storage class sc-gold, CDI is incorrectly picking the VolumeSnapshotClass of sc-silver. Because of this, the snapshot is not working.
Environment
- Red Hat OpenShift Virtualization 4.11, 4.12, 4.13, 4.14.
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.