-
Notifications
You must be signed in to change notification settings - Fork 2k
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 node events #3945
Add node events #3945
Changes from 1 commit
365d47c
f051d43
55e0c7d
de6199a
551e96f
fc81975
56f5e66
cbbb60a
705ff98
55670c8
a72dcbf
9ef6ad0
3f561c3
6eb9911
3a1043d
319f809
57ddd51
eceabb6
8ba5ba3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,12 @@ func (n *Node) EmitEvents(args *structs.EmitNodeEventsRequest, reply *structs.Em | |
} | ||
defer metrics.MeasureSince([]string{"nomad", "client", "emit_event"}, time.Now()) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add validation that the node event map isn't isn't empty There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Return an error if there are no events |
||
if args.NodeEvents == nil { | ||
err := fmt.Errorf("No event to add; node event map is nil") | ||
n.srv.logger.Printf("[ERR] nomad.node AddNodeEventsType failed: %v", err) | ||
return err | ||
} | ||
|
||
_, index, err := n.srv.raftApply(structs.AddNodeEventsType, args) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove blank line |
||
if err != nil { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you take in whether it is in verbose mode and only emit details in verbose