What steps did you take and what happened:
In case, when the snapshot is not created correctly on the API level and CreateSnapshot returns an error (e.g. quota limit issue), velero still tries to delete a snapshot with empty ProviderSnapshotID
velero-plugin-openstack returns an empty string and an error: https://github.com/Lirt/velero-plugin-for-openstack/blob/edc05cfa95f000a82233079e4396bca36375324d/src/cinder/block_store.go#L556-L560
the error just logged and the snapshotID is not set
https://github.com/vmware-tanzu/velero/blob/7688579f75c4e2032b5ec3ebf0068a89e0a1f9f1/pkg/backup/item_backupper.go#L668-L675
then an empty snapshotID is being passed to the velero plugin
https://github.com/vmware-tanzu/velero/blob/7688579f75c4e2032b5ec3ebf0068a89e0a1f9f1/pkg/controller/backup_deletion_controller.go#L314-L316
We see a number of snapshot delete calls with an empty snapshotID, all of them produce 404, and correctly handled by the plugin, but these API calls can be avoided if velero handle them correctly and skip the DeleteSnapshot call.
What did you expect to happen:
I expect velero to handle an empty snapshot.Status.ProviderSnapshotID string correctly and don't call the volumeSnapshotter.DeleteSnapshot() with an empty argument.
Alternatively I can implement a check for an empty snapshotID in the velero plugin code, but this seems to be a temporary hook, not a final solution.
Environment:
- Velero version (use
velero version): 1.16.2
- Velero features (use
velero client config get features):
- Kubernetes version (use
kubectl version):
- Kubernetes installer & version:
- Cloud provider or hardware configuration: OpenStack
- OS (e.g. from
/etc/os-release):
Vote on this issue!
This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.
- 👍 for "I would like to see this bug fixed as soon as possible"
- 👎 for "There are more important bugs to focus on right now"
What steps did you take and what happened:
In case, when the snapshot is not created correctly on the API level and
CreateSnapshotreturns an error (e.g. quota limit issue), velero still tries to delete a snapshot with emptyProviderSnapshotIDvelero-plugin-openstack returns an empty string and an error: https://github.com/Lirt/velero-plugin-for-openstack/blob/edc05cfa95f000a82233079e4396bca36375324d/src/cinder/block_store.go#L556-L560
the error just logged and the snapshotID is not set
https://github.com/vmware-tanzu/velero/blob/7688579f75c4e2032b5ec3ebf0068a89e0a1f9f1/pkg/backup/item_backupper.go#L668-L675
then an empty snapshotID is being passed to the velero plugin
https://github.com/vmware-tanzu/velero/blob/7688579f75c4e2032b5ec3ebf0068a89e0a1f9f1/pkg/controller/backup_deletion_controller.go#L314-L316
We see a number of snapshot delete calls with an empty snapshotID, all of them produce 404, and correctly handled by the plugin, but these API calls can be avoided if velero handle them correctly and skip the
DeleteSnapshotcall.What did you expect to happen:
I expect velero to handle an empty
snapshot.Status.ProviderSnapshotIDstring correctly and don't call thevolumeSnapshotter.DeleteSnapshot()with an empty argument.Alternatively I can implement a check for an empty snapshotID in the velero plugin code, but this seems to be a temporary hook, not a final solution.
Environment:
velero version): 1.16.2velero client config get features):kubectl version):/etc/os-release):Vote on this issue!
This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.