From 20eadd350b4f94d7615131f9550dbde53eedd68b Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Thu, 25 May 2017 11:55:40 -0400 Subject: [PATCH] Have step-down request forward. Unlike seal, this command has no meaning other than on the active node, so when issuing it the expected behavior would be for whichever node is currently active to step down. --- CHANGELOG.md | 5 +++++ http/handler.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00a858a6cafb..09d795440a6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ ## Next (Unreleased) +DEPRECATIONS/CHANGES: + + * Step-Down is Forwarded: When a step-down is issued against a non-active node + in an HA cluster, it will now forward the request to the active node. + IMPROVEMENTS: * plugins/databases: Add MongoDB as an internal database plugin. [GH-2698] diff --git a/http/handler.go b/http/handler.go index 9c5a871985d6..845cabaa8979 100644 --- a/http/handler.go +++ b/http/handler.go @@ -46,7 +46,7 @@ func Handler(core *vault.Core) http.Handler { mux.Handle("/v1/sys/init", handleSysInit(core)) mux.Handle("/v1/sys/seal-status", handleSysSealStatus(core)) mux.Handle("/v1/sys/seal", handleSysSeal(core)) - mux.Handle("/v1/sys/step-down", handleSysStepDown(core)) + mux.Handle("/v1/sys/step-down", handleRequestForwarding(core, handleSysStepDown(core))) mux.Handle("/v1/sys/unseal", handleSysUnseal(core)) mux.Handle("/v1/sys/renew", handleRequestForwarding(core, handleLogical(core, false, nil))) mux.Handle("/v1/sys/renew/", handleRequestForwarding(core, handleLogical(core, false, nil)))