HealBucket: create the bucket if it is missing in one of the disks. (#2924)

This commit is contained in:
Krishna Srinivas
2016-10-14 23:42:17 +05:30
committed by Harshavardhana
parent 3349153058
commit 0320a77dc0
4 changed files with 56 additions and 0 deletions
+10
View File
@@ -117,6 +117,16 @@ func healControl(ctx *cli.Context) {
return
}
// If object is "" then heal the bucket first.
if objectName == "" {
fmt.Printf("Healing : /%s\n", bucketName)
args := &HealObjectArgs{Bucket: bucketName, Object: ""}
reply := &HealObjectReply{}
err = client.Call("Control.HealObjectHandler", args, reply)
fatalIf(err, "Healing bucket %s failed.", bucketName)
// Continue to heal the objects in the bucket.
}
// Recursively list and heal the objects.
prefix := objectName
marker := ""