Reset quota manager during shutdown (#9331)

This commit is contained in:
Vishal Nayak 2020-06-29 13:23:10 -04:00 committed by GitHub
parent 4a5d8fc212
commit 6bd5674345
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -1828,11 +1828,12 @@ func (c *Core) sealInternalWithOptions(grabStateLock, keepHALock, performCleanup
}
}
if err := postSealInternal(c); err != nil {
c.logger.Error("post seal error", "error", err)
return err
if err := c.quotaManager.Reset(); err != nil {
c.logger.Error("error resetting quota manager", "error", err)
}
postSealInternal(c)
c.logger.Info("vault is sealed")
return nil

View File

@ -59,7 +59,7 @@ func addExtraCredentialBackends(*Core, map[string]logical.Factory) {}
func preUnsealInternal(context.Context, *Core) error { return nil }
func postSealInternal(*Core) error { return nil }
func postSealInternal(*Core) {}
func preSealPhysical(c *Core) {
switch c.sealUnwrapper.(type) {