volume servers always connect to the master leader

This commit is contained in:
Chris Lu
2017-01-13 10:20:40 -08:00
parent d953ed442c
commit 3065506b38
4 changed files with 25 additions and 38 deletions

View File

@@ -117,17 +117,6 @@ func NewFilerServer(r *http.ServeMux, ip string, port int, master string, dir st
fs.masterNodes = storage.NewMasterNodes(fs.master)
glog.V(0).Infof("Filer server bootstraps with master %s", fs.getMasterNode())
//force initialize with all available master nodes
for {
_, err := fs.masterNodes.FindMaster()
if err != nil {
glog.Infof("filer server failed to get master cluster info:%s", err.Error())
time.Sleep(3 * time.Second)
} else {
break
}
}
for {
glog.V(4).Infof("Filer server sending to master %s", fs.getMasterNode())
master, err := fs.detectHealthyMaster(fs.getMasterNode())