If we have not yet completed post-unseal when running in single-node

mode, don't advertise that we are active.

Ping #872
This commit is contained in:
Jeff Mitchell 2015-12-17 13:48:08 -05:00
parent 1261791e6f
commit 4482fdacfd
1 changed files with 1 additions and 1 deletions

View File

@ -1066,13 +1066,13 @@ func (c *Core) Unseal(key []byte) (bool, error) {
// Do post-unseal setup if HA is not enabled
if c.ha == nil {
c.standby = false
if err := c.postUnseal(); err != nil {
c.logger.Printf("[ERR] core: post-unseal setup failed: %v", err)
c.barrier.Seal()
c.logger.Printf("[WARN] core: vault is sealed")
return false, err
}
c.standby = false
} else {
// Go to standby mode, wait until we are active to unseal
c.standbyDoneCh = make(chan struct{})