Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected output for command mc admin info #4448

Merged
merged 1 commit into from
Jan 19, 2023

Conversation

shtripat
Copy link
Contributor

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Optimization (provides speedup with no functional changes)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Fixes a regression (If yes, please add commit-id or PR # here)
  • Unit tests added/updated
  • Internal documentation updated
  • Create a documentation update request here

Earlier the pools details specifically the values for erasure sets and disks per etasure set
were not displayed with correct values. There was un-necassary looping through the disks list
for server while calculating these values. Removed the same and it produces correct values now.

Signed-off-by: Shubhendu Ram Tripathi <shubhendu@minio.io>
Copy link
Member

@vadmeste vadmeste left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

The issue is happening because one node belongs to two pools in your configuration which is unusual but possible, but your code is definitely better.

@harshavardhana harshavardhana merged commit e9e6c22 into minio:master Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants