From 74f02b84e526eca04ec88ed222c4a7d0e1b2b9dd Mon Sep 17 00:00:00 2001 From: Makito Kano Date: Fri, 24 Jan 2025 00:37:44 +0000 Subject: [PATCH] DAOS-16549 test: Revert changes in launch_utils.py and storage_utils.py Skip-unit-tests: true Skip-fault-injection-test: true Skip-func-hw-test-medium-md-on-ssd: false Test-tag: pool_create_all Signed-off-by: Makito Kano --- src/tests/ftest/util/launch_utils.py | 17 +----- src/tests/ftest/util/storage_utils.py | 86 ++++++++------------------- 2 files changed, 26 insertions(+), 77 deletions(-) diff --git a/src/tests/ftest/util/launch_utils.py b/src/tests/ftest/util/launch_utils.py index a34c9581d76..3628729442e 100644 --- a/src/tests/ftest/util/launch_utils.py +++ b/src/tests/ftest/util/launch_utils.py @@ -1126,26 +1126,11 @@ def _add_auto_storage_yaml(self, logger, storage_info, yaml_dir, tier_0_type, sc engines = engines[0] yaml_file = os.path.join(yaml_dir, f"extra_yaml_storage_{engines}_engine.yaml") - - server_config_namespace = dict_extract_values( - yaml_data, ["setup", "server_config_namespace"]) - logger.debug("## server_config_namespace = %s", server_config_namespace) - server_config_path = server_config_namespace[0].split("/") - server_config_0 = server_config_path[2] - logger.debug("## server_config_0 = %s", server_config_0) - server_config_1 = dict_extract_values(yaml_data, [server_config_0]) - logger.debug("## server_config_1 = %s", server_config_1) - server_config_targets = [] - for server_config_target in server_config_1[0]: - server_config_targets.append(server_config_target) - logger.debug("## server_config_targets = %s", server_config_targets) - - if engines not in engine_storage_yaml: logger.debug("-" * 80) storage_info.write_storage_yaml( yaml_file, engines, tier_0_type, scm_size, scm_mount, max_nvme_tiers, - control_metadata, server_config_targets) + control_metadata) engine_storage_yaml[engines] = yaml_file logger.debug( " - Adding auto-storage extra yaml %s for %s", diff --git a/src/tests/ftest/util/storage_utils.py b/src/tests/ftest/util/storage_utils.py index f3553b0f7e4..2aa27b5ea53 100644 --- a/src/tests/ftest/util/storage_utils.py +++ b/src/tests/ftest/util/storage_utils.py @@ -633,8 +633,7 @@ def _get_addresses(self, hosts, device): return list(addresses) def write_storage_yaml(self, yaml_file, engines, tier_0_type, scm_size=0, - scm_mount='/mnt/daos', max_nvme_tiers=1, control_metadata=None, - server_configs=None): + scm_mount='/mnt/daos', max_nvme_tiers=1, control_metadata=None): """Generate a storage test yaml sub-section. Args: @@ -646,7 +645,6 @@ def write_storage_yaml(self, yaml_file, engines, tier_0_type, scm_size=0, max_nvme_tiers (int): maximum number of nvme storage tiers. Defaults to 1. control_metadata (str, optional): directory to store control plane metadata when using metadata on SSD. Defaults to None. - server_configs (list): Raises: StorageException: if an invalid storage type was specified @@ -707,64 +705,30 @@ def write_storage_yaml(self, yaml_file, engines, tier_0_type, scm_size=0, bdev_list[engine][tier].append(f'"{device}"') self._log.debug(' NVMe/VMD bdev_list: %s', bdev_list) - - if server_configs: - lines = ["server_configurations:"] - for server_config in server_configs: - lines.append(f' {server_config}:') - lines.append(' server_config:') - if control_metadata and bdev_list: - lines.append(' control_metadata:') - lines.append(f' path: {control_metadata}') - lines.append(' engines:') - for engine in range(engines): - lines.append(f' {str(engine)}:') - lines.append(' storage:') - for tier in range(tiers): - lines.append(f' {str(tier)}:') - if tier == 0 and pmem_list: - lines.append(' class: dcpm') - lines.append(f' scm_list: ["{pmem_list[engine]}"]') - lines.append(f' scm_mount: {scm_mount}{engine}') - elif tier == 0: - lines.append(' class: ram') - lines.append(f' scm_mount: {scm_mount}{engine}') - lines.append(f' scm_size: {scm_size}') - else: - lines.append(' class: nvme') - bdev_address = ", ".join(bdev_list[engine][tier]) - lines.append(f' bdev_list: [{bdev_address}]') - if control_metadata: - tier_roles = ", ".join(get_tier_roles(tier, tiers)) - lines.append( - f' bdev_roles: [{tier_roles}]') - - - else: - lines = ['server_config:'] - if control_metadata and bdev_list: - lines.append(' control_metadata:') - lines.append(f' path: {control_metadata}') - lines.append(' engines:') - for engine in range(engines): - lines.append(f' {str(engine)}:') - lines.append(' storage:') - for tier in range(tiers): - lines.append(f' {str(tier)}:') - if tier == 0 and pmem_list: - lines.append(' class: dcpm') - lines.append(f' scm_list: ["{pmem_list[engine]}"]') - lines.append(f' scm_mount: {scm_mount}{engine}') - elif tier == 0: - lines.append(' class: ram') - lines.append(f' scm_mount: {scm_mount}{engine}') - lines.append(f' scm_size: {scm_size}') - else: - lines.append(' class: nvme') - lines.append(f' bdev_list: [{", ".join(bdev_list[engine][tier])}]') - if control_metadata: - lines.append( - f' bdev_roles: [{", ".join(get_tier_roles(tier, tiers))}]') + lines = ['server_config:'] + if control_metadata and bdev_list: + lines.append(' control_metadata:') + lines.append(f' path: {control_metadata}') + lines.append(' engines:') + for engine in range(engines): + lines.append(f' {str(engine)}:') + lines.append(' storage:') + for tier in range(tiers): + lines.append(f' {str(tier)}:') + if tier == 0 and pmem_list: + lines.append(' class: dcpm') + lines.append(f' scm_list: ["{pmem_list[engine]}"]') + lines.append(f' scm_mount: {scm_mount}{engine}') + elif tier == 0: + lines.append(' class: ram') + lines.append(f' scm_mount: {scm_mount}{engine}') + lines.append(f' scm_size: {scm_size}') + else: + lines.append(' class: nvme') + lines.append(f' bdev_list: [{", ".join(bdev_list[engine][tier])}]') + if control_metadata: + lines.append( + f' bdev_roles: [{", ".join(get_tier_roles(tier, tiers))}]') self._log.debug(' Creating %s', yaml_file) for line in lines: