]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: block 'ceph osd pg-temp ...' if update is pending 6704/head
authorSage Weil <sage@redhat.com>
Wed, 25 Nov 2015 21:40:13 +0000 (16:40 -0500)
committerSage Weil <sage@redhat.com>
Wed, 25 Nov 2015 21:40:13 +0000 (16:40 -0500)
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 <sage@redhat.com>
src/mon/OSDMonitor.cc

index c3c684f6ce5d494a1db46a04ac98e8fa34e4be3a..ca10faad6508e1c26ab5ddb4ddce2acb9ef79058 100644 (file)
@@ -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<string> id_vec;
     vector<int32_t> new_pg_temp;