alibaba-cloud-csi-driver icon indicating copy to clipboard operation
alibaba-cloud-csi-driver copied to clipboard

disk: create snapshot even if VolumeSnapshot is deleted

Open huww98 opened this issue 4 months ago • 6 comments

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.:


huww98 avatar Mar 23 '24 09:03 huww98

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.

k8s-ci-robot avatar Mar 23 '24 09:03 k8s-ci-robot

[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.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

k8s-ci-robot avatar Mar 23 '24 09:03 k8s-ci-robot

/ok-to-test

huww98 avatar Apr 10 '24 12:04 huww98

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.

huww98 avatar Apr 11 '24 09:04 huww98

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.

huww98 avatar Apr 11 '24 14:04 huww98

This is not nessesary if https://github.com/kubernetes-csi/external-snapshotter/pull/1064 get approved.

huww98 avatar Apr 15 '24 03:04 huww98