mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
Do not rely on quorum for StorageInfo() (#8557)
StorageInfo() call is supposed to give each server/disk information independently, rely on this appropriately so that `mc admin info server` gets correct information all the time.
This commit is contained in:
committed by
kannappanr
parent
06bd1e582a
commit
f96e902f63
@@ -55,6 +55,9 @@ type NotificationSys struct {
|
||||
// GetARNList - returns available ARNs.
|
||||
func (sys *NotificationSys) GetARNList() []string {
|
||||
arns := []string{}
|
||||
if sys == nil {
|
||||
return arns
|
||||
}
|
||||
region := globalServerRegion
|
||||
for _, targetID := range sys.targetList.List() {
|
||||
// httpclient target is part of ListenBucketNotification
|
||||
@@ -439,8 +442,9 @@ func (sys *NotificationSys) ServerInfo(ctx context.Context) []ServerInfo {
|
||||
info, err := sys.peerClients[index].ServerInfo()
|
||||
if err != nil {
|
||||
serverInfo[index].Error = err.Error()
|
||||
} else {
|
||||
serverInfo[index].Data = &info
|
||||
}
|
||||
serverInfo[index].Data = &info
|
||||
// Last iteration log the error.
|
||||
if i == 2 {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user