xl: Rewrite auto-healing and implement auto new-disk healer (#8114)

The new auto healing model selects one node always responsible
for auto-healing the whole cluster, erasure set by erasure set.
If that node dies, another node will be elected as a leading
operator to perform healing.

This code also adds a goroutine which checks each 10 minutes
if there are any new unformatted disks and performs its healing
in that case, only the erasure set which has the new disk will
be healed.
This commit is contained in:
Anis Elleuch
2019-10-28 18:27:49 +01:00
committed by kannappanr
parent 10b526ed86
commit a49d4a9cb2
7 changed files with 339 additions and 113 deletions

View File

@@ -262,7 +262,7 @@ func serverMain(ctx *cli.Context) {
if globalIsXL {
// Init global heal state
globalAllHealState = initHealState()
globalSweepHealState = initHealState()
globalBackgroundHealState = initHealState()
}
// Initialize globalConsoleSys system
@@ -363,8 +363,8 @@ func serverMain(ctx *cli.Context) {
if globalIsXL {
initBackgroundHealing()
initDailyHeal()
initDailySweeper()
initLocalDisksAutoHeal()
initGlobalHeal()
}
globalObjLayerMutex.Lock()