From: Loic Dachary Date: Wed, 11 Jun 2014 20:44:57 +0000 (+0200) Subject: erasure-code: pool create must not create profiles X-Git-Tag: v0.80.2~16^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a7119c31e9a1b415f56426d2b4cd362357ad8b17;p=ceph.git erasure-code: pool create must not create profiles If a non existent profile is provided as an argument to osd pool create, it must exit on error and not create the profile as a side effect. http://tracker.ceph.com/issues/8307 refs: #8307 Signed-off-by: Loic Dachary (cherry picked from commit ff2eb234e63cd281b40405cb3397da5babda943f) --- diff --git a/src/test/mon/osd-pool-create.sh b/src/test/mon/osd-pool-create.sh index e260d9e1b94ee..97bde0946db19 100755 --- a/src/test/mon/osd-pool-create.sh +++ b/src/test/mon/osd-pool-create.sh @@ -63,6 +63,16 @@ function TEST_default_deprectated_2() { grep "osd_pool_default_crush_rule is deprecated " $dir/a/log || return 1 } +# Before http://tracker.ceph.com/issues/8307 the invalid profile was created +function TEST_erasure_invalid_profile() { + local dir=$1 + run_mon $dir a --public-addr 127.0.0.1 + local poolname=pool_erasure + local notaprofile=not-a-valid-erasure-code-profile + ! ./ceph osd pool create $poolname 12 12 erasure $notaprofile || return 1 + ! ./ceph osd erasure-code-profile ls | grep $notaprofile || return 1 +} + function TEST_erasure_crush_rule() { local dir=$1 run_mon $dir a --public-addr 127.0.0.1