XL: Implement ignore errors. (#2136)

Each metadata ops have a list of errors which can be
ignored, this is essentially needed when

  - disks are not found
  - disks are found but cannot be accessed (permission denied)
  - disks are there but fresh disks were added

This is needed since we don't have healing code in place where
it would have healed the fresh disks added.

Fixes #2072
This commit is contained in:
Harshavardhana
2016-07-07 22:10:27 -07:00
committed by Anand Babu (AB) Periasamy
parent 4c21d6d09d
commit ca1b1921c4
8 changed files with 122 additions and 76 deletions

View File

@@ -67,7 +67,7 @@ func (xl xlObjects) isObject(bucket, prefix string) (ok bool) {
return true
}
// Ignore for file not found, disk not found or faulty disk.
if err == errFileNotFound || err == errDiskNotFound || err == errFaultyDisk {
if isErrIgnored(err, walkResultIgnoredErrs) {
continue
}
errorIf(err, "Unable to stat a file %s/%s/%s", bucket, prefix, xlMetaJSONFile)