Skip to content

Commit

Permalink
Merge pull request #46428 from sseshasa/wip-fix-55773-have-pending
Browse files Browse the repository at this point in the history
mon/OSDMonitor: Ensure kvmon() is writeable before handling "osd new" cmd

Reviewed-by: Neha Ojha <nojha@redhat.com>
  • Loading branch information
yuriw committed Jun 14, 2022
2 parents 6d95d43 + 9a0d42c commit 8c9bf42
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/mon/OSDMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12599,6 +12599,14 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
return false;
}

// make sure kvmon is writeable.
if (!mon.kvmon()->is_writeable()) {
dout(10) << __func__ << " waiting for kv mon to be writeable for "
<< "osd new" << dendl;
mon.kvmon()->wait_for_writeable(op, new C_RetryMessage(this, op));
return false;
}

map<string,string> param_map;

bufferlist bl = m->get_data();
Expand Down

0 comments on commit 8c9bf42

Please sign in to comment.