From 7dcb2f22f5077e20cffb43cfe9fc6a1b030b54bd Mon Sep 17 00:00:00 2001 From: Michael Gaffney Date: Tue, 15 Oct 2019 15:48:23 -0400 Subject: [PATCH] core: add hook for initializing seals for migration (#7666) * core: add hook for initializing seals for migration Needed in enterprise version. --- vault/core.go | 1 + vault/core_util.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/vault/core.go b/vault/core.go index 7f8cf76e79c5..127ac47899a5 100644 --- a/vault/core.go +++ b/vault/core.go @@ -1912,6 +1912,7 @@ func (c *Core) SetSealsForMigration(migrationSeal, newSeal, unwrapSeal Seal) { c.seal = newSeal c.seal.SetCore(c) c.logger.Warn("entering seal migration mode; Vault will not automatically unseal even if using an autoseal", "from_barrier_type", c.migrationSeal.BarrierType(), "to_barrier_type", c.seal.BarrierType()) + c.initSealsForMigration() } } diff --git a/vault/core_util.go b/vault/core_util.go index cd7c8113201b..a6a1dc86a74b 100644 --- a/vault/core_util.go +++ b/vault/core_util.go @@ -116,3 +116,5 @@ func (c *Core) removeAllPerfStandbySecondaries() {} func (c *Core) perfStandbyClusterHandler() (*replication.Cluster, *cache.Cache, chan struct{}, error) { return nil, cache.New(2*cluster.HeartbeatInterval, 1*time.Second), make(chan struct{}), nil } + +func (c *Core) initSealsForMigration() {}