Browse Source

fix bug

pull/279/head
tnextday 10 years ago
parent
commit
7841ade30b
  1. 5
      go/topology/rack.go
  2. 6
      go/weed/volume.go

5
go/topology/rack.go

@ -43,6 +43,11 @@ func (r *Rack) GetOrCreateDataNode(ip string, port int, publicUrl string, maxVol
dn := NewDataNode(ip + ":" + strconv.Itoa(port))
dn.Ip = ip
dn.Port = port
if publicUrl == "" {
publicUrl = ip + ":" + strconv.Itoa(port)
} else if publicUrl[0] == ':' {
publicUrl = ip + publicUrl
}
dn.PublicUrl = publicUrl
dn.maxVolumeCount = maxVolumeCount
dn.LastSeen = time.Now().Unix()

6
go/weed/volume.go

@ -100,9 +100,9 @@ func runVolume(cmd *Command, args []string) bool {
v.whiteList = strings.Split(*volumeWhiteListOption, ",")
}
if *v.ip == "" {
*v.ip = "127.0.0.1"
}
// if *v.ip == "" {
// *v.ip = "127.0.0.1"
// }
if *v.publicPort == 0 {
*v.publicPort = *v.port

Loading…
Cancel
Save