Add "-ip.bind" option when starting volume servers.

Also some Weed->Seaweed changes.
This commit is contained in:
Chris Lu
2014-09-20 23:30:35 -07:00
parent ca16cfa147
commit ba179b1542
3 changed files with 9 additions and 7 deletions

View File

@@ -30,6 +30,7 @@ var (
maxVolumeCounts = cmdVolume.Flag.String("max", "7", "maximum numbers of volumes, count[,count]...")
ip = cmdVolume.Flag.String("ip", "", "ip or server name")
publicIp = cmdVolume.Flag.String("publicIp", "", "Publicly accessible <ip|server_name>")
bindIp = cmdVolume.Flag.String("ip.bind", "0.0.0.0", "ip address to bind to")
masterNode = cmdVolume.Flag.String("mserver", "localhost:9333", "master server location")
vpulse = cmdVolume.Flag.Int("pulseSeconds", 5, "number of seconds between heartbeats, must be smaller than or equal to the master's setting")
vTimeout = cmdVolume.Flag.Int("idleTimeout", 10, "connection idle seconds")
@@ -84,9 +85,9 @@ func runVolume(cmd *Command, args []string) bool {
*fixJpgOrientation,
)
listeningAddress := *ip + ":" + strconv.Itoa(*vport)
listeningAddress := *bindIp + ":" + strconv.Itoa(*vport)
glog.V(0).Infoln("Start Weed volume server", util.VERSION, "at", listeningAddress)
glog.V(0).Infoln("Start Seaweed volume server", util.VERSION, "at", listeningAddress)
listener, e := util.NewListener(listeningAddress, time.Duration(*vTimeout)*time.Second)
if e != nil {