Solved

K10 using the wrong VolumeSnapShotClass when multiple StorageClasses with same driver

  • 16 January 2024
  • 1 comment
  • 43 views

Userlevel 1

Hello,

 

We have K10 6.5 running with CSI storage provided by Dell Isilon CSI drivers.

 

We have 4 storageClasses with this driver (csi-isilon.dellemc.com), each using different Isilon clusters and path.

 

To match this, we have 4 VolumeSnapshotClasses with the same driver, but with different parameters.

 

Using the Snapshot option from K8s (Openshift) is working ok.

Kasten is not using the correct VolumeSnapShotClass for snpashotting the PersistentVolumes created on each storageClass.

Here I provide 2 storageClasses and VolumeSnapshotClasses :

 

StorageClass “isilon-infra”

allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
annotations:
k10.kasten.io/revalidated-at: '{"Status":"Failed","LastUpdateTime":"2024-01-16T16:11:47Z","Errors":["Failed
to validate the storage class within the time period."]}'
creationTimestamp: "2024-01-16T13:46:33Z"
labels:
vs.ch/dellcsi: vrai
name: isilon-infra
resourceVersion: "1207671684"
uid: 7337136e-7f93-4bf5-ba94-9d888b517a17
mountOptions:
- nfsvers=3
parameters:
AccessZone: infra-a
AzServiceIP: itcm-fss01.infra.vs.ch
ClusterName: itcm-fs
IsiPath: /ifs/data/infra/csi/ocs
IsiVolumePathPermissions: "777"
RootClientEnabled: "true"
provisioner: csi-isilon.dellemc.com
reclaimPolicy: Delete
volumeBindingMode: Immediate

StorageClass “isilon-police” :

 

allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
creationTimestamp: "2024-01-16T13:46:34Z"
labels:
vs.ch/dellcsi: vrai
name: isilon-police
resourceVersion: "1207563012"
uid: 84588d55-924d-40c9-bb79-4393941454f9
mountOptions:
- nfsvers=3
parameters:
AccessZone: police-b
AzServiceIP: itcp-fss02.infrapol.vs.ch
ClusterName: itcp-fs
IsiPath: /ifs/data/police/csi/ocs
IsiVolumePathPermissions: "777"
RootClientEnabled: "true"
provisioner: csi-isilon.dellemc.com
reclaimPolicy: Delete
volumeBindingMode: Immediate

volumesnapshotclass isilon-infra :

 

apiVersion: snapshot.storage.k8s.io/v1
deletionPolicy: Delete
driver: csi-isilon.dellemc.com
kind: VolumeSnapshotClass
metadata:
annotations:
k10.kasten.io/is-snapshot-class: "true"
creationTimestamp: "2024-01-16T14:40:37Z"
generation: 1
labels:
vs.ch/dellcsi: vrai
name: isilon-infra
resourceVersion: "1207602354"
uid: f7fee19c-cbd4-4507-b874-f8ead77c0de5
parameters:
IsiPath: /ifs/data/infra/csi/ocs

volumesnapshotclass isilon-police :

apiVersion: snapshot.storage.k8s.io/v1
deletionPolicy: Delete
driver: csi-isilon.dellemc.com
kind: VolumeSnapshotClass
metadata:
annotations:
k10.kasten.io/is-snapshot-class: "true"
creationTimestamp: "2024-01-16T14:40:38Z"
generation: 1
labels:
vs.ch/dellcsi: vrai
name: isilon-police
resourceVersion: "1207602367"
uid: fcd70a77-3404-4edc-a43d-3dc6846a5041
parameters:
IsiPath: /ifs/data/police/csi/ocs

As you can see, the IsiPath are different to make it work. However K10 is not using the correct one :

When taking a snapshot from a PV created on storageClass “isilon-police”, K10 is using the wrong VolumeSnapshotClass “isilon-infra”, which fails

oc get volumeSnapshot k10-csi-snap-4fpz6wlgj584nrps
NAME READYTOUSE SOURCEPVC SOURCESNAPSHOTCONTENT RESTORESIZE SNAPSHOTCLASS SNAPSHOTCONTENT CREATIONTIME AGE
k10-csi-snap-4fpz6wlgj584nrps false pol01 isilon-infra snapcontent-60c97427-2c19-464d-98b8-67b0bb4123be 35m

We can clearly see that K10 is using the wrong VolumeSnapshotClass “isilon-infra” to snapshot a PV from storageClass “isilon-police”.

Is there any way to link StorageClasses to VolumeSnapshotClasses ?

icon

Best answer by jaiganeshjk 16 January 2024, 17:36

View original

1 comment

Userlevel 6
Badge +2

Hi @yvanbroccard , Thank you for posting this question here.

Yes, Instead of annotating the volumeSnapshotClass, you will have to annotate the storageClass with the annotation as specified in the documentation https://docs.kasten.io/latest/install/storage.html#storageclass-configuration

 

You will need to remove the annotations from all the volumeSnapshotClass and then annotate each storageClass with the corresponding volumeSnapshotClass name

 

k10.kasten.io/volume-snapshot-class=${VSC_NAME}

Comment