Solved

CSI Provisioner doesn't have VolumeSnapshotClass - Error


Userlevel 1

Running the https://docs.kasten.io/tools/k10_primer.sh  for Kasten 10 I eventually get 

Validating Provisioners: 
driver.longhorn.io:
  Is a CSI Provisioner  -  OK
  CSI Provisioner doesn't have VolumeSnapshotClass  -  Error
  Storage Classes:
    longhorn
      Valid Storage Class  -  OK

 

I’m running Longhorn 1.2.4 and according to this (https://kubernetes-csi.github.io/docs/drivers.html) it looks like I need v1.5 for a CSI driver? But Longhorn only goes up to 1.4.0. How do I get this rectified? This product looks extremely useful for our environment.

icon

Best answer by Geoff Burke 14 March 2023, 20:45

View original

7 comments

Userlevel 1

Awesome, thank you so much. That got me through the tests!

Userlevel 7
Badge +16

Not sure if @Geoff Burke or @michaelcade can give you an assist or not @embroidery-library ?

Userlevel 7
Badge +22

I believe you have to add the volumesnapshotclass:

 

https://longhorn.io/docs/1.4.1/snapshots-and-backups/csi-snapshot-support/csi-volume-snapshot-associated-with-longhorn-snapshot/

Userlevel 7
Badge +22

Make sure to set the type to snap not bak. Also I personally had issues with longhorn recently but did not follow through since it was not mission critical. Also on your version there is this version:
|https://github.com/longhorn/longhorn/issues/2194#issuecomment-763476468

Userlevel 1

Alright, after applying that yaml, I now get 

Validating Provisioners: 
driver.longhorn.io:
  Is a CSI Provisioner  -  OK
  At least 1 VolumeSnapshotClass needs the k10.kasten.io/is-snapshot-class annotation set to true.  -  Error

What did I miss?

Userlevel 7
Badge +22

You need to annotate the snapshotclass:
 

kubectl annotate volumesnapshotclass ${VSC_NAME} \    k10.kasten.io/is-snapshot-class=true
Userlevel 7
Badge +22

So in your case 

 

kubectl annotate volumesnapshotclass longhorn \
    k10.kasten.io/is-snapshot-class=true

Comment