From: Aishwarya Mathuria Date: Tue, 11 Feb 2025 09:38:22 +0000 (+0000) Subject: qa/suites/crimson: Add a test for PG Splitting in the crimson suite X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=cc876e1a060c8e902603c73c1c76e19b255dd142;p=ceph.git qa/suites/crimson: Add a test for PG Splitting in the crimson suite Signed-off-by: Aishwarya Mathuria --- diff --git a/qa/suites/crimson-rados/singleton/all/osd-pg-splitting.yaml b/qa/suites/crimson-rados/singleton/all/osd-pg-splitting.yaml new file mode 100644 index 0000000000000..9ae88f42e2544 --- /dev/null +++ b/qa/suites/crimson-rados/singleton/all/osd-pg-splitting.yaml @@ -0,0 +1,38 @@ +roles: +- - mon.a + - mon.b + - mon.c + - mgr.x + - osd.0 + - osd.1 + - osd.2 + - client.0 +openstack: + - volumes: # attached to each instance + count: 3 + size: 10 # GB +tasks: +- install: + flavor: crimson +- ceph: + pre-mgr-commands: + - sudo ceph config set mgr mgr_pool false --force + log-ignorelist: + - but it is still running + - overall HEALTH_ + - \(PG_ + conf: + osd: + osd min pg log entries: 5 + crimson alien thread cpu cores: 6-7 + osd.0: + crimson seastar cpu cores: 0-1 + osd.1: + crimson seastar cpu cores: 2-3 + osd.2: + crimson seastar cpu cores: 4-5 + global: +- workunit: + clients: + client.0: + - rados/test_pg_splitting.sh diff --git a/qa/workunits/rados/test_pg_splitting.sh b/qa/workunits/rados/test_pg_splitting.sh new file mode 100755 index 0000000000000..92fd00902dcfe --- /dev/null +++ b/qa/workunits/rados/test_pg_splitting.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +. $(dirname $0)/../../standalone/ceph-helpers.sh + +set -x + +function test_pg_splitting() { + ceph osd pool delete foo foo --yes-i-really-really-mean-it || true + create_pool foo 4 + wait_for_clean || return 1 + + #ensure nopgchange is set to 0 to allow for change in pg_num + ceph osd pool set foo nopgchange 0 + #increase pg_num to induce splitting + ceph osd pool set foo pg_num 16 + wait_for_clean || return 1 + ceph osd pool set foo pgp_num 16 + wait_for_clean || return 1 + + #get new PG stats + stats=$(ceph pg ls-by-pool foo --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 +} + +test_pg_splitting || exit 1 + +echo "OK"