]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: Add a new test to test-erasure-code-plugins.sh to test for new health warn 66129/head
authorTom Sollers <tom.sollers@ibm.com>
Tue, 21 Oct 2025 15:52:07 +0000 (16:52 +0100)
committerTom Sollers <tom.sollers@ibm.com>
Tue, 18 Nov 2025 16:01:15 +0000 (16:01 +0000)
This commit adds a new test to test-erasure-code-plugins.sh that
tests for the health warning caused by having a erasure-code-profile
with the blaum-roth technique and a w+1 value that is not prime.

Fixes: http://tracker.ceph.com/issues/64419
Signed-off-by: Tom Sollers <tom.sollers@ibm.com>
qa/standalone/erasure-code/test-erasure-code-plugins.sh

index 677a766863939ceecf693b5d41f84e68d6fbe68f..95f1cc0ed4f4eee1cb4968b274842e99dcf9fcf0 100755 (executable)
@@ -115,4 +115,31 @@ function TEST_ec_profile_warning() {
     teardown $dir || return 1
 }
 
+function TEST_ec_profile_blaum_roth_warning() {
+    local dir=$1
+
+    setup $dir || return 1
+    run_mon $dir a || return 1
+    run_mgr $dir x || return 1
+    for id in $(seq 0 2) ; do
+        run_osd $dir $id || return 1
+    done
+    create_rbd_pool || return 1
+    wait_for_clean || return 1
+
+    echo "Starting test for blaum-roth profile health warning"
+
+    #Check that the health warn for incorrect blaum-roth profiles is correct.
+    ceph osd erasure-code-profile set prof-${plugin} plugin=jerasure k=3 m=1 technique=blaum_roth w=7 --yes-i-really-mean-it --force
+    #Test the health warning doesnt react to a profile that has no defined technique
+    ceph osd erasure-code-profile set test crush-device-class= crush-failure-domain=osd crush-num-failure-domains=0 crush-osds-per-failure-domain=0 crush-root=default k=4 l=3 m=2 name=lrcprofile plugin=lrc
+    CEPH_ARGS='' ceph --admin-daemon $(get_asok_path mon.a) log flush || return 1
+    sleep 10
+    grep -F "1 or more EC profiles have a w value such that w+1 is not prime. This can result in data corruption" $dir/mon.a.log || return 1
+    grep -F "w+1=8 for the EC profile prof-${plugin} is not prime and could lead to data corruption" $dir/mon.a.log || return 1
+
+    teardown $dir || return 1
+    return 0
+}
+
 main test-erasure-code-plugins "$@"