From 2464b02aa2a155221d8a043bbc65a1831fdfb3c7 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Fri, 27 Oct 2017 10:43:57 -0700 Subject: [PATCH] changelog + PUT --- CHANGELOG.md | 1 + command/agent/node_endpoint.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9083d2e3d..48afc2b50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ IMPROVEMENTS: * core/enterprise: Sentinel integration for fine grain policy enforcement. * core/enterprise: Namespace support allowing jobs and their associated objects to be isolated from each other and other users of the cluster. + * api: Allow force deregistration of a node [GH-3447] * api: New `/v1/agent/health` endpoint for health checks. * api: Metrics endpoint exposes Prometheus formatted metrics [GH-3171] * cli: Consul config option flags for nomad agent command [GH-3327] diff --git a/command/agent/node_endpoint.go b/command/agent/node_endpoint.go index 5c173346c..1cb3c881c 100644 --- a/command/agent/node_endpoint.go +++ b/command/agent/node_endpoint.go @@ -147,7 +147,7 @@ func (s *HTTPServer) nodeQuery(resp http.ResponseWriter, req *http.Request, } func (s *HTTPServer) nodePurge(resp http.ResponseWriter, req *http.Request, nodeID string) (interface{}, error) { - if req.Method != "POST" { + if req.Method != "PUT" && req.Method != "POST" { return nil, CodedError(405, ErrInvalidMethod) } args := structs.NodeDeregisterRequest{