From 10ab224ecb2b5ae541d725a0365d9cbd0a00d8dd Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Tue, 19 Dec 2017 16:06:48 -0500 Subject: [PATCH] Bust recovery cache after unsealed is set true to force migration --- vault/core.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vault/core.go b/vault/core.go index ba3a6898486b..01bf56ba1635 100644 --- a/vault/core.go +++ b/vault/core.go @@ -1218,6 +1218,12 @@ func (c *Core) unsealInternal(masterKey []byte) (bool, error) { // Success! c.sealed = false + + // Force a cache bust here, which will also run migration code + if c.seal.RecoveryKeySupported() { + c.seal.SetRecoveryConfig(nil) + } + if c.ha != nil { sd, ok := c.ha.(physical.ServiceDiscovery) if ok {