Skip to content

Commit

Permalink
core: add hook for initializing seals for migration (#7666)
Browse files Browse the repository at this point in the history
* core: add hook for initializing seals for migration

Needed in enterprise version.
  • Loading branch information
mgaffney committed Oct 16, 2019
1 parent fde806b commit 7dcb2f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions vault/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}

Expand Down
2 changes: 2 additions & 0 deletions vault/core_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}

0 comments on commit 7dcb2f2

Please sign in to comment.