Add optional admin port to volume server, to seperate admin operations from normal file operations.

This commit is contained in:
Chris Lu
2015-01-18 17:03:38 -08:00
parent 7b10d62096
commit 7b4a53b2c1
12 changed files with 74 additions and 24 deletions

View File

@@ -23,7 +23,7 @@ func batchVacuumVolumeCheck(vl *VolumeLayout, vid storage.VolumeId, locationlist
//glog.V(0).Infoln(index, "Checked vacuuming", vid, "on", url, "needVacuum", ret)
ch <- ret
}
}(index, dn.Url(), vid)
}(index, dn.AdminUrl(), vid)
}
isCheckSuccess := true
for _ = range locationlist.list {
@@ -50,7 +50,7 @@ func batchVacuumVolumeCompact(vl *VolumeLayout, vid storage.VolumeId, locationli
glog.V(0).Infoln(index, "Complete vacuuming", vid, "on", url)
ch <- true
}
}(index, dn.Url(), vid)
}(index, dn.AdminUrl(), vid)
}
isVacuumSuccess := true
for _ = range locationlist.list {
@@ -66,12 +66,12 @@ func batchVacuumVolumeCompact(vl *VolumeLayout, vid storage.VolumeId, locationli
func batchVacuumVolumeCommit(vl *VolumeLayout, vid storage.VolumeId, locationlist *VolumeLocationList) bool {
isCommitSuccess := true
for _, dn := range locationlist.list {
glog.V(0).Infoln("Start Commiting vacuum", vid, "on", dn.Url())
if e := vacuumVolume_Commit(dn.Url(), vid); e != nil {
glog.V(0).Infoln("Error when committing vacuum", vid, "on", dn.Url(), e)
glog.V(0).Infoln("Start Commiting vacuum", vid, "on", dn.AdminUrl())
if e := vacuumVolume_Commit(dn.AdminUrl(), vid); e != nil {
glog.V(0).Infoln("Error when committing vacuum", vid, "on", dn.AdminUrl(), e)
isCommitSuccess = false
} else {
glog.V(0).Infoln("Complete Commiting vacuum", vid, "on", dn.Url())
glog.V(0).Infoln("Complete Commiting vacuum", vid, "on", dn.AdminUrl())
}
if isCommitSuccess {
vl.SetVolumeAvailable(dn, vid)