|
@ -141,10 +141,15 @@ func startMaster(masterOption MasterOptions, masterWhiteList []string) { |
|
|
glog.Fatalf("Master startup error: %v", e) |
|
|
glog.Fatalf("Master startup error: %v", e) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
masterPeers := make(map[string]pb.ServerAddress) |
|
|
|
|
|
for _, peer := range peers { |
|
|
|
|
|
masterPeers[peer.String()] = peer |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// start raftServer
|
|
|
// start raftServer
|
|
|
raftServerOption := &weed_server.RaftServerOption{ |
|
|
raftServerOption := &weed_server.RaftServerOption{ |
|
|
GrpcDialOption: security.LoadClientTLS(util.GetViper(), "grpc.master"), |
|
|
GrpcDialOption: security.LoadClientTLS(util.GetViper(), "grpc.master"), |
|
|
Peers: peers, |
|
|
|
|
|
|
|
|
Peers: masterPeers, |
|
|
ServerAddr: myMasterAddress, |
|
|
ServerAddr: myMasterAddress, |
|
|
DataDir: util.ResolvePath(*masterOption.metaFolder), |
|
|
DataDir: util.ResolvePath(*masterOption.metaFolder), |
|
|
Topo: ms.Topo, |
|
|
Topo: ms.Topo, |
|
|