From d3a2cc54bed856540fa6419b93e361b95deb3db9 Mon Sep 17 00:00:00 2001 From: Marcell Sevcsik Date: Mon, 16 Sep 2024 15:00:07 +0200 Subject: [PATCH] Add no-communication-hosts handling The logmodule also relays on the oneagent connection-info --- pkg/controllers/dynakube/controller.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/controllers/dynakube/controller.go b/pkg/controllers/dynakube/controller.go index 35faea4bb6..dadfa9b95f 100644 --- a/pkg/controllers/dynakube/controller.go +++ b/pkg/controllers/dynakube/controller.go @@ -355,6 +355,14 @@ func (controller *Controller) reconcileComponents(ctx context.Context, dynatrace err = logModuleReconciler.Reconcile(ctx) if err != nil { + if errors.Is(err, oaconnectioninfo.NoOneAgentCommunicationHostsError) { + // missing communication hosts is not an error per se, just make sure next the reconciliation is happening ASAP + // this situation will clear itself after AG has been started + controller.setRequeueAfterIfNewIsShorter(fastUpdateInterval) + + return goerrors.Join(componentErrors...) + } + log.Info("could not reconcile LogModule") componentErrors = append(componentErrors, err)