auth/rpc: Take remote disk offline after maximum allowed attempts. (#3288)

Disks when are offline for a long period of time, we should
ignore the disk after trying Login upto 5 times.

This is to reduce the network chattiness, this also reduces
the overall time spent on `net.Dial`.

Fixes #3286
This commit is contained in:
Harshavardhana
2016-11-20 16:57:12 -08:00
committed by GitHub
parent ffbee70e04
commit 0b9f0d14a1
11 changed files with 136 additions and 81 deletions

View File

@@ -211,6 +211,7 @@ var objMetadataOpIgnoredErrs = []error{
errDiskNotFound,
errDiskAccessDenied,
errFaultyDisk,
errFaultyRemoteDisk,
errVolumeNotFound,
errFileAccessDenied,
errFileNotFound,
@@ -336,11 +337,7 @@ func writeUniqueXLMetadata(disks []StorageAPI, bucket, prefix string, xlMetas []
return traceError(errXLWriteQuorum)
}
return reduceErrs(mErrs, []error{
errDiskNotFound,
errFaultyDisk,
errDiskAccessDenied,
})
return reduceErrs(mErrs, objectOpIgnoredErrs)
}
// writeSameXLMetadata - write `xl.json` on all disks in order.
@@ -380,9 +377,5 @@ func writeSameXLMetadata(disks []StorageAPI, bucket, prefix string, xlMeta xlMet
return traceError(errXLWriteQuorum)
}
return reduceErrs(mErrs, []error{
errDiskNotFound,
errFaultyDisk,
errDiskAccessDenied,
})
return reduceErrs(mErrs, objectOpIgnoredErrs)
}