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

ceph: Allow an even number of mons #8636

Merged
merged 2 commits into from Sep 3, 2021
Merged

Conversation

travisn
Copy link
Member

@travisn travisn commented Sep 1, 2021

Description of your changes:
While an even number of mons can cause lower availability of mon quorum, it also can provide higher durability for the cluster. Mon quorum can be restored from a single mon according to the disaster recovery guide, so there may be scenarios where an even number of mons may be preferable.

Reverts the check for an even number of mons added in #6420.

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Skip Tests for Docs: Add the flag for skipping the build if this is only a documentation change. See here for the flag.
  • Skip Unrelated Tests: Add a flag to run tests for a specific storage provider. See test options.
  • Reviewed the developer guide on Submitting a Pull Request
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.
  • Pending release notes updated with breaking and/or notable changes, if necessary.
  • Upgrade from previous release is tested and upgrade user guide is updated, if necessary.
  • Code generation (make codegen) has been run to update object specifications, if necessary.

Copy link
Member

@BlaineEXE BlaineEXE left a comment

Choose a reason for hiding this comment

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

I like the doc changes.

@BlaineEXE
Copy link
Member

While we are revising this, should we set // +kubebuilder:validation:Maximum=9 in types.go so the validation will stop users from choosing more than 9?

Copy link
Member

@parth-gr parth-gr left a comment

Choose a reason for hiding this comment

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

if updatedCephCluster.Spec.Mon.Count > 0 && updatedCephCluster.Spec.Mon.Count%2 == 0 {

Is this API should also be updated with the change?

Copy link
Member

@parth-gr parth-gr left a comment

Choose a reason for hiding this comment

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

What for the case for automatic adding of mons if new nodes are added, is this we need to keep the scenario the same? add mons auto if there are an odd number of nodes present.

@travisn
Copy link
Member Author

travisn commented Sep 2, 2021

if updatedCephCluster.Spec.Mon.Count > 0 && updatedCephCluster.Spec.Mon.Count%2 == 0 {

Is this API should also be updated with the change?

Not sure what you mean? We are relaxing the check so we allow an even number of mons now.

What for the case for automatic adding of mons if new nodes are added, is this we need to keep the scenario the same? add mons auto if there are an odd number of nodes present.

If new nodes are added, the behavior would still be the same as before. We usually don't add new mons with new nodes though.

@parth-gr
Copy link
Member

parth-gr commented Sep 3, 2021

Not sure what you mean? We are relaxing the check so we allow an even number of mons now.

Sorry, I just thought this place was missed.

If new nodes are added, the behavior would still be the same as before. We usually don't add new mons with new nodes though.

Okay :)

And just Check if this warning needs to be updated

if monCount%2 == 0 {
logger.Warningf("external cluster mon count is even (%d), should be uneven, continuing.", monCount)
}

While an even number of mons can cause lower availability of
mon quorum, it also can provide higher durability for the cluster.
Mon quorum can be restored from a single mon according to the
disaster recovery guide, so there may be scenarios where
an even number of mons may be preferable.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
Typical clusters only require 3 or maybe 5 mons. If someone really wants
to go crazy they can add more mons, but over 9 mons really should not be
used.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
@travisn
Copy link
Member Author

travisn commented Sep 3, 2021

@parth-gr Yeah, removed the message from the external cluster, thanks!

@travisn travisn merged commit 5d136ac into rook:master Sep 3, 2021
@travisn travisn deleted the allow-even-mons branch September 3, 2021 15:00
mergify bot added a commit that referenced this pull request Sep 6, 2021
ceph: Allow an even number of mons (backport #8636)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ceph main ceph tag
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants