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 wrong reporting of total disks after restart #13326

Merged
merged 2 commits into from
Sep 29, 2021

Conversation

vadmeste
Copy link
Member

@vadmeste vadmeste commented Sep 29, 2021

Description

!DANGEROUS pull request!

A restart of the cluster and a failed disk will wrongly count the number of
total disks.

This PR also disallows starting MinIO in erasure mode when the order of disks
is not the same as the arguments

Motivation and Context

Fix mc admin info showing wrong number of offines disks.

How to test this PR?

  1. minio server /tmp/xl/{1..4}
  2. chmod -R 000 /tmp/xl/1/
  3. killall minio && minio server /tmp/xl/{1..4}/
  4. mc admin info myminio/ # and check total disks

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

A restart of the cluster and a failed disk will wrongly count the number of
total disks.
@harshavardhana
Copy link
Member

@vadmeste can you add tests for this in the PR itself?

Copy link
Member

@krisis krisis left a comment

Choose a reason for hiding this comment

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

LGTM, minor typo in error message.

cmd/erasure-sets.go Outdated Show resolved Hide resolved
Co-authored-by: Krishnan Parthasarathi <krisis@users.noreply.github.com>
@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-zoned.sh ✔️
mint-gateway-nas.sh ✔️
mint-compress-encrypt-dist-erasure.sh ✔️
Deleting image on docker hub
Deleting image locally

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

4 participants