]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: do not goto reply if a ruleset exists in pending 1231/head
authorLoic Dachary <loic@dachary.org>
Thu, 13 Feb 2014 14:40:30 +0000 (15:40 +0100)
committerLoic Dachary <loic@dachary.org>
Thu, 13 Feb 2014 14:50:36 +0000 (15:50 +0100)
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 <loic@dachary.org>
src/mon/OSDMonitor.cc

index b0e86bae72cb1a3e788977719520c5363fa103dc..ea83ff6c8768ece8127b22cc1fac12de03b972a2 100644 (file)
@@ -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);