diff options
| author | chrislusf <chris.lu@gmail.com> | 2015-02-02 15:51:25 -0800 |
|---|---|---|
| committer | chrislusf <chris.lu@gmail.com> | 2015-02-02 15:51:25 -0800 |
| commit | e381356af975132d57b51e1923722b5413c9111e (patch) | |
| tree | 700d182c270b3644ac8a75b830af26daf9c2926b /go/weed/master.go | |
| parent | cc724305b665bb13a592334cf4739c4498df9d72 (diff) | |
| download | seaweedfs-e381356af975132d57b51e1923722b5413c9111e.tar.xz seaweedfs-e381356af975132d57b51e1923722b5413c9111e.zip | |
change CLI option from publicIp to publicUrl
Now the publicUrl is free style text.
Diffstat (limited to 'go/weed/master.go')
| -rw-r--r-- | go/weed/master.go | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/go/weed/master.go b/go/weed/master.go index 13f6d7c43..af63d8c22 100644 --- a/go/weed/master.go +++ b/go/weed/master.go @@ -31,7 +31,6 @@ var ( mport = cmdMaster.Flag.Int("port", 9333, "http listen port") masterIp = cmdMaster.Flag.String("ip", "", "master listening ip address, default to listen on all network interfaces") masterBindIp = cmdMaster.Flag.String("ip.bind", "0.0.0.0", "ip address to bind to") - mPublicIp = cmdMaster.Flag.String("publicIp", "", "peer accessible <ip>|<server_name>") metaFolder = cmdMaster.Flag.String("mdir", os.TempDir(), "data directory to store meta data") masterPeers = cmdMaster.Flag.String("peers", "", "other master nodes in comma separated ip:port list") volumeSizeLimitMB = cmdMaster.Flag.Uint("volumeSizeLimitMB", 30*1000, "Master stops directing writes to oversized volumes.") @@ -76,19 +75,15 @@ func runMaster(cmd *Command, args []string) bool { go func() { time.Sleep(100 * time.Millisecond) - if *mPublicIp == "" { - if *masterIp == "" { - *mPublicIp = "localhost" - } else { - *mPublicIp = *masterIp - } + if *masterIp == "" { + *masterIp = "localhost" } - myPublicMasterAddress := *mPublicIp + ":" + strconv.Itoa(*mport) + myMasterAddress := *masterIp + ":" + strconv.Itoa(*mport) var peers []string if *masterPeers != "" { peers = strings.Split(*masterPeers, ",") } - raftServer := weed_server.NewRaftServer(r, peers, myPublicMasterAddress, *metaFolder, ms.Topo, *mpulse) + raftServer := weed_server.NewRaftServer(r, peers, myMasterAddress, *metaFolder, ms.Topo, *mpulse) ms.SetRaftServer(raftServer) }() |
