]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: pool set <pool> crush_ruleset must not use rule_exists 1963/head
authorJohn Spray <john.spray@inktank.com>
Tue, 20 May 2014 15:50:18 +0000 (16:50 +0100)
committerLoic Dachary <loic@dachary.org>
Sat, 14 Jun 2014 11:05:20 +0000 (13:05 +0200)
commitc34008532362c3afadff6287bc8746c141a221a3
tree340ced1bcdeed8a4b481c3f40cc61ecaa846ace3
parent323492451c2d29b90c30a4e133dc8ca9780035a5
mon: pool set <pool> crush_ruleset must not use rule_exists

Implement CrushWrapper::ruleset_exists that iterates over the existing
rulesets to find the one matching the ruleset argument.

ceph osd pool set <pool> crush_ruleset must not use
CrushWrapper::rule_exists, which checks for a *rule* existing, whereas
the value being set is a *ruleset*. (cherry picked from commit
fb504baed98d57dca8ec141bcc3fd021f99d82b0)

A test via ceph osd pool set data crush_ruleset verifies the ruleset
argument is accepted.

http://tracker.ceph.com/issues/8599 fixes: #8599

Backport: firefly, emperor, dumpling
Signed-off-by: John Spray <john.spray@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit d02d46e25080d5f7bb8ddd4874d9019a078b816b)

Conflicts:
src/mon/OSDMonitor.cc
qa/workunits/cephtool/test.sh
src/crush/CrushWrapper.h
src/mon/OSDMonitor.cc