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

DNM: backport stretch clusters to nautilus #37173

Closed
wants to merge 167 commits into from

Conversation

gregsfortytwo
Copy link
Member

I don't think we want to merge this, but I've done the work for downstream. Putting up as an FYI. (Hopefully I can find the draft mode thing, but it's not visible yet?)

#35906

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

The Message is actually always a MMonPaxos (which is not a subtype of
PaxosServiceMessage, so that whole thing was wrong!). This lets
us clean up the switch quite a bit and correct the odd casts
going around.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 0c85f8f)
Resolves: rhbz#1800382
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit cda3b25)

Conflicts:
  src/mon/Elector.cc

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
Resolves: rhbz#1800382
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 987630f)
Resolves: rhbz#1800382
Mangle some pointers and the dout prefix to make things compile
during this transition.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 2069016)

Resolves: rhbz#1800382
Also add a bunch of utility functions that will need to
get better implementations later

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit e24a73d)

Resolves: rhbz#1800382
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit a227a24)

Resolves: rhbz#1800382
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 0205695)

Resolves: rhbz#1800382
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit b53b984)

Resolves: rhbz#1800382
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 952d785)

Resolves: rhbz#1800382
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 3ca09c9)

Resolves: rhbz#1800382
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 469910b)

Conflicts:
  src/mon/Elector.cc

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
Resolves: rhbz#1800382
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 925f132)

Resolves: rhbz#1800382
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 1d1c143)

Resolves: rhbz#1800382
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit ba37ca9)

Resolves: rhbz#1800382
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit b7a44c0)

Resolves: rhbz#1800382
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit c591bd4)

Resolves: rhbz#1800382
This lets us make a few more ElectionLogic functions private.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 40339cd)

Resolves: rhbz#1800382
…anigans

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit bf9523b)

Resolves: rhbz#1800382
In the next commit we'll actually use the ElectionOwner interface.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 8a95e2c)

Resolves: rhbz#1800382
Just copy the files, then delete the inappropriate bits.
Switched to using ldout in ElectionLogic.cc, added a few
functions I missed to the ElectionOwner interface, and moved
Elector() into the .cc so I could grab cct out of it.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 8eac583)

Conflicts:
	src/mon/Elector.cc

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
Resolves: rhbz#1800382
Not sure how I got that wrong, but we bump_epoch() on
winning an election, right before we start looking through
peer_info. So just do it on election start instead.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 1261c44)

Resolves: rhbz#1800382
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 94c2fd3)

Resolves: rhbz#1800382
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 28729ea)

Resolves: rhbz#1800382
I somehow broke this when initially hoisting it out of Elector. Whoops!

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit b8f04c5)

Resolves: rhbz#1800382
The world has changed, and now so have the nice docs.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 521a622)

Resolves: rhbz#1800382
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit fba2a0d)

Resolves: rhbz#1800382
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit a56f620)

Resolves: rhbz#1800382
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 5a64cdf)

Resolves: rhbz#1800382
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit c9583d5)

Resolves: rhbz#1800382
When receiving an old propose, we were correctly triggering a new election
but not then returning out of receive_propose(), so we processed the
"should I defer" logic and perhaps sent out a deferal (in the current epoch!).

Fixes: https://tracker.ceph.com/issues/42977

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 337d12b)

Resolves: rhbz#1800382
We can adopt new monmaps while bootstrapping, or in election messages, in
addition to MonmapMonitor::update_from_paxos. Since we use the
notification to update our election strategy and such, we need to notify
from these locations as well!

Fixes: https://tracker.ceph.com/issues/47654

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 1d5f4e8)

Resolves: rhbz#1939766
We blocked off the other routes to add location-less monitors, but if you
turn on a monitor with the right keys it can auto-join via the MMonJoin
functionality. Block that off!

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 6ca6c4b)

Resolves: rhbz#1939766
…join

This will let newly-created monitors auto-join on startup in stretch mode, by
providing the needed location.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 9c0e32d)

Resolves: rhbz#1939766
Go to some effort to look at our location in the monmap and update it the
same way we update names or IP addresses when necessary. Let users
pass in the location on the CLI via "--set-crush-location".

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 48886aa)

Resolves: rhbz#1939766
As in dd63a3e for the OSDMap, this
caused crashes when encoding for kernel clients, and is unnecessary
for servers because they are separately gated.

I did a full audit of every instance of "assert" I added to the codebase
to make sure this is the very last one of these issues.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 589de8b)

Resolves: rhbz#1944611
@gregsfortytwo
Copy link
Member Author

jenkins test make check

1 similar comment
@gregsfortytwo
Copy link
Member Author

jenkins test make check

@tchaikov
Copy link
Contributor

tchaikov commented Apr 1, 2021

the test failure should be fixed by #40536

@tchaikov
Copy link
Contributor

tchaikov commented Apr 1, 2021

jenkins test api

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 596d09a)

Resolves: rhbz#1949166
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit e1ae925)

Resolves: rhbz#1949166
…_mode

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 73b461a)

Resolves: rhbz#1949166
… calls!

Add header comment describing how this works now.

Fixes: https://tracker.ceph.com/issues/50308

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit adbaeee)

Resolves: rhbz#1949166
…e first mon

When monitors are joining a cluster, they may send an MMonJoin message to place
themselves correctly in the map in either handle_probe_reply() or
finish_election(). These messages must be sent to the leader -- monitors do not
forward each other's messages.

Unfortunately, this scenario was missed when converting the monitors to support
connectivity-based elections, and they're sending these messages to
quorum.begin(). Fix this by including an explicit leader in MMonProbe (that the
new monitor may reference in handle_probe_reply) and using the leader
value in both locations.

Fixes: https://tracker.ceph.com/issues/50345

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit ffa7ff3)

Conflicts:
	src/messages/MMonProbe.h

Signed-off-by:  Greg Farnum<gfarnum@redhat.com>

Resolves: rhbz#1939766
@idryomov idryomov changed the base branch from nautilus to nautilus-saved April 20, 2021 14:32
@idryomov idryomov changed the base branch from nautilus-saved to nautilus April 20, 2021 14:32
@jdurgin jdurgin changed the base branch from nautilus to nautilus-saved May 14, 2021 21:59
@jdurgin jdurgin changed the base branch from nautilus-saved to nautilus May 14, 2021 21:59
@github-actions
Copy link

github-actions bot commented Jun 3, 2021

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants