From 0d897798b314986eb00365f5920074408753ec60 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 16 Mar 2021 10:53:02 -0700 Subject: [PATCH] pkg/cvo/sync_worker: Skip precreation of baremetal ClusterOperator This is a hack fix for [1], where we have a delay on 4.6->4.7 updates, and on some 4.7 installs, between the very early ClusterOperator precreation and the operator eventually coming up to set its status conditions. In the interim, there are no conditions, which causes cluster_operator_up to be 0, which causes the critical ClusterOperatorDown to fire. We'll want a more general fix going forward, this commit is a temporary hack to avoid firing the critical ClusterOperatorDown while we build consensus around the general fix. The downside to dropping precreates for this operator is that we lose the must-gather references when the operator fails to come up. That was what precreation was designed to address in 2a469e37c1 (cvo: When installing or upgrading, fast-fill cluster-operators, 2020-02-07, #318). If we actually get a must-gather without the bare-metal bits and we miss them, we can revisit the approach this hack is taking. Manually picked back to 4.6, which doesn't include b0f73af64f (Don't create ClusterOperator during precreation step if it's present in overrides, 2020-12-10, #488). [1]: https://bugzilla.redhat.com/show_bug.cgi?id=1929917 --- pkg/cvo/sync_worker.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/cvo/sync_worker.go b/pkg/cvo/sync_worker.go index b469de747..a5e761e41 100644 --- a/pkg/cvo/sync_worker.go +++ b/pkg/cvo/sync_worker.go @@ -699,6 +699,10 @@ func (w *SyncWorker) apply(ctx context.Context, payloadUpdate *payload.Update, w if task.Manifest.GVK != configv1.SchemeGroupVersion.WithKind("ClusterOperator") { continue } + if task.Manifest.Obj.GetName() == "baremetal" { + klog.V(4).Infof("Skipping precreation of %s, https://bugzilla.redhat.com/show_bug.cgi?id=1929917", task) + continue + } if err := w.builder.Apply(ctx, task.Manifest, payload.PrecreatingPayload); err != nil { klog.V(2).Infof("Unable to precreate resource %s: %v", task, err) continue