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: Enable mon failover for the arbiter in stretch mode #8984

Merged
merged 1 commit into from Oct 18, 2021

Conversation

travisn
Copy link
Member

@travisn travisn commented Oct 15, 2021

Description of your changes:
Prior to ceph v16.2.7 the failover of the arbiter mon was not supported. Now the new tiebreaker mon can be set during the failover event and provide more dynamic stability to the mon quorum as long as another node is available in the arbiter
zone.

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.

@travisn travisn requested a review from leseb October 15, 2021 01:15
@mergify mergify bot added the ceph main ceph tag label Oct 15, 2021
pkg/daemon/ceph/client/mon.go Outdated Show resolved Hide resolved
c.ClusterInfo = clienttest.CreateTestClusterInfo(1)
monName := "arb"

// don't skip failover for non-stretch
Copy link
Member

Choose a reason for hiding this comment

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

Let's use t.Run() like in a few other places to properly name the tests instead of the comments.

}
return true
}

func (c *Cluster) shouldSkipFailover(name string) bool {
Copy link
Member

Choose a reason for hiding this comment

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

Can we return errors instead here so then the caller can print it. With that, we know why we are skipping the failover.

Copy link
Member

@leseb leseb left a comment

Choose a reason for hiding this comment

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

In case you have another rebase to go through and care about addressing the small suggestion otherwise LGTM.

}

// Ceph does not support updating the arbiter mon in older versions
return errors.Errorf("refusing to failover arbiter mon %q on a stretched cluster until upgrading to ceph version v16.2.7", name)
Copy link
Member

Choose a reason for hiding this comment

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

use arbiterFailoverSupportedCephVersion.String()?

Prior to ceph v16.2.7 the failover of the arbiter mon was
not supported. Now the new tiebreaker mon can be set during
the failover event and provide more dynamic stability to
the mon quorum if another node is available in the arbiter
zone.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
@travisn travisn merged commit 034018a into rook:master Oct 18, 2021
@travisn travisn deleted the support-arbiter-failover branch October 18, 2021 15:49
travisn added a commit that referenced this pull request Oct 18, 2021
ceph: Enable mon failover for the arbiter in stretch mode (backport #8984)
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

3 participants