Skip to content

mon: add connection scoring and a score-based leader election system - #32336

Closed
gregsfortytwo wants to merge 65 commits into
ceph:masterfrom
gregsfortytwo:wip-elector
Closed

gregsfortytwo wants to merge 65 commits into
ceph:masterfrom
gregsfortytwo:wip-elector

Conversation

@gregsfortytwo

Copy link
Copy Markdown
Member

This PR moves us much closer to properly supporting stretched Ceph clusters which
will safely survive under netsplit conditions. It:

  • adds a ConnectionTracker and MMonPing to the monitor (via the Elector module)
  • adds a new CONNECTIVITY election mode (which elects the most-connected
    and -reliable monitor to be leader)
  • also a much simpler and bare intermediate one called DISALLOW
  • extends the mon_unittest_election to test these modes
  • Adds a bunch of user commands to configure and query these
  • Adds some infrastructure in the MonMap to support it

Reviewers, this is probably readable either all in one go, or by patch, EXCEPT that I rewrote the ConnectionTracker implementation and left it in the history. Developer documentation added near the end of the history may be a useful aid to understanding.

I also don't want to merge the last few test patches but have left them in so you can see what's been done.

This passed a monthrash test run with the CONNECTIVITY mode: http://pulpito.ceph.com/gregf-2019-12-18_14:37:57-rados:monthrash-wip-elector-1218-distro-basic-smithi/

Both CONNECTIVITY and CLASSIC modes passed the simple netsplit test, but checking the teuthology log you can see the CLASSIC mode generally took 6 seconds (ie, an election cycle) to run every command during the netsplit, whereas CONNECTIVITY ran at normal speed. http://pulpito.ceph.com/gregf-2019-12-18_12:00:57-netsplit-wip-elector-1217-2-distro-basic-smithi/

I am now working on a (smaller) follow-on PR that will place monitors into the CRUSH map, and force any PG peering to have replicas across the appropriate CRUSH bucket (basically, different datacenters), unless the cluster decides it has been netsplit (in which case the in-quorum monitor group and its associated OSDs wins). That will include more extensive netsplit testing, since normal RADOS ops will be able to go through.

Todo:

  • clean up the end QA bits once reviewers indicate they are happy
  • add a yaml frag to monthrash suite to test both CLASSIC and CONNECTIVITY modes
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants