diff --git a/go/util/constants.go b/go/util/constants.go index 1aa59d634..ca801574c 100644 --- a/go/util/constants.go +++ b/go/util/constants.go @@ -1,5 +1,5 @@ package util const ( - VERSION = "0.68" + VERSION = "0.69 beta" ) diff --git a/go/weed/master.go b/go/weed/master.go index 690662e1c..1e2a6f0af 100644 --- a/go/weed/master.go +++ b/go/weed/master.go @@ -29,8 +29,9 @@ var cmdMaster = &Command{ 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") + masterIp = cmdMaster.Flag.String("ip", "localhost", "master | address") masterBindIp = cmdMaster.Flag.String("ip.bind", "0.0.0.0", "ip address to bind to") + mPublicUrl = cmdMaster.Flag.String("publicUrl", "", "peer accessible |:port") 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.") @@ -75,10 +76,10 @@ func runMaster(cmd *Command, args []string) bool { go func() { time.Sleep(100 * time.Millisecond) - if *masterIp == "" { - *masterIp = "localhost" - } myMasterAddress := *masterIp + ":" + strconv.Itoa(*mport) + if *mPublicUrl != "" { + myMasterAddress = *mPublicUrl + } var peers []string if *masterPeers != "" { peers = strings.Split(*masterPeers, ",") diff --git a/go/weed/server.go b/go/weed/server.go index e86d0ba75..a758f887f 100644 --- a/go/weed/server.go +++ b/go/weed/server.go @@ -47,7 +47,7 @@ var cmdServer = &Command{ } var ( - serverIp = cmdServer.Flag.String("ip", "", "ip or server name") + serverIp = cmdServer.Flag.String("ip", "localhost", "ip or server name") serverPublicUrl = cmdServer.Flag.String("publicUrl", "", "publicly accessible address") serverBindIp = cmdServer.Flag.String("ip.bind", "0.0.0.0", "ip address to bind to") serverMaxCpu = cmdServer.Flag.Int("maxCpu", 0, "maximum number of CPUs. 0 means all available CPUs") @@ -99,10 +99,6 @@ func runServer(cmd *Command, args []string) bool { defer pprof.StopCPUProfile() } - if *serverIp == "" { - *serverIp = "localhost" - } - if *filerOptions.redirectOnRead { *isStartingFiler = true }