mon: Fix check of ruleset id on pool update

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>
This commit is contained in:
John Spray 2014-05-20 16:50:18 +01:00
parent 1d9e4ac2e2
commit fb504baed9

View 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;
}