fix: admin info output for multiple pools (#3985)

fixes #3984
fixes #3976
This commit is contained in:
Harshavardhana
2022-02-16 10:35:24 -08:00
committed by GitHub
parent 220f7c217a
commit c5e56141bd
2 changed files with 9 additions and 2 deletions
+6 -1
View File
@@ -37,12 +37,17 @@ jobs:
go test -v -race --timeout 30m ./...
- name: Build on ${{ matrix.os }}
if: matrix.os == 'ubuntu-latest'
env:
ACCESS_KEY: minioadmin
SECRET_KEY: minioadmin
ENABLE_HTTPS: 1
MINIO_CI_CD: 1
SERVER_ENDPOINT: localhost:9000
run: |
wget https://dl.min.io/server/minio/release/linux-amd64/minio && chmod +x minio
mkdir -p ~/.minio/certs/ && cp testdata/localhost.crt ~/.minio/certs/public.crt && cp testdata/localhost.key ~/.minio/certs/private.key
sudo cp testdata/localhost.crt /usr/local/share/ca-certificates/ && sudo update-ca-certificates
./minio server /tmp/test-xl/{1...4}/ & sleep 10
export SERVER_ENDPOINT=localhost:9000 ACCESS_KEY=minioadmin SECRET_KEY=minioadmin ENABLE_HTTPS=1
make
make test-race
make verify
+3 -1
View File
@@ -180,7 +180,7 @@ func (u clusterStruct) String() (msg string) {
// Network info, only available for non-FS types
connectionAlive := 0
totalNodes := len(srv.Network)
if srv.Network != nil {
if srv.Network != nil && backendType == madmin.Erasure {
for _, v := range srv.Network {
if v == "online" {
connectionAlive++
@@ -226,6 +226,8 @@ func (u clusterStruct) String() (msg string) {
msg += fmt.Sprintf(" Pool: %s\n", console.Colorize("Info", humanize.Ordinal(poolIdx+1)))
}
msg += "\n"
poolIdx = -1
}
// Summary on used space, total no of buckets and