Set node eligibility to true when old client calls disable

This commit is contained in:
Preetha Appan
2018-05-30 16:54:07 -05:00
parent 400ca29ac9
commit bcf34c3449
2 changed files with 4 additions and 1 deletions

View File

@@ -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 {