From cf05dbbbf96ca1e9ccde07638974bdc542deeb95 Mon Sep 17 00:00:00 2001 From: "Jose Rivera (Hose)" Date: Wed, 9 Aug 2023 17:30:34 -0700 Subject: [PATCH] PWX-32850: When preflight is unsupported we need to make sure we are setting the pre-flight annotation to false. (#1195) Signed-off-by: Jose Rivera --- pkg/controller/storagecluster/storagecluster.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkg/controller/storagecluster/storagecluster.go b/pkg/controller/storagecluster/storagecluster.go index 159f0d9dae..2fcb9e5006 100644 --- a/pkg/controller/storagecluster/storagecluster.go +++ b/pkg/controller/storagecluster/storagecluster.go @@ -742,12 +742,11 @@ func (c *Controller) syncStorageCluster( return fmt.Errorf("preflight check failed for StorageCluster %v/%v: %v", cluster.Namespace, cluster.Name, err) } } else { - if _, exists := cluster.Annotations[pxutil.AnnotationPreflightCheck]; !exists { - if cluster.Annotations == nil { - cluster.Annotations = make(map[string]string) - } - cluster.Annotations[pxutil.AnnotationPreflightCheck] = "false" + // Always disable preflight if not supported. + if cluster.Annotations == nil { + cluster.Annotations = make(map[string]string) } + cluster.Annotations[pxutil.AnnotationPreflightCheck] = "false" } if err := c.miscCleanUp(cluster); err != nil {