]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/ReplicatedPG: tolerate promotion completion with stopped agent 6008/head
authorSage Weil <sage@redhat.com>
Mon, 21 Sep 2015 15:41:03 +0000 (11:41 -0400)
committerSage Weil <sage@redhat.com>
Mon, 21 Sep 2015 15:41:03 +0000 (11:41 -0400)
We may start a promotion, then get a pool update that disables the
agent, and then complete it.  We should not segfault in this case.

Fixes: #13190
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/ReplicatedPG.cc

index cfda5b00dfd8f83c26595b1ca6242189bcfdaff8..71d073308fcc2822d686e79c1dbd3bec24b9d86f 100644 (file)
@@ -7244,8 +7244,8 @@ void ReplicatedPG::finish_promote(int r, CopyResults *results,
 
   osd->logger->inc(l_osd_tier_promote);
 
-  assert(agent_state);
-  if (agent_state->is_idle())
+  if (agent_state &&
+      agent_state->is_idle())
     agent_choose_mode();
 }