Start a Conversation

Unsolved

S

5 Posts

1827

September 3rd, 2020 14:00

Issue where volumeSnapshots have 'ReadyToUse' field set to false.

Hi,

I ran into an issue when I create a VolumeSnapshotContent and a VolumeSnapshot. The volumeSnapshot never enters the 'ReadyToUse: True' state. Here is an example of the VolumeSnapshot- 

- apiVersion: snapshot.storage.k8s.io/v1alpha1
  kind: VolumeSnapshot
  metadata:
    creationTimestamp: "2020-09-01T20:15:49Z"
    finalizers:
    - snapshot.storage.kubernetes.io/volumesnapshot-protection
    generation: 2
    name: <>
    namespace: <>
    resourceVersion: <>
    selfLink: <>
    uid: <>
  spec:
    snapshotClassName:<>
    snapshotContentName: <>
    source: null
  status:
    creationTime: "2020-09-01T19:26:46Z"
    readyToUse: false
    restoreSize: 80Gi

 

After some debugging, I observed that the csi-snapshotter attempts to reconcile the volumesnapshot with the content periodically.

It attempts to get the underlying Snapshot status by performing a ListSnapshots operation. https://github.com/kubernetes-csi/external-snapshotter/blob/d24d2b9820079c6658e1078d59071aebb6e0d467/pkg/snapshotter/snapshotter.go#L132

This call succeeds but doesn't set the 'ReadyToUse' field. It results in default 'False' value and never marks the VolumeSnapshot as 'ReadyToUse' 

Reference to ListSnapshots->getCSISnapshot  Operation - https://github.com/dell/csi-vxflexos/blob/2facca1c4ff7256763b0b2d892b1ff2880156fd5/service/service.go#L320

An example of how others implement this- https://github.com/kubernetes-sigs/aws-ebs-csi-driver/blob/b0079ef15ef984ab550fd5bc709f6a3fd5cc1cdd/pkg/cloud/cloud.go#L628

2 Intern

 • 

167 Posts

September 4th, 2020 05:00

Hello & welcome to the forum,

What driver are talking about ? I don't see any Volume Snapshot Class defined here.

Can you share your YAML definitions as well ?

Let me know.

5 Posts

September 4th, 2020 09:00

@Flo_csI Thanks for the response!

Here is the VolumeSnapshotClass, the driver being - csi-vxflexos.dellemc.com

- apiVersion: snapshot.storage.k8s.io/v1alpha1
  kind: VolumeSnapshotClass
  metadata:
    annotations:
      k10.kasten.io/is-snapshot-class: "true"
    creationTimestamp: "2020-06-30T14:31:32Z"
    generation: 1
    name: vxflexos-snapclass
    resourceVersion: <>
    selfLink: /apis/snapshot.storage.k8s.io/v1alpha1/volumesnapshotclasses/vxflexos-snapclass
    uid: <>
  snapshotter: csi-vxflexos.dellemc.com

 

I've also created a PR with my proposed changes- https://github.com/dell/csi-vxflexos/pull/11

Let me know if there are any other details you'd like.

5 Posts

September 4th, 2020 10:00

Additionally I wanted to mention that we are using the "pre-provisioning volume snapshots" workflow -

 

VolumeSnapshotSpec has a required Source field. Source may be either a PersistentVolumeClaimName (if dynamically provisioning a snapshot) or VolumeSnapshotContentName (if pre-provisioning a snapshot).
VolumeSnapshotContentSpec has a required Source field. This Source may be either a VolumeHandle (if dynamically provisioning a snapshot) or a SnapshotHandle (if pre-provisioning volume snapshots).

 

source (https://kubernetes-csi.github.io/docs/snapshot-restore-feature.html)

This works as expected in the Isilon CSI driver (since ListSnapshots is not implemented) -  https://github.com/dell/csi-isilon/blob/d59d971be81a6f461a4e8836d6f73cfab632b150/service/controller.go#L670

5 Posts

September 17th, 2020 13:00

@Flo_csI Any update on this issue?

No Events found!

Top