Merge pull request #7961 from hashicorp/b-always-validate-default-scheduler-config
always check `default_scheduler_config` config
This commit is contained in:
commit
ba13fa333c
|
@ -349,11 +349,12 @@ func (c *Command) isValidConfig(config, cmdConfig *Config) bool {
|
|||
}
|
||||
}
|
||||
|
||||
if config.DevMode {
|
||||
// Skip the rest of the validation for dev mode
|
||||
return true
|
||||
if err := config.Server.DefaultSchedulerConfig.Validate(); err != nil {
|
||||
c.Ui.Error(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
if !config.DevMode {
|
||||
// Ensure that we have the directories we need to run.
|
||||
if config.Server.Enabled && config.DataDir == "" {
|
||||
c.Ui.Error("Must specify data directory")
|
||||
|
@ -378,10 +379,6 @@ func (c *Command) isValidConfig(config, cmdConfig *Config) bool {
|
|||
if config.Server.Enabled && config.Server.BootstrapExpect == 1 {
|
||||
c.Ui.Error("WARNING: Bootstrap mode enabled! Potentially unsafe operation.")
|
||||
}
|
||||
|
||||
if err := config.Server.DefaultSchedulerConfig.Validate(); err != nil {
|
||||
c.Ui.Error(err.Error())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
|
|
Loading…
Reference in a new issue