From 52c1b86a8e490876536bc98be0e5e3c6a7f7e365 Mon Sep 17 00:00:00 2001 From: Phil Henderson Date: Fri, 6 Sep 2024 15:03:01 -0400 Subject: [PATCH 1/5] DAOS-16495 test: Use the test env control config file w/ dmg Use the TestEnvironment.conftrol.config file by default with the DmgCommand object when a config file is not specified. Skip-unit-tests: true Skip-fault-injection-test: true Test-tag: DmgNvmeScanTest ConfigGenerateOutput ConfigGenerateRun HarnessConfigTest Required-githooks: true Signed-off-by: Phil Henderson --- src/tests/ftest/util/dmg_utils_base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tests/ftest/util/dmg_utils_base.py b/src/tests/ftest/util/dmg_utils_base.py index 31ba1b50f33..49edb4628dd 100644 --- a/src/tests/ftest/util/dmg_utils_base.py +++ b/src/tests/ftest/util/dmg_utils_base.py @@ -8,6 +8,7 @@ from ClusterShell.NodeSet import NodeSet from command_utils import CommandWithSubCommand, YamlCommand from command_utils_base import BasicParameter, CommandWithParameters, FormattedParameter +from environment_utils import TestEnvironment from general_utils import nodeset_append_suffix @@ -33,6 +34,8 @@ def __init__(self, path, yaml_cfg=None, hostlist_suffix=None): default_yaml_file = None if self.yaml is not None and hasattr(self.yaml, "filename"): default_yaml_file = self.yaml.filename + else: + default_yaml_file = TestEnvironment().control_config self.hostlist_suffix = hostlist_suffix From 974fdf6f0095697635d68ecc2368fa599245eb24 Mon Sep 17 00:00:00 2001 From: Phil Henderson Date: Fri, 6 Sep 2024 15:52:06 -0400 Subject: [PATCH 2/5] Update harness/config.py server setup for VMs. Skip-unit-tests: true Skip-fault-injection-test: true Test-tag: DmgNvmeScanTest ConfigGenerateOutput ConfigGenerateRun HarnessConfigTest Required-githooks: true Signed-off-by: Phil Henderson --- src/tests/ftest/harness/config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests/ftest/harness/config.yaml b/src/tests/ftest/harness/config.yaml index a9c19625b3e..be19a641812 100644 --- a/src/tests/ftest/harness/config.yaml +++ b/src/tests/ftest/harness/config.yaml @@ -9,6 +9,8 @@ server_config: engines_per_host: 1 engines: 0: + targets: 4 + nr_xs_helpers: 0 storage: 0: class: ram From 0ea125105f1355c778bb35a2204ed0103e2eca90 Mon Sep 17 00:00:00 2001 From: Phil Henderson Date: Fri, 6 Sep 2024 16:50:40 -0400 Subject: [PATCH 3/5] Cleaner fix. Skip-unit-tests: true Skip-fault-injection-test: true Test-tag: DmgNvmeScanTest ConfigGenerateOutput ConfigGenerateRun HarnessConfigTest Required-githooks: true Signed-off-by: Phil Henderson --- src/tests/ftest/util/dmg_utils_base.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/tests/ftest/util/dmg_utils_base.py b/src/tests/ftest/util/dmg_utils_base.py index 49edb4628dd..a601b590033 100644 --- a/src/tests/ftest/util/dmg_utils_base.py +++ b/src/tests/ftest/util/dmg_utils_base.py @@ -31,11 +31,9 @@ def __init__(self, path, yaml_cfg=None, hostlist_suffix=None): self.temporary_file_hosts = NodeSet(gethostname().split(".")[0]) # If specified use the configuration file from the YamlParameters object - default_yaml_file = None + default_yaml_file = TestEnvironment().control_config if self.yaml is not None and hasattr(self.yaml, "filename"): default_yaml_file = self.yaml.filename - else: - default_yaml_file = TestEnvironment().control_config self.hostlist_suffix = hostlist_suffix From 8e52e3597b8c46f7ec2ccb484ef3f5b8ddc6c5ee Mon Sep 17 00:00:00 2001 From: Phil Henderson Date: Tue, 17 Sep 2024 15:39:55 -0400 Subject: [PATCH 4/5] Fix control_metadata_path specification for config generate. Skip-unit-tests: true Skip-fault-injection-test: true Test-tag: DmgNvmeScanTest ConfigGenerateOutput ConfigGenerateRun HarnessConfigTest Required-githooks: true Signed-off-by: Phil Henderson --- src/tests/ftest/control/config_generate_run.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/tests/ftest/control/config_generate_run.py b/src/tests/ftest/control/config_generate_run.py index 98b57b64f00..366170851e2 100644 --- a/src/tests/ftest/control/config_generate_run.py +++ b/src/tests/ftest/control/config_generate_run.py @@ -4,6 +4,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent ''' +import os + import yaml from apricot import TestWithServers from server_utils import ServerFailed @@ -45,16 +47,16 @@ def test_config_generate_run(self): # use_tmpfs_scm specifies that a MD-on-SSD conf should be generated and control metadata # path needs to be set in that case. - ext_md_path = "" + control_metadata = None if use_tmpfs_scm: - ext_md_path = self.test_env.log_dir + control_metadata = os.path.join(self._test_env.log_dir, 'control_metadata') # Call dmg config generate. AP is always the first server host. server_host = self.hostlist_servers[0] result = self.get_dmg_command().config_generate( access_points=server_host, num_engines=num_engines, scm_only=scm_only, net_class=net_class, net_provider=net_provider, use_tmpfs_scm=use_tmpfs_scm, - control_metadata_path=ext_md_path) + control_metadata_path=control_metadata) try: generated_yaml = yaml.safe_load(result.stdout) @@ -70,7 +72,7 @@ def test_config_generate_run(self): # Create a new server config from generated_yaml and update SCM-related # data in engine_params so that the cleanup before the server start # works. - self.log.info("Copy config to /etc/daos and update engine_params") + self.log.info("Copy config to %s and update engine_params", self.test_env.server_config) self.server_managers[0].update_config_file_from_file(generated_yaml) # Start server with the generated config. From 008c97480d02a40ff1e2341f403963c7ff291780 Mon Sep 17 00:00:00 2001 From: Phil Henderson Date: Tue, 17 Sep 2024 15:47:54 -0400 Subject: [PATCH 5/5] Fix typo. Skip-unit-tests: true Skip-fault-injection-test: true Test-tag: DmgNvmeScanTest ConfigGenerateOutput ConfigGenerateRun HarnessConfigTest Required-githooks: true Signed-off-by: Phil Henderson --- src/tests/ftest/control/config_generate_run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/ftest/control/config_generate_run.py b/src/tests/ftest/control/config_generate_run.py index 366170851e2..efaa992df31 100644 --- a/src/tests/ftest/control/config_generate_run.py +++ b/src/tests/ftest/control/config_generate_run.py @@ -49,7 +49,7 @@ def test_config_generate_run(self): # path needs to be set in that case. control_metadata = None if use_tmpfs_scm: - control_metadata = os.path.join(self._test_env.log_dir, 'control_metadata') + control_metadata = os.path.join(self.test_env.log_dir, 'control_metadata') # Call dmg config generate. AP is always the first server host. server_host = self.hostlist_servers[0]