avoid metrics not meant for single drive mode (#12415)

fixes #12414
This commit is contained in:
Harshavardhana 2021-06-01 12:22:42 -07:00 committed by GitHub
parent 120951d9e9
commit 7148c2490a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1383,7 +1383,7 @@ func getClusterStorageMetrics() MetricsGroup {
read: func(ctx context.Context) (metrics []Metric) {
objLayer := newObjectLayerFn()
// Service not initialized yet
if objLayer == nil || globalIsGateway {
if objLayer == nil || !globalIsErasure {
return
}