Skip to content

Commit

Permalink
Log out detailed node mismatch message
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentportella committed Aug 27, 2024
1 parent 44ce978 commit 3533aeb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/controller/cyclenoderequest/transitioner/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3533aeb

Please sign in to comment.