reporting volume size as early as possible
This commit is contained in:
@@ -114,6 +114,9 @@ func dirJoinHandler(w http.ResponseWriter, r *http.Request) {
|
||||
json.Unmarshal([]byte(r.FormValue("volumes")), volumes)
|
||||
debug(s, "volumes", r.FormValue("volumes"))
|
||||
topo.RegisterVolumes(*volumes, ip, port, publicUrl, maxVolumeCount)
|
||||
m := make(map[string]interface{})
|
||||
m["VolumeSizeLimit"] = uint64(*volumeSizeLimitMB)*1024*1024
|
||||
writeJson(w, r, m)
|
||||
}
|
||||
|
||||
func dirStatusHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
@@ -317,8 +317,9 @@ func runVolume(cmd *Command, args []string) bool {
|
||||
|
||||
go func() {
|
||||
connected := true
|
||||
store.SetMaster(*masterNode)
|
||||
for {
|
||||
err := store.Join(*masterNode)
|
||||
err := store.Join()
|
||||
if err == nil {
|
||||
if !connected {
|
||||
connected = true
|
||||
|
||||
Reference in New Issue
Block a user