Corrected output for command mc admin info
#4448
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Earlier the pools details specifically the values for erasure sets and disks per erasure set were not displayed with correct values. There was an unnecessary looping through the disks list for server while calculating these values. Removed the same and it produces correct values now.
Motivation and Context
bug fix to make sure values for erasure sets and disks per erasure set are shown with correct values
How to test this PR?
Follow the below steps to test the scenario
step-1: start minio with below configurations
./minio server ./data/1p1host{1...13}/disk{1...60} ./data/1p2host{1...7}/disk{1...60}
step-2: start minio client and run the admin info command as below
./mc admin info myminio
Expected output:
● 127.0.0.1:9000
Uptime: 23 minutes
Version: 2023-01-16T23:38:33Z
Network: 1/1 OK
Drives: 1200/1200 OK
Pool: 1, 2
Pools:
1st, Erasure sets: 60, Drives per erasure set: 13
2nd, Erasure sets: 30, Drives per erasure set: 14
1,200 drives online, 0 drives offline
Types of changes
Checklist:
commit-id
orPR #
here)