Added comments to changes the error message
This commit is contained in:
parent
f1facb0f9f
commit
a10888f1f1
|
@ -1183,9 +1183,14 @@ func (c *Core) Seal(token string) (retErr error) {
|
|||
}
|
||||
}
|
||||
if err != nil {
|
||||
// Since there is no token store in standby nodes, sealing cannot
|
||||
// be done. Ideally, the request has to be forwarded to leader node
|
||||
// for validation and the operation should be performed. But for now,
|
||||
// just returning with an error and recommending a vault restart, which
|
||||
// essentially does the same thing.
|
||||
if c.standby {
|
||||
c.logger.Printf("[ERR] core: cannot seal the vault in standby mode")
|
||||
return errors.New("Vault cannot be sealed in standby mode")
|
||||
c.logger.Printf("[ERR] core: vault cannot be sealed when in standby mode; please restart instead")
|
||||
return errors.New("vault cannot be sealed when in standby mode; please restart instead")
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue