]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa: rados.py shouldn't clean up if test failed
authorBill Scales <bill_scales@uk.ibm.com>
Thu, 14 Aug 2025 12:04:25 +0000 (13:04 +0100)
committerBill Scales <bill_scales@uk.ibm.com>
Fri, 15 Aug 2025 08:27:22 +0000 (09:27 +0100)
Throw exception for a test failure slightly earlier, before trying
to clean up. If the test has failed and the watchdog has killed
the OSDs then the clean up will fail leading to a further exception
that will end up getting reported as the test failure reason

Signed-off-by: Bill Scales <bill_scales@uk.ibm.com>
qa/tasks/rados.py

index 89e0b4dbcf78a974331e1491e8dda87c61908f6f..6bd57cb09ffbe30803abb4398f9c5211b8ad1303 100644 (file)
@@ -346,6 +346,11 @@ def task(ctx, config):
                 watched_process.set_exception(e)
 
             run.wait(tests.values())
+
+            # If test has failed then don't try to clean up
+            if watched_process.exception:
+                raise watched_process.exception
+
             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:
@@ -354,9 +359,6 @@ def task(ctx, config):
                 manager.wait_for_clean()
                 manager.wait_for_all_osds_up(timeout=1800)
 
-            if watched_process.exception:
-                raise watched_process.exception
-
             for pool in created_pools:
                 manager.wait_snap_trimming_complete(pool)
                 manager.remove_pool(pool)