fix storage info output with unordered endpoints arguments (#9610)

Shuffling arguments that we pass to MinIO server are supported. However,
when that happens, Prometheus returns wrong information about disks usage
and online/offline status.

The commit fixes the issue by avoiding relying on xl.endpoints since
it is not ordered.
This commit is contained in:
Anis Elleuch
2020-05-19 22:27:20 +01:00
committed by GitHub
parent bd032d13ff
commit 9baeda781a
14 changed files with 75 additions and 41 deletions

View File

@@ -39,6 +39,10 @@ func (p *posixDiskIDCheck) IsOnline() bool {
return storedDiskID == p.diskID
}
func (p *posixDiskIDCheck) IsLocal() bool {
return p.storage.IsLocal()
}
func (p *posixDiskIDCheck) CrawlAndGetDataUsage(ctx context.Context, cache dataUsageCache) (dataUsageCache, error) {
return p.storage.CrawlAndGetDataUsage(ctx, cache)
}