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
Conversation
src/mon/MDSMonitor.cc
Outdated
@@ -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);}); |
There was a problem hiding this comment.
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>
retest this please |
@@ -140,6 +138,11 @@ void MDSMonitor::create_pending() | |||
pending_fsmap = fsmap; | |||
pending_fsmap.epoch++; | |||
|
|||
if (mon->osdmon()->is_readable()) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh, agreed.
Fixes: http://tracker.ceph.com/issues/21945
Signed-off-by: Patrick Donnelly pdonnell@redhat.com