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>
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);
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);