From 98157b8a4e90545a2442fcc5000b14ac11edc394 Mon Sep 17 00:00:00 2001 From: Blake Devcich Date: Wed, 13 Nov 2024 15:15:20 -0600 Subject: [PATCH] add block --- internal/controller/nnf_storage_controller.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/controller/nnf_storage_controller.go b/internal/controller/nnf_storage_controller.go index 47083452..6679cea6 100644 --- a/internal/controller/nnf_storage_controller.go +++ b/internal/controller/nnf_storage_controller.go @@ -1093,6 +1093,10 @@ func (r *NnfStorageReconciler) teardownStorage(ctx context.Context, storage *nnf return nodeStoragesExist, err } + if !ost0DeleteStatus.Complete() { + return nodeStoragesExist, nil + } + ostDeleteStatus, err := dwsv1alpha2.DeleteChildrenWithLabels(ctx, r.Client, childObjects, storage, client.MatchingLabels{nnfv1alpha3.AllocationSetLabel: "ost"}) if err != nil { return nodeStoragesExist, err @@ -1112,7 +1116,7 @@ func (r *NnfStorageReconciler) teardownStorage(ctx context.Context, storage *nnf } } - if !ost0DeleteStatus.Complete() || !ostDeleteStatus.Complete() || !mdtDeleteStatus.Complete() { + if !ostDeleteStatus.Complete() || !mdtDeleteStatus.Complete() { return nodeStoragesExist, nil }