From 3533aebe565848d1ed5575eb8e10660274214c46 Mon Sep 17 00:00:00 2001 From: vportella Date: Tue, 27 Aug 2024 11:30:41 +1000 Subject: [PATCH] Log out detailed node mismatch message --- pkg/controller/cyclenoderequest/transitioner/util.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/controller/cyclenoderequest/transitioner/util.go b/pkg/controller/cyclenoderequest/transitioner/util.go index 5a0ba55..996decf 100644 --- a/pkg/controller/cyclenoderequest/transitioner/util.go +++ b/pkg/controller/cyclenoderequest/transitioner/util.go @@ -506,10 +506,14 @@ func (t *CycleNodeRequestTransitioner) logProblemNodes(nodesNotInCloudProviderNo offendingNodesInfo += strings.Join(providerIDs, ",") } - t.rm.LogEvent(t.cycleNodeRequest, "NodeStateInvalid", - "instances missing: %v, kube nodes missing: %v. %v", + message := fmt.Sprintf("instances missing: %v, kube nodes missing: %v. %v", len(nodesNotInCloudProviderNodegroup), len(instancesNotInKube), offendingNodesInfo, ) + + // Send to both so because this is important info that needs to be found + // more easily + t.rm.Logger.Info(message) + t.rm.LogEvent(t.cycleNodeRequest, "NodeStateInvalid", message) } // validateInstanceState performs final validation on the nodegroup to ensure