aboutsummaryrefslogtreecommitdiff
path: root/weed/command/server.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-10-04 02:51:26 -0700
committerChris Lu <chris.lu@gmail.com>2021-10-04 02:51:26 -0700
commit62c2732fd1e043132cfc4f9bdea6b58654445c2a (patch)
treecb8c70edcca3ec20613e938e25c1ba759e4778d9 /weed/command/server.go
parentd4bb16e20e005ea2cc35f4017604a572e59606b4 (diff)
downloadseaweedfs-62c2732fd1e043132cfc4f9bdea6b58654445c2a.tar.xz
seaweedfs-62c2732fd1e043132cfc4f9bdea6b58654445c2a.zip
add back logic to check master peers
fix https://github.com/chrislusf/seaweedfs/issues/2352
Diffstat (limited to 'weed/command/server.go')
-rw-r--r--weed/command/server.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/command/server.go b/weed/command/server.go
index 9f402c9f8..7ffabb321 100644
--- a/weed/command/server.go
+++ b/weed/command/server.go
@@ -168,6 +168,12 @@ func runServer(cmd *Command, args []string) bool {
*isStartingFiler = true
}
+ if *isStartingMasterServer {
+ _, peerList := checkPeers(*serverIp, *masterOptions.port, *masterOptions.portGrpc, *masterOptions.peers)
+ peers := strings.Join(pb.ToAddressStrings(peerList), ",")
+ masterOptions.peers = &peers
+ }
+
// ip address
masterOptions.ip = serverIp
masterOptions.ipBind = serverBindIp