Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a log line to help track node eligibility #14125

Merged
merged 4 commits into from
Sep 6, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions nomad/node_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,7 @@ func (n *Node) UpdateDrain(args *structs.NodeUpdateDrainRequest,
// If the node is transitioning to be eligible, create Node evaluations
// because there may be a System job registered that should be evaluated.
if node.SchedulingEligibility == structs.NodeSchedulingIneligible && args.MarkEligible && args.DrainStrategy == nil {
n.logger.With("node_id", node.ID).Info("Node transitioning to eligible state")
Kellel marked this conversation as resolved.
Show resolved Hide resolved
evalIDs, evalIndex, err := n.createNodeEvals(node, index)
if err != nil {
n.logger.Error("eval creation failed", "error", err)
Expand Down Expand Up @@ -736,8 +737,10 @@ func (n *Node) UpdateEligibility(args *structs.NodeUpdateEligibilityRequest,
if node.SchedulingEligibility == args.Eligibility {
return nil // Nothing to do
} else if args.Eligibility == structs.NodeSchedulingEligible {
n.logger.With("node_id", node.ID).Info("Node transitioning to eligible state")
Kellel marked this conversation as resolved.
Show resolved Hide resolved
args.NodeEvent.SetMessage(NodeEligibilityEventEligible)
} else {
n.logger.With("node_id", node.ID).Info("Node transitioning to ineligible state")
Kellel marked this conversation as resolved.
Show resolved Hide resolved
args.NodeEvent.SetMessage(NodeEligibilityEventIneligible)
}

Expand Down