OSS parts of sighup license reload (#11767)

This commit is contained in:
Josh Black 2021-06-04 10:24:35 -07:00 committed by GitHub
parent 5e55f1b3fe
commit c8cfcd9514
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -1562,6 +1562,11 @@ func (c *ServerCommand) Run(args []string) int {
c.UI.Error(fmt.Sprintf("Error(s) were encountered during reload: %s", err))
}
// Reload license file
if err := vault.LicenseReload(core); err != nil {
c.UI.Error(fmt.Sprintf("Error reloading license: %v", err))
}
case <-c.SigUSR2Ch:
logWriter := c.logger.StandardWriter(&hclog.StandardLoggerOptions{})
pprof.Lookup("goroutine").WriteTo(logWriter, 2)

View File

@ -124,6 +124,7 @@ var (
LicenseAutoloaded = func(*Core) bool { return false }
LicenseInitCheck = func(*Core) error { return nil }
LicenseSummary = func(*Core) (*LicenseState, error) { return nil, nil }
LicenseReload = func(*Core) error { return nil }
)
// NonFatalError is an error that can be returned during NewCore that should be