-
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
Node Drain Metadata #10250
Node Drain Metadata #10250
Conversation
7725fe4
to
b86fd05
Compare
549e981
to
7e8a3a5
Compare
}, q) | ||
return resp, err | ||
} | ||
|
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.
needed a new method, followed the Jobs().RegisterOpts()
pattern so we'll never need to do this again 🤞
@@ -43,13 +43,13 @@ func TestHTTP_NodesList(t *testing.T) { | |||
} | |||
|
|||
// Check for the index | |||
if respW.HeaderMap.Get("X-Nomad-Index") == "" { | |||
if respW.Header().Get("X-Nomad-Index") == "" { |
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.
all of these are because HeaderMap
is deprecated, thought I'd clean up while I was in here
some test comments
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
resolves #9928
This persists information about the last "drain operation" in a new
Node.LastDrain
field. A "drain operation" begins when the node begins draining, and ends when the drain is complete or canceled. A new drain operation will overwrite any existingNode.LastDrain
field.In addition to native metadata about the drain operation (start time, status, end time), operators can provide additional key/value pairs about the drain operation:
.Meta
field in the drain payload-meta
flag or the-m
git-style shortcut (which is a shortcut forMeta.message
orMeta.cancel_message
, appropriately)The work in this PR performs the following:
LastDrain
instructs.Node
andapi.Node
LastDrain
LastDrain
and drain metadata during drain updates-m
and-meta