From d242d510c67d3223583b532ca6265bc2adffd307 Mon Sep 17 00:00:00 2001 From: Saurabh Tandan Date: Mon, 29 Mar 2021 17:18:35 +0000 Subject: [PATCH] DAOS-7115 test: Fix rebuild_test.py failing in CI Due to recent increase of resources on vms the test started failing and brought up some test code issues as well as daos handling of server start when resources available on nodes are limited. As a workaround number of targets for the test is reduced and the way calculations are done for expected values is modified a little. Quick-Functional: true Test-tag: rebuild_tests Signed-off-by: Saurabh Tandan --- src/tests/ftest/pool/rebuild_tests.py | 31 ++++++++++++++++++------- src/tests/ftest/pool/rebuild_tests.yaml | 2 +- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/tests/ftest/pool/rebuild_tests.py b/src/tests/ftest/pool/rebuild_tests.py index 3942b4ede13..8b4e2431c1a 100755 --- a/src/tests/ftest/pool/rebuild_tests.py +++ b/src/tests/ftest/pool/rebuild_tests.py @@ -34,14 +34,23 @@ def run_rebuild_test(self, pool_quantity): rank = self.params.get("rank", "/run/testparams/*") obj_class = self.params.get("object_class", "/run/testparams/*") - # Create the pools and confirm their status + # Collect server configuration information server_count = len(self.hostlist_servers) + engine_count = self.server_managers[0].get_config_value( + "engines_per_host") + engine_count = 1 if engine_count is None else int(engine_count) + target_count = int(self.server_managers[0].get_config_value("targets")) + self.log.info( + "Running with %s servers, %s engines per server, and %s targets " + "per engine", server_count, engine_count, target_count) + + # Create the pools and confirm their status status = True for index in range(pool_quantity): self.pool[index].create() status &= self.pool[index].check_pool_info( - pi_nnodes=server_count, - pi_ntargets=server_count, # DAOS-2799 + pi_nnodes=server_count * engine_count, + pi_ntargets=server_count * engine_count * target_count, pi_ndisabled=0 ) status &= self.pool[index].check_rebuild_status( @@ -94,9 +103,9 @@ def run_rebuild_test(self, pool_quantity): status = True for index in range(pool_quantity): status &= self.pool[index].check_pool_info( - pi_nnodes=server_count, - pi_ntargets=server_count, # DAOS-2799 - pi_ndisabled=1 + pi_nnodes=server_count * engine_count, + pi_ntargets=server_count * engine_count * target_count, + pi_ndisabled=target_count ) status &= self.pool[index].check_rebuild_status( rs_done=1, rs_obj_nr=rs_obj_nr[index], @@ -120,7 +129,10 @@ def test_simple_rebuild(self): Use Cases: single pool rebuild, single client, various record/object counts - :avocado: tags=all,daily_regression,large,pool,rebuild,rebuildsimple + :avocado: tags=all,daily_regression + :avocado: tags=vm,large + :avocado: tags=rebuild + :avocado: tags=pool,rebuild_tests,test_simple_rebuild """ self.run_rebuild_test(1) @@ -134,6 +146,9 @@ def test_multipool_rebuild(self): Use Cases: multipool rebuild, single client, various object and record counts - :avocado: tags=all,daily_regression,large,pool,rebuild,rebuildmulti + :avocado: tags=all,daily_regression + :avocado: tags=vm,large + :avocado: tags=rebuild + :avocado: tags=pool,rebuild_tests,test_multipool_rebuild """ self.run_rebuild_test(self.params.get("quantity", "/run/testparams/*")) diff --git a/src/tests/ftest/pool/rebuild_tests.yaml b/src/tests/ftest/pool/rebuild_tests.yaml index 73530a56937..1b48e1341f4 100644 --- a/src/tests/ftest/pool/rebuild_tests.yaml +++ b/src/tests/ftest/pool/rebuild_tests.yaml @@ -12,7 +12,7 @@ timeout: 600 server_config: name: daos_server servers: - targets: 8 + targets: 2 pool: mode: 511 name: daos_server