mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
Add PoolNumber field to madmin.ServerProperties (#11327)
This commit is contained in:
parent
e3f8830ab7
commit
23f7ab40b3
@ -1239,6 +1239,21 @@ func (sys *NotificationSys) ServerInfo() []madmin.ServerProperties {
|
|||||||
}(client, i)
|
}(client, i)
|
||||||
}
|
}
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
|
||||||
|
for i := range reply {
|
||||||
|
for j := range globalEndpoints {
|
||||||
|
for _, endpoint := range globalEndpoints[j].Endpoints {
|
||||||
|
if reply[i].Endpoint == endpoint.Host {
|
||||||
|
reply[i].PoolNumber = j + 1
|
||||||
|
} else if host, err := xnet.ParseHost(reply[i].Endpoint); err == nil {
|
||||||
|
if host.Name == endpoint.Hostname() {
|
||||||
|
reply[i].PoolNumber = j + 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return reply
|
return reply
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -265,13 +265,14 @@ type ErasureBackend struct {
|
|||||||
|
|
||||||
// ServerProperties holds server information
|
// ServerProperties holds server information
|
||||||
type ServerProperties struct {
|
type ServerProperties struct {
|
||||||
State string `json:"state,omitempty"`
|
State string `json:"state,omitempty"`
|
||||||
Endpoint string `json:"endpoint,omitempty"`
|
Endpoint string `json:"endpoint,omitempty"`
|
||||||
Uptime int64 `json:"uptime,omitempty"`
|
Uptime int64 `json:"uptime,omitempty"`
|
||||||
Version string `json:"version,omitempty"`
|
Version string `json:"version,omitempty"`
|
||||||
CommitID string `json:"commitID,omitempty"`
|
CommitID string `json:"commitID,omitempty"`
|
||||||
Network map[string]string `json:"network,omitempty"`
|
Network map[string]string `json:"network,omitempty"`
|
||||||
Disks []Disk `json:"drives,omitempty"`
|
Disks []Disk `json:"drives,omitempty"`
|
||||||
|
PoolNumber int `json:"poolNumber,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disk holds Disk information
|
// Disk holds Disk information
|
||||||
|
Loading…
Reference in New Issue
Block a user