]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test_pg_splitting: add test for splitting with radosbench writes
authorAishwarya Mathuria <amathuri@redhat.com>
Fri, 1 Aug 2025 10:13:56 +0000 (10:13 +0000)
committerAishwarya Mathuria <amathuri@redhat.com>
Thu, 21 Aug 2025 13:58:27 +0000 (13:58 +0000)
Adds a test for splitting to start while a pool is being written to.

Signed-off-by: Aishwarya Mathuria <amathuri@redhat.com>
qa/workunits/rados/test_pg_splitting.sh

index 92fd00902dcfe0166875df8443817748bcb424c6..d277d67d6ec22f7bd51d0042dcdc231d84e0a4de 100755 (executable)
@@ -22,8 +22,36 @@ function test_pg_splitting() {
     new_pg_count=$(echo "$stats" | jq '. | length')
     echo "New PG Count: $new_pg_count"
     test "$new_pg_count" -eq 16 || return 1
+    wait_for_clean || return 1
 }
 
-test_pg_splitting || exit 1
+function test_pg_splitting_with_radosbench() {
+    ceph osd pool delete testbench testbench --yes-i-really-really-mean-it || true
+    create_pool testbench 4
+    wait_for_clean || return 1
+
+    #start radosbench writes on the pool
+    timeout 100 rados bench -p testbench 60 write -b 4096 --no-cleanup &
+
+    sleep 5
+
+    ceph osd pool set testbench nopgchange 0
+    ceph osd pool set testbench pg_num 16
+    wait_for_clean || return 1
+    ceph osd pool set testbench pgp_num 16
+    wait_for_clean || return 1
+
+
+    stats=$(ceph pg ls-by-pool testbench --format=json 2>/dev/null | jq -r ".pg_stats")
+    new_pg_count=$(echo "$stats" | jq '. | length')
+    echo "New PG Count: $new_pg_count"
+    test "$new_pg_count" -eq 16 || return 1
+    wait_for_clean || return 1
+
+}
+
+test_pg_splitting || { echo "test_pg_splitting failed"; exit 1; }
+test_pg_splitting_with_radosbench || { echo "test_pg_splitting_with_radosbench failed"; exit 1; }
 
 echo "OK"
+