Skip to content

Commit

Permalink
Enhancement: validate master address config on object node start
Browse files Browse the repository at this point in the history
Signed-off-by: Mofei Zhang <[email protected]>
  • Loading branch information
mervinkid committed Feb 5, 2020
1 parent 60f16ed commit 2d27cea
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions objectnode/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,9 @@ func (o *ObjectNode) loadConfig(cfg *config.Config) (err error) {

// parse master config
enableHTTPS := cfg.GetBool(configEnableHTTPS)
masterCfgs := cfg.GetSlice(proto.MasterAddr)
masters := make([]string, len(masterCfgs))
for i, masterCfg := range masterCfgs {
masters[i] = masterCfg.(string)
masters := cfg.GetStringSlice(proto.MasterAddr)
if len(masters) == 0 {
return config.NewIllegalConfigError(proto.MasterAddr)
}
log.LogInfof("loadConfig: setup config: %v(%v)", configMasters, masters)

Expand Down

0 comments on commit 2d27cea

Please sign in to comment.