mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
fix: Incorrect ServersCount in cluster.info (#15431)
The `ServersCount` field in cluster.info is expected to contain the number of nodes, and not number of endpoints.
This commit is contained in:
parent
3cdb609cca
commit
e6eab2091f
@ -2713,7 +2713,7 @@ func appendClusterMetaInfoToZip(ctx context.Context, zipWriter *zip.Writer) {
|
|||||||
go func() {
|
go func() {
|
||||||
ci := clusterInfo{}
|
ci := clusterInfo{}
|
||||||
ci.Info.PoolsCount = len(globalEndpoints)
|
ci.Info.PoolsCount = len(globalEndpoints)
|
||||||
ci.Info.ServersCount = globalEndpoints.NEndpoints()
|
ci.Info.ServersCount = len(globalEndpoints.Hostnames())
|
||||||
ci.Info.MinioVersion = Version
|
ci.Info.MinioVersion = Version
|
||||||
|
|
||||||
si, _ := objectAPI.StorageInfo(ctx)
|
si, _ := objectAPI.StorageInfo(ctx)
|
||||||
|
@ -315,7 +315,7 @@ func (l EndpointServerPools) HTTPS() bool {
|
|||||||
return l[0].Endpoints.HTTPS()
|
return l[0].Endpoints.HTTPS()
|
||||||
}
|
}
|
||||||
|
|
||||||
// NEndpoints - returns all nodes count
|
// NEndpoints - returns number of endpoints
|
||||||
func (l EndpointServerPools) NEndpoints() (count int) {
|
func (l EndpointServerPools) NEndpoints() (count int) {
|
||||||
for _, ep := range l {
|
for _, ep := range l {
|
||||||
count += len(ep.Endpoints)
|
count += len(ep.Endpoints)
|
||||||
|
Loading…
Reference in New Issue
Block a user