https://rancher.com/ logo
Title
w

witty-megabyte-20434

04/16/2023, 7:07 PM
👋 Folks, does the
harvester-csi-driver
support CSI Snapshots? I've been trying to make these work but no luck so far 😕 This is my volume snapshot class:
apiVersion: <http://snapshot.storage.k8s.io/v1|snapshot.storage.k8s.io/v1>
kind: VolumeSnapshotClass
metadata:
  name: default
driver: <http://driver.harvesterhci.io|driver.harvesterhci.io>
deletionPolicy: Retain
parameters:
  type: bak
(I also tried
<http://driver.longhorn.io|driver.longhorn.io>
) And I test it with
apiVersion: <http://snapshot.storage.k8s.io/v1|snapshot.storage.k8s.io/v1>
kind: VolumeSnapshot
metadata:
  name: test-snapshot
spec:
  volumeSnapshotClassName: default
  source:
    persistentVolumeClaimName: home-assistant-data-home-assistant-0
But it just gets stuck in waiting for snapshot to be created by csi driver:
2023-04-16 12:00:54	I0416 19:00:54.824012       1 snapshot_controller.go:638] createSnapshotContent: Creating content for snapshot home-assistant/test-snapshot through the plugin ...
2023-04-16 12:00:54	I0416 19:00:54.837378       1 snapshot_controller.go:918] Added protection finalizer to persistent volume claim home-assistant/home-assistant-data-home-assistant-0
2023-04-16 12:00:54	I0416 19:00:54.847442       1 event.go:285] Event(v1.ObjectReference{Kind:"VolumeSnapshot", Namespace:"home-assistant", Name:"test-snapshot", UID:"2bf391e6-ff0f-466b-97d7-2d2a13ef2342", APIVersion:"<http://snapshot.storage.k8s.io/v1|snapshot.storage.k8s.io/v1>", ResourceVersion:"32744110", FieldPath:""}): type: 'Normal' reason: 'CreatingSnapshot' Waiting for a snapshot home-assistant/test-snapshot to be created by the CSI driver.
2023-04-16 12:00:54	I0416 19:00:54.861963       1 snapshot_controller.go:964] Keeping PVC home-assistant/home-assistant-data-home-assistant-0, it is used by snapshot home-assistant/test-snapshot
👋 1
LOL nm 😢 https://github.com/harvester/harvester-csi-driver/blob/v1.0/pkg/csi/controller_server.go#L271-L281:
func (cs *ControllerServer) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error) {
	return nil, status.Error(codes.Unimplemented, "")
}

func (cs *ControllerServer) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error) {
	return nil, status.Error(codes.Unimplemented, "")
}

func (cs *ControllerServer) ListSnapshots(context.Context, *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error) {
	return nil, status.Error(codes.Unimplemented, "")
}
can this be implemented via the underlying longhorn's snapshot feature?
Created a feature ticket for this https://github.com/harvester/harvester/issues/3778
r

refined-analyst-8898

05/01/2023, 2:03 AM
The feature is pinned to Harvester 1.3.0 so I reckon it'll be a while. Glad I found this before I ran into the same dead end you did. I'll try the Restic filesystem backup approach with Velero instead.
w

witty-megabyte-20434

05/06/2023, 12:06 AM
Yeah the restic approach is working great. And I had to use it recently 😅