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

fix: Incorrect ServersCount in cluster.info #15431

Merged
merged 3 commits into from Jul 30, 2022

Conversation

anjalshireesh
Copy link
Contributor

Description

The ServersCount field in cluster.info is expected to contain the
number of nodes, and not number of endpoints.

Fixed by using length of globalNotificationSys.ServerInfo() and adding
one for the local node.

Motivation and Context

Bugfix

How to test this PR?

  • Generate a profile using mc support profile
  • Extract the generated zip file and inspect contents of cluster.info
  • Verify that in case of a single server setup with multiple endpoints, the value of servers_count is 1

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)
  • Documentation updated
  • Unit tests added/updated

cmd/admin-handlers.go Outdated Show resolved Hide resolved
The `ServersCount` field in cluster.info is expected to contain the
number of nodes, and not number of endpoints.

Fixed by using length of `globalNotificationSys.ServerInfo()` and adding
one for the local node.
@anjalshireesh anjalshireesh marked this pull request as ready for review July 29, 2022 16:30
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.

LGTM

@minio-trusted
Copy link
Contributor

Mint Automation

Test Result
mint-large-bucket.sh ✔️
mint-fs.sh ✔️
mint-gateway-s3.sh ✔️
mint-erasure.sh ✔️
mint-dist-erasure.sh ✔️
mint-compress-encrypt-dist-erasure.sh ✔️
mint-pools.sh ✔️
Deleting image on docker hub
Deleting image locally

@harshavardhana harshavardhana merged commit e6eab20 into minio:master Jul 30, 2022
@bh4t bh4t added the bugfix label Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants