Skip to content

Commit

Permalink
Merge pull request #5314 from dachary/wip-12419-rule-create-erasure
Browse files Browse the repository at this point in the history
tests: robust test for the pool create crush map test

Reviewed-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Jul 22, 2015
2 parents 5761d3a + e479037 commit f4bb377
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/test/mon/osd-crush.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ function TEST_crush_rule_create_erasure() {
./ceph osd crush rule rm $ruleset || return 1
! ./ceph osd crush rule ls | grep $ruleset || return 1
#
# create a bugous ruleset and verify it cannot be used
# to create a pool.
# verify that if the crushmap contains a bugous ruleset,
# it will prevent the creation of a pool.
#
ceph osd erasure-code-profile set myprofile plugin=lrc mapping=__DD__DD layers='[[ "_cDD_cDD", "" ],[ "cDDD____", "" ],[ "____cDDD", "" ],]' ruleset-steps='[ [ "choose", "datacenter", 3 ], [ "chooseleaf", "osd", 0] ]'
local crushtool_path_old=`ceph-conf --show-config-value crushtool`
ceph tell mon.* injectargs --crushtool "false"

expect_failure $dir "Error EINVAL" \
./ceph osd pool create mypool 1 1 erasure myprofile || return 1
./ceph osd crush rule rm mypool || return 1
./ceph osd erasure-code-profile rm myprofile || return 1
./ceph osd pool create mypool 1 1 erasure || return 1
}

function check_ruleset_id_match_rule_id() {
Expand Down

0 comments on commit f4bb377

Please sign in to comment.