]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: Fix check of ruleset id on pool update 1841/head
authorJohn Spray <john.spray@inktank.com>
Tue, 20 May 2014 15:50:18 +0000 (16:50 +0100)
committerJohn Spray <john.spray@inktank.com>
Tue, 20 May 2014 22:16:54 +0000 (23:16 +0100)
This code was using CrushWrapper::rule_exists, which
checks for a *rule* existing, whereas the value being
set is a *ruleset*.

Signed-off-by: John Spray <john.spray@inktank.com>
src/mon/OSDMonitor.cc

index 778ec405e1564dad3ec75e8bf95b377d4e3c73a1..d5ea95447b014348c35acbb9726a155283f55a0e 100644 (file)
@@ -3423,7 +3423,7 @@ int OSDMonitor::prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
       ss << "error parsing integer value '" << val << "': " << interr;
       return -EINVAL;
     }
-    if (!osdmap.crush->rule_exists(n)) {
+    if (!osdmap.crush->ruleset_exists(n)) {
       ss << "crush ruleset " << n << " does not exist";
       return -ENOENT;
     }