-
Notifications
You must be signed in to change notification settings - Fork 385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to delete volumesnapshot if the volumesnapshotclass is deleted #412
Comments
Which version is this? I thought the problem is already fixed. |
I have tested with old version 2.x I think. I verified with the latest master it's sending a request to delete the snapshot to the CSI driver. Thanks @xing-yang One question, volumesnapshot won't be deleted until the csi snapshot or volumesnapshotcontent is deleted is that correct? |
The Alpha snapshot design was almost completely modeled after the PV/PVC design, but we made enhancements to the snapshot design when moving to Beta. We delete CSI snapshot first, then VolumeSnapshotContent, and finally VolumeSnapshot to avoid leaking resources. |
We've investigated this a bit further, and here's my summary of what's occurring: This issue is pertaining to deleting the VolumeSnapshotClass when the driver requires credentials for creation/deletion. In this case, the driver fails to remove the backend snapshot, which prevents the VolumeSnapshotContent being deleted, which prevents the VolumeSnapshot from being deleted. At this point I think we can fix the issue with the VolumeSnapshotClass being deleted and attempt to include the description in the VolumeSnapshotContent status message. The relevant sections are below:
Since we have nil credentials, the deletion request fails, and then we see this error logged from line 350. The above is my current understanding of the situation, and I'm going to attempt to submit a PR so that we can get the credentials from the VolumeSnapshotContent's annotations. |
In case of PVC deletion, nothing is blocking the PVC deletion even if the storageclass is deleted. external provisioner will send a request to the CSI driver with volumeID and no secrets will be sent as it cannot get the storageclass name. but in the case of volume snapshot, the volumesnapshot deletion will never complete as the volumesnapshotclass is already deleted. As per the CSI spec the secrets are optional parameters why external snapshotter is not sending requests to the CSI driver for delete snasphot. is this expected behavior?
The text was updated successfully, but these errors were encountered: