mirror of
https://github.com/pgsty/minio.git
synced 2026-08-08 23:33:30 +03:00
HealBucket: create the bucket if it is missing in one of the disks. (#2924)
This commit is contained in:
committed by
Harshavardhana
parent
3349153058
commit
0320a77dc0
@@ -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 := ""
|
||||
|
||||
Reference in New Issue
Block a user