mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Set node eligibility to true when old client calls disable
This commit is contained in:
@@ -124,6 +124,9 @@ func (s *HTTPServer) nodeToggleDrain(resp http.ResponseWriter, req *http.Request
|
||||
drainRequest.DrainSpec = &api.DrainSpec{
|
||||
Deadline: -1 * time.Second,
|
||||
}
|
||||
} else {
|
||||
// If drain is disabled on an old client, mark the node as eligible for backwards compatibility
|
||||
drainRequest.MarkEligible = true
|
||||
}
|
||||
} else {
|
||||
if err := decodeBody(req, &drainRequest); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user