XL: format.json healing should cater for mismatching order. (#2285)

Fresh disks can be provided in any order, we need to make sure
to preserve existing disk order and populate the fresh disks
in new positions.

Thanks for Anis Elleuch <vadmeste@gmail.com> for finding this issue.
This commit is contained in:
Harshavardhana
2016-07-26 03:18:47 -07:00
committed by GitHub
parent f253dfc922
commit 1e3d80552f
2 changed files with 57 additions and 33 deletions
+1 -1
View File
@@ -152,7 +152,7 @@ func newXLObjects(disks, ignoredDisks []string) (ObjectLayer, error) {
}
case errSomeDiskUnformatted:
// All drives online but some report missing format.json.
if err := healFormatXL(storageDisks); err != nil {
if err := healFormatXLFreshDisks(storageDisks); err != nil {
// There was an unexpected unrecoverable error during healing.
return nil, fmt.Errorf("Unable to heal backend %s", err)
}