From 8c0f26507136a948323f50d4329cd7c4957827a2 Mon Sep 17 00:00:00 2001 From: Kamoltat Date: Wed, 1 Mar 2023 21:07:54 +0000 Subject: [PATCH] qa/workunits/mon/pg_autoscaler: Added bug-reproducer/test Added a bug-reproducer/test to fix: https://tracker.ceph.com/issues/58894 Signed-off-by: Kamoltat (cherry picked from commit 009430b5548db028fe8d48b2469544eca419b526) --- qa/workunits/mon/pg_autoscaler.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/qa/workunits/mon/pg_autoscaler.sh b/qa/workunits/mon/pg_autoscaler.sh index bc5003f4c4e0c..4cf71a31cf4c9 100755 --- a/qa/workunits/mon/pg_autoscaler.sh +++ b/qa/workunits/mon/pg_autoscaler.sh @@ -137,10 +137,20 @@ ceph osd pool set bulk0 target_size_bytes 1000 ceph osd pool set meta0 target_size_ratio 1 wait_for 60 "ceph health detail | grep POOL_HAS_TARGET_SIZE_BYTES_AND_RATIO" +# test autoscale warn + +ceph osd pool create warn0 1 --autoscale-mode=warn +wait_for 120 "ceph health detail | grep POOL_TOO_FEW_PGS" + +ceph osd pool create warn1 256 --autoscale-mode=warn +wait_for 120 "ceph health detail | grep POOL_TOO_MANY_PGS" + ceph osd pool rm meta0 meta0 --yes-i-really-really-mean-it ceph osd pool rm bulk0 bulk0 --yes-i-really-really-mean-it ceph osd pool rm bulk1 bulk1 --yes-i-really-really-mean-it ceph osd pool rm bulk2 bulk2 --yes-i-really-really-mean-it +ceph osd pool rm warn0 warn0 --yes-i-really-really-mean-it +ceph osd pool rm warn1 warn1 --yes-i-really-really-mean-it echo OK -- 2.39.5