handle upgrade path and defaults

Ensure that `""` Scheduler Algorithm gets explicitly set to binpack on
upgrades or on API handling when user misses the value.

The scheduler already treats `""` value as binpack.  This PR merely
ensures that the operator API returns the effective value.
This commit is contained in:
Mahmood Ali
2020-05-09 12:14:02 -04:00
parent e9fe8a98df
commit ad72ee93c9
4 changed files with 12 additions and 0 deletions

View File

@@ -285,6 +285,8 @@ func (c *Command) readConfig() *Config {
config.PluginDir = filepath.Join(config.DataDir, "plugins")
}
config.Server.DefaultSchedulerConfig.Canonicalize()
if !c.isValidConfig(config, cmdConfig) {
return nil
}