mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-22 01:47:24 +08:00
Add "-ip.bind" option when starting volume servers.
Also some Weed->Seaweed changes.
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user