Skip to content

pacific: Improve mon location handling for stretch clusters#40484

Merged
yuriw merged 5 commits intoceph:pacificfrom
gregsfortytwo:wip-stretch-mon-location-pacific-base
May 11, 2021
Merged

pacific: Improve mon location handling for stretch clusters#40484
yuriw merged 5 commits intoceph:pacificfrom
gregsfortytwo:wip-stretch-mon-location-pacific-base

Conversation

@gregsfortytwo
Copy link
Member

A backport (minimal, just across a code cleanup) of
#40483

This PR has two parts, one a short bug fix and one handling a hole
in location handling. The bug fix is yet another invalid assert on structure
encoding triggered by kernel clients, but after an audit session it's the
last one. The hole in location handling is caused by monitors being able
to auto-join a cluster if they have the right keys, even if stretch mode
is engaged and there's no provided location. This PR closes the hole and
provides a mechanism for the daemons and admins/orchestrator to set
that location even when using this auto-bootstrap functionality instead
of creating the monitor in the monmap ahead of time.

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

@tchaikov
Copy link
Contributor

jenkins test make check

@tchaikov
Copy link
Contributor

jenkins test api

@gregsfortytwo gregsfortytwo changed the title Wip stretch mon location pacific base DNM: Wip stretch mon location pacific base Mar 31, 2021
@gregsfortytwo
Copy link
Member Author

DNM as I made some minor edits to the master version that need to be put here.

@idryomov idryomov changed the base branch from pacific to pacific-saved April 20, 2021 18:32
@idryomov idryomov changed the base branch from pacific-saved to pacific April 20, 2021 18:32
@neha-ojha
Copy link
Member

@gregsfortytwo if this is not ready yet, can we please separate out cd9b6f7 to address the teuthology failure?

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)

Fixes: https://tracker.ceph.com/issues/50087
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)
…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)

Conflicts:
	src/messages/MMonJoin.h

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
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)
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)
@gregsfortytwo gregsfortytwo force-pushed the wip-stretch-mon-location-pacific-base branch from 8dd90b1 to 9453e34 Compare May 3, 2021 21:55
@gregsfortytwo gregsfortytwo changed the title DNM: Wip stretch mon location pacific base pacific: Improve mon location handling for stretch clusters May 3, 2021
@gregsfortytwo
Copy link
Member Author

@neha-ojha sorry, didn't see that message, but this version should be good.

@neha-ojha
Copy link
Member

@neha-ojha sorry, didn't see that message, but this version should be good.

@gregsfortytwo nw and thanks!

@yuriw yuriw merged commit 36ba4d7 into ceph:pacific May 11, 2021
@gregsfortytwo gregsfortytwo deleted the wip-stretch-mon-location-pacific-base branch June 3, 2021 06:26
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.

4 participants