added proper log messages

This commit is contained in:
Chris Lu 2012-11-26 13:12:21 -08:00
parent 2add211a86
commit 2deee3f47c
2 changed files with 24 additions and 12 deletions

View file

@ -316,8 +316,19 @@ func runVolume(cmd *Command, args []string) bool {
http.HandleFunc("/admin/vacuum_volume_commit", vacuumVolumeCommitHandler)
go func() {
connected := true
for {
store.Join(*masterNode)
err := store.Join(*masterNode)
if err == nil {
if !connected {
connected = true
log.Println("Reconnected with master")
}
} else {
if connected {
connected = false
}
}
time.Sleep(time.Duration(float32(*vpulse*1e3)*(1+rand.Float32())) * time.Millisecond)
}
}()

View file

@ -104,6 +104,7 @@ func vacuumVolume_Check(urlLocation string, vid storage.VolumeId, garbageThresho
values.Add("garbageThreshold", garbageThreshold)
jsonBlob, err := util.Post("http://"+urlLocation+"/admin/vacuum_volume_check", values)
if err != nil {
fmt.Println("parameters:",values)
return err, false
}
var ret VacuumVolumeResult