re-implement StorageInfo to be a peer call (#16155)

This commit is contained in:
Harshavardhana
2022-12-01 14:31:35 -08:00
committed by GitHub
parent c84e2939e4
commit 5a8df7efb3
20 changed files with 191 additions and 128 deletions

View File

@@ -143,10 +143,11 @@ func getLocalServerProperty(endpointServerPools EndpointServerPools, r *http.Req
objLayer := newObjectLayerFn()
if objLayer != nil {
// only need Disks information in server mode.
storageInfo, _ := objLayer.LocalStorageInfo(GlobalContext)
storageInfo := objLayer.LocalStorageInfo(GlobalContext)
props.State = string(madmin.ItemOnline)
props.Disks = storageInfo.Disks
} else {
props.State = string(madmin.ItemOffline)
}
return props