From 3680dc32ca600ea319c0fd010a8c9b09642ee750 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 25 Nov 2015 16:40:13 -0500 Subject: [PATCH] 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 --- src/mon/OSDMonitor.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index c3c684f6ce5d4..ca10faad6508e 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; -- 2.39.5