From: Sage Weil Date: Wed, 25 Nov 2015 21:40:13 +0000 (-0500) Subject: mon/OSDMonitor: block 'ceph osd pg-temp ...' if update is pending X-Git-Tag: v10.0.1~17^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3680dc32ca600ea319c0fd010a8c9b09642ee750;p=ceph.git mon/OSDMonitor: block 'ceph osd pg-temp ...' if update is pending The OSD expects it's pg_temp update requests to succeed. If it races with an ill-timed admin request, it can get stuck in WaitActingChange indefinitely. This is only a real problem now that the OSD/mon interaction has been updated with wip-bigbang; previously we would retry (although it would take a while). Backporting is optional. Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index c3c684f6ce5d..ca10faad6508 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -6179,6 +6179,11 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, err = -ENOENT; goto reply; } + if (pending_inc.new_pg_temp.count(pgid)) { + dout(10) << __func__ << " waiting for pending update on " << pgid << dendl; + wait_for_finished_proposal(op, new C_RetryMessage(this, op)); + return true; + } vector id_vec; vector new_pg_temp;