add cluster maintenance healthcheck drive heal affinity (#10218)

This commit is contained in:
Harshavardhana
2020-08-07 13:22:53 -07:00
committed by GitHub
parent 19c4f3082b
commit 6c6137b2e7
10 changed files with 194 additions and 96 deletions

View File

@@ -73,9 +73,17 @@ func getLocalBackgroundHealStatus() madmin.BgHealState {
return madmin.BgHealState{}
}
var healDisks []string
for _, eps := range globalBackgroundHealState.getHealLocalDisks() {
for _, ep := range eps {
healDisks = append(healDisks, ep.String())
}
}
return madmin.BgHealState{
ScannedItemsCount: bgSeq.getScannedItemsCount(),
LastHealActivity: bgSeq.lastHealActivity,
HealDisks: healDisks,
NextHealRound: UTCNow().Add(durationToNextHealRound(bgSeq.lastHealActivity)),
}
}