issue 7648:avoid snapshot leak on expose failure

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
This commit is contained in:
Lyndon-Li
2024-04-12 10:21:33 +08:00
parent 61061d5c83
commit dcf760d5f1
2 changed files with 2 additions and 2 deletions

View File

@@ -0,0 +1 @@
Fix issue #7648. Adjust the exposing logic to avoid exposing failure and snapshot leak when expose fails

View File

@@ -626,8 +626,7 @@ func TestRetainVSC(t *testing.T) {
clientObj: []runtime.Object{vscObj},
updated: &snapshotv1api.VolumeSnapshotContent{
ObjectMeta: metav1.ObjectMeta{
Name: "fake-vsc",
Finalizers: []string{volumeSnapshotContentProtectFinalizer},
Name: "fake-vsc",
},
Spec: snapshotv1api.VolumeSnapshotContentSpec{
DeletionPolicy: snapshotv1api.VolumeSnapshotContentRetain,