Skip to content

Commit

Permalink
Merge pull request #90 from atlassian-labs/vportella/log-out-mismatch…
Browse files Browse the repository at this point in the history
…-message

Log out detailed node mismatch message
  • Loading branch information
vincentportella authored Aug 27, 2024
2 parents 44ce978 + 05c5f3f commit dc71b47
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions pkg/controller/cyclenoderequest/transitioner/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,10 +506,17 @@ func (t *CycleNodeRequestTransitioner) logProblemNodes(nodesNotInCloudProviderNo
offendingNodesInfo += strings.Join(providerIDs, ",")
}

t.rm.LogEvent(t.cycleNodeRequest, "NodeStateInvalid",
"instances missing: %v, kube nodes missing: %v. %v",
len(nodesNotInCloudProviderNodegroup), len(instancesNotInKube), offendingNodesInfo,
message := fmt.Sprintf(
"instances missing from cloud provider nodegroup: %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 dc71b47

Please sign in to comment.