alibaba-cloud-csi-driver
alibaba-cloud-csi-driver copied to clipboard
disk: create snapshot even if VolumeSnapshot is deleted
What type of PR is this?
/kind bug
What this PR does / why we need it:
So that the VolumeSnapshotContent can be deleted eventually, instead of retrying infinitely.
Which issue(s) this PR fixes:
Fixes:
E0323 16:06:48.148596 1872601 utils.go:101] GRPC error: rpc error: code = Internal desc = failed to get VolumeSnapshot: snapshotting-3919/snapshot-2trth: volumesnapshots.snapshot.storage.k8s.io "snapshot-2trth" not found
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Fix that VolumeSnapshotContent may stuck if VolumeSnapshot is deleted before snapshot is created.
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
Hi @huww98. Thanks for your PR.
I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test
on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test
label.
I understand the commands that are listed here.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: huww98 Once this PR has been reviewed and has the lgtm label, please assign mowangdk for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment
/ok-to-test
Closing this. I suspect this is bug in external-snapshotter. Returning Internal should indicate the snapshot is not-yet-created, and the volumesnapshotcontent object is safe to delete.
I finally found out that, after a VolumeSnapshot with retain policy being deleted, the VolumeSnapshotContent object will not be deleted, and sidecar will continue to retry CreateSnapshot. So this PR may still necessary.
This is not nessesary if https://github.com/kubernetes-csi/external-snapshotter/pull/1064 get approved.