From 1cc65931071c0aacec4da9a23d8b31d81d9934cf Mon Sep 17 00:00:00 2001 From: Kamoltat Date: Thu, 17 Aug 2023 20:01:38 +0000 Subject: [PATCH] qa/suites/rados: Added wait_for_all_active_clean_pgs flag Added flag to not allow rados suite to delete the pool unless all pgs are active+clean and all OSDs are up in the thrashosds side of the test. Fixes: https://tracker.ceph.com/issues/59172 Signed-off-by: Kamoltat (cherry picked from commit 3ccd10f266cfd7ec6dd1ad930598bfe4ca422a90) --- .../thrash-erasure-code/thrashers/minsize_recovery.yaml | 5 ++++- qa/tasks/rados.py | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/qa/suites/rados/thrash-erasure-code/thrashers/minsize_recovery.yaml b/qa/suites/rados/thrash-erasure-code/thrashers/minsize_recovery.yaml index 771d9a1047a70..f7df20f313f0e 100644 --- a/qa/suites/rados/thrash-erasure-code/thrashers/minsize_recovery.yaml +++ b/qa/suites/rados/thrash-erasure-code/thrashers/minsize_recovery.yaml @@ -13,7 +13,10 @@ overrides: osd scrub min interval: 60 osd scrub max interval: 120 osd max backfills: 2 + rados: + wait_for_all_active_clean_pgs: true + tasks: - thrashosds: timeout: 1200 - chance_test_min_size: 3 + chance_test_min_size: 3 diff --git a/qa/tasks/rados.py b/qa/tasks/rados.py index a730a72993c24..625ea4d9d7640 100644 --- a/qa/tasks/rados.py +++ b/qa/tasks/rados.py @@ -272,6 +272,13 @@ def task(ctx, config): ) tests[id_] = proc run.wait(tests.values()) + wait_for_all_active_clean_pgs = config.get("wait_for_all_active_clean_pgs", False) + # usually set when we do min_size testing. + if wait_for_all_active_clean_pgs: + # Make sure we finish the test first before deleting the pool. + # Mainly used for test_pool_min_size + manager.wait_for_clean() + manager.wait_for_all_osds_up(timeout=1800) for pool in created_pools: manager.wait_snap_trimming_complete(pool); -- 2.39.5