From 394b530b05c775ecc67123d55eff366da947b0f9 Mon Sep 17 00:00:00 2001 From: Aishwarya Mathuria Date: Fri, 1 Aug 2025 10:13:56 +0000 Subject: [PATCH] test_pg_splitting: add test for splitting with radosbench writes Adds a test for splitting to start while a pool is being written to. Signed-off-by: Aishwarya Mathuria --- qa/workunits/rados/test_pg_splitting.sh | 30 ++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/qa/workunits/rados/test_pg_splitting.sh b/qa/workunits/rados/test_pg_splitting.sh index 92fd00902dcfe..d277d67d6ec22 100755 --- a/qa/workunits/rados/test_pg_splitting.sh +++ b/qa/workunits/rados/test_pg_splitting.sh @@ -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" + -- 2.39.5