pacific: Improve mon location handling for stretch clusters#40484
Merged
yuriw merged 5 commits intoceph:pacificfrom May 11, 2021
Merged
pacific: Improve mon location handling for stretch clusters#40484yuriw merged 5 commits intoceph:pacificfrom
yuriw merged 5 commits intoceph:pacificfrom
Conversation
3 tasks
Contributor
|
jenkins test make check |
Contributor
|
jenkins test api |
Member
Author
|
DNM as I made some minor edits to the master version that need to be put here. |
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)
8dd90b1 to
9453e34
Compare
Member
Author
|
@neha-ojha sorry, didn't see that message, but this version should be good. |
Member
@gregsfortytwo nw and thanks! |
neha-ojha
approved these changes
May 3, 2021
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox