Unsolved
5 Posts
0
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
Flo_csI
2 Intern
•
167 Posts
0
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.
sbathina
5 Posts
0
September 4th, 2020 09:00
@Flo_csI Thanks for the response!
Here is the VolumeSnapshotClass, the driver being - 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.
sbathina
5 Posts
0
September 4th, 2020 10:00
Additionally I wanted to mention that we are using the "pre-provisioning volume snapshots" workflow -
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
sbathina
5 Posts
0
September 17th, 2020 13:00
@Flo_csI Any update on this issue?