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

mon/MDSMonitor: wait for readable OSDMap before sanitizing #18603

Merged
merged 1 commit into from Oct 30, 2017

Conversation

batrick
Copy link
Member

@batrick batrick commented Oct 27, 2017

Fixes: http://tracker.ceph.com/issues/21945

Signed-off-by: Patrick Donnelly pdonnell@redhat.com

@batrick batrick changed the title [WIP] MDSMonitor: wait for readable OSDMap before sanitizing MDSMonitor: wait for readable OSDMap before sanitizing Oct 27, 2017
@@ -137,6 +135,11 @@ void MDSMonitor::init()

void MDSMonitor::create_pending()
{
if (mon->osdmon()->is_readable()) {
auto &osdmap = mon->osdmon()->osdmap;
fsmap.sanitize([&osdmap](int64_t pool){return osdmap.have_pg_pool(pool);});
Copy link
Member

Choose a reason for hiding this comment

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

s/fsmap/pending_fsmap/

Fixes: http://tracker.ceph.com/issues/21945

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
@liewegas
Copy link
Member

retest this please

@@ -140,6 +138,11 @@ void MDSMonitor::create_pending()
pending_fsmap = fsmap;
pending_fsmap.epoch++;

if (mon->osdmon()->is_readable()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

if you have concern about the ordering in which osdmap is updated and mdsmap is updated, asPAXOS_MDSMAP < PAXOS_OSDMAP. probably you can do this in post_paxos_update() where all paxos services have been refreshed.

Copy link
Member

Choose a reason for hiding this comment

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

that ensures a valid osdmap, but we still shouldn't touch the fsmap. the change should be applied to pending_fsmap, which means it goes in create_pending or encode_pending

Copy link
Contributor

Choose a reason for hiding this comment

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

ahh, agreed.

@liewegas liewegas changed the title MDSMonitor: wait for readable OSDMap before sanitizing mon/MDSMonitor: wait for readable OSDMap before sanitizing Oct 30, 2017
@liewegas liewegas merged commit ce6ba63 into ceph:master Oct 30, 2017
@batrick batrick deleted the i21945 branch October 30, 2017 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants