From 09f9068e22f762da123160233518b440e00bdb3b Mon Sep 17 00:00:00 2001 From: Vishal Nayak Date: Tue, 26 Jan 2021 14:57:31 -0500 Subject: [PATCH] Backport: Fix remove peers check (#10758) (#10782) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add list peers to DR secondaries (#10746) * Fix build (#10749) * Move the declaration to a OSS build tag file to not have it collide w… (#10750) * Move the declaration to a OSS build tag file to not have it collide with ent declarations * Add comment * Remove comment to trigger ci * Fix remove peers check (#10758) --- vault/logical_system_helpers.go | 4 ---- vault/logical_system_raft.go | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/vault/logical_system_helpers.go b/vault/logical_system_helpers.go index 8ee1fea79d48..d2e27eba7e6e 100644 --- a/vault/logical_system_helpers.go +++ b/vault/logical_system_helpers.go @@ -92,10 +92,6 @@ var ( } checkRaw = func(b *SystemBackend, path string) error { return nil } - - wrapHandleRaftRemovePeer = func(b *SystemBackend) framework.OperationFunc { - return b.handleRaftRemovePeerUpdate() - } ) // tuneMount is used to set config on a mount point diff --git a/vault/logical_system_raft.go b/vault/logical_system_raft.go index 72f468c6d002..ee6ecb3d2239 100644 --- a/vault/logical_system_raft.go +++ b/vault/logical_system_raft.go @@ -82,7 +82,7 @@ func (b *SystemBackend) raftStoragePaths() []*framework.Path { Operations: map[logical.Operation]framework.OperationHandler{ logical.UpdateOperation: &framework.PathOperation{ - Callback: wrapHandleRaftRemovePeer(b), + Callback: b.verifyDROperationToken(b.handleRaftRemovePeerUpdate(), false), Summary: "Remove a peer from the raft cluster.", }, },