From: Loic Dachary Date: Sun, 9 Feb 2014 11:31:30 +0000 (+0100) Subject: mon: if crush rule create-simple exists return X-Git-Tag: v0.78~184^2~7 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=4b687ba673574bcd3b77b0f79a07d5c74cdcedc2;p=ceph.git mon: if crush rule create-simple exists return And it is consistent with the above. Also use a slightly different string to allow the caller to differentiate between the two cases. Signed-off-by: Loic Dachary --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index eea7bcb7d6a10..93ebc2bc28c40 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -3704,6 +3704,7 @@ 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);