Skip to content
Snippets Groups Projects
Unverified Commit 01179963 authored by Liz Rice's avatar Liz Rice
Browse files

Don't assume master if 0 master binaries specified

parent d30786da
No related branches found
No related tags found
No related merge requests found
...@@ -202,9 +202,15 @@ func isMaster() bool { ...@@ -202,9 +202,15 @@ func isMaster() bool {
_ = loadConfig(check.MASTER) _ = loadConfig(check.MASTER)
glog.V(2).Info("Checking if the current node is running master components") glog.V(2).Info("Checking if the current node is running master components")
masterConf := viper.Sub(string(check.MASTER)) masterConf := viper.Sub(string(check.MASTER))
if _, err := getBinaries(masterConf); err != nil { components, err := getBinaries(masterConf)
if err != nil {
glog.V(2).Info(err) glog.V(2).Info(err)
return false return false
} }
if len(components) == 0 {
glog.V(2).Info("No master binaries specified")
return false
}
return true return true
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment