From: Loic Dachary Date: Thu, 13 Feb 2014 14:40:30 +0000 (+0100) Subject: mon: do not goto reply if a ruleset exists in pending X-Git-Tag: v0.78~181^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1231%2Fhead;p=ceph.git mon: do not goto reply if a ruleset exists in pending If the crush ruleset is found in pending, do not goto reply because it does not exist yet. Wait for the pending proposal (and the ruleset) to be accepted and then only return that it exists. revert 4b687ba673574bcd3b77b0f79a07d5c74cdcedc2 Signed-off-by: Loic Dachary --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index b0e86bae72c..ea83ff6c876 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -3716,7 +3716,6 @@ bool OSDMonitor::prepare_command_impl(MMonCommand *m, if (newcrush.rule_exists(name)) { ss << "rule " << name << " already exists"; err = 0; - goto reply; } else { int rule = newcrush.add_simple_ruleset(name, root, type, mode, pg_pool_t::TYPE_REPLICATED, &ss); @@ -3760,7 +3759,6 @@ bool OSDMonitor::prepare_command_impl(MMonCommand *m, if (newcrush.rule_exists(name)) { ss << "rule " << name << " already exists"; err = 0; - goto reply; } else { ErasureCodeInterfaceRef erasure_code; err = get_erasure_code(properties_map, &erasure_code, ss);