Skip to content

Commit

Permalink
storage/raft: Refresh TLS keyring on snapshot restore (#8546)
Browse files Browse the repository at this point in the history
  • Loading branch information
briankassouf authored and Brian Kassouf committed Mar 13, 2020
1 parent c6ff7ac commit c515f59
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions vault/raft.go
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,12 @@ func (c *Core) raftSnapshotRestoreCallback(grabLock bool, sealNode bool) func(co
// Purge the cache so we make sure we are operating on fresh data
c.physicalCache.Purge(ctx)

// Refresh the raft TLS keys
if err := c.checkRaftTLSKeyUpgrades(ctx); err != nil {
c.logger.Info("failed to perform TLS key upgrades, sealing", "error", err)
return err
}

// Reload the keyring in case it changed. If this fails it's likely
// we've changed master keys.
err := c.performKeyUpgrades(ctx)
Expand Down

0 comments on commit c515f59

Please sign in to comment.