]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: add lrc tests to osd-scrub-repair.sh 4797/head
authorLoic Dachary <ldachary@redhat.com>
Thu, 28 May 2015 20:46:06 +0000 (22:46 +0200)
committerLoic Dachary <ldachary@redhat.com>
Thu, 28 May 2015 21:25:24 +0000 (23:25 +0200)
Create an lrc erasure coded pool and run corruption and repair tests on
it.

http://tracker.ceph.com/issues/11665 Fixes: #11665

Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/test/osd/osd-scrub-repair.sh

index 6ebbc35485f3506b9b244c52bb0e0ffce8173091..d5432c2bf0da693f002344d8f9248c770b4226c5 100755 (executable)
@@ -164,6 +164,25 @@ function TEST_corrupt_and_repair_jerasure() {
     teardown $dir || return 1
 }
 
+function TEST_corrupt_and_repair_lrc() {
+    local dir=$1
+    local poolname=ecpool
+    local profile=myprofile
+
+    setup $dir || return 1
+    run_mon $dir a || return 1
+    for id in $(seq 0 9) ; do
+        run_osd $dir $id || return 1
+    done
+    wait_for_clean || return 1
+
+    ceph osd erasure-code-profile set $profile \
+        pluing=lrc \
+        k=4 m=2 l=3 \
+        ruleset-failure-domain=osd || return 1
+
+    corrupt_and_repair_erasure_coded $dir $poolname $profile || return 1
+
     teardown $dir || return 1
 }