Restore server license config lost in #11573 (#11730)

This commit is contained in:
Nick Cabatoff
2021-06-01 14:42:30 +02:00
committed by GitHub
parent 2a98a59861
commit e5b6515ee7

View File

@@ -1209,7 +1209,6 @@ func (c *ServerCommand) Run(args []string) int {
info["log level"] = logLevelString
infoKeys = append(infoKeys, "log level")
barrierSeal, barrierWrapper, unwrapSeal, seals, sealConfigError, err := setSeal(c, config, infoKeys, info)
// Check error here
if err != nil {
c.UI.Error(err.Error())
@@ -2258,7 +2257,6 @@ func initHaBackend(c *ServerCommand, config *server.Config, coreConfig *vault.Co
factory, exists := c.PhysicalBackends[config.HAStorage.Type]
if !exists {
return false, fmt.Errorf("Unknown HA storage type %s", config.HAStorage.Type)
}
namedHALogger := c.logger.Named("ha." + config.HAStorage.Type)
@@ -2266,7 +2264,6 @@ func initHaBackend(c *ServerCommand, config *server.Config, coreConfig *vault.Co
habackend, err := factory(config.HAStorage.Config, namedHALogger)
if err != nil {
return false, fmt.Errorf("Error initializing HA storage of type %s: %s", config.HAStorage.Type, err)
}
if coreConfig.HAPhysical, ok = habackend.(physical.HABackend); !ok {
@@ -2458,6 +2455,8 @@ func createCoreConfig(c *ServerCommand, config *server.Config, backend physical.
SecureRandomReader: secureRandomReader,
EnableResponseHeaderHostname: config.EnableResponseHeaderHostname,
EnableResponseHeaderRaftNodeID: config.EnableResponseHeaderRaftNodeID,
License: config.License,
LicensePath: config.LicensePath,
}
if c.flagDev {
coreConfig.EnableRaw = true