From ee6d6151f49c3c1b3c1cc8573c3e892953b4da02 Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Thu, 8 Aug 2024 19:26:02 +0200 Subject: [PATCH] DAOS-14408 common: ensure NDCTL not used for storage class `ram` NDCTL features can not be used with no-DCPM PMem (simulated PMem) PMEMOBJ_CONF=sds.at_create=0 disables NDCTL features in PMDK Required-githooks: true Signed-off-by: Tomasz Gromadzki --- src/tests/ftest/config_file_gen.py | 8 +++++++- src/tests/ftest/util/server_utils_params.py | 8 ++++++++ utils/nlt_server.yaml | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/tests/ftest/config_file_gen.py b/src/tests/ftest/config_file_gen.py index 58f97f3b902..16f9cccad26 100755 --- a/src/tests/ftest/config_file_gen.py +++ b/src/tests/ftest/config_file_gen.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ - (C) Copyright 2020-2023 Intel Corporation. + (C) Copyright 2020-2024 Intel Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent """ @@ -51,6 +51,12 @@ def generate_server_config(args): config.engine_params[0].storage.storage_tiers[0].storage_class.value = "ram" config.engine_params[0].storage.storage_tiers[0].scm_mount.value = "/mnt/daos" config.engine_params[0].storage.storage_tiers[0].scm_size.value = 0 + + # Disable shutdown state (SDS) (part of RAS) for RAM-based simulated SCM. + # RAM doesn't support this feature and trying to use it will fail the create/open operations. + # PMEMOBJ expects the shutdown state support by default when built with NDCTL. + config.engine_params[0].env_vars.update("PMEMOBJ_CONF=sds.at_create=0", append=True) + # Update the configuration file access points config.other_params.access_points.value = args.node_list.split(",") return create_config(args, config) diff --git a/src/tests/ftest/util/server_utils_params.py b/src/tests/ftest/util/server_utils_params.py index 248617c1b36..93f91ef3d5b 100644 --- a/src/tests/ftest/util/server_utils_params.py +++ b/src/tests/ftest/util/server_utils_params.py @@ -530,6 +530,14 @@ def get_params(self, test): env.split("=", maxsplit=1)[0]: env.split("=", maxsplit=1)[1] for env in self.REQUIRED_ENV_VARS[name]}) + # Disable shutdown state (SDS) (part of RAS) for RAM-based simulated SCM. + # RAM doesn't support this feature and trying to use + # it will fail the create/open operations. + # PMEMOBJ expects the shutdown state support by default when built with NDCTL. + + if not self.using_dcpm: + required_env_vars["PMEMOBJ_CONF"] = "sds.at_create=0" + # Enable fault injection if configured if test.fault_injection.fault_file is not None: self.log.debug("Enabling fault injection") diff --git a/utils/nlt_server.yaml b/utils/nlt_server.yaml index d30dd9721bf..9021f9b0fb0 100644 --- a/utils/nlt_server.yaml +++ b/utils/nlt_server.yaml @@ -15,6 +15,7 @@ engines: - DAOS_STRICT_SHUTDOWN=1 - DAOS_TARGET_OVERSUBSCRIBE=1 - ABT_STACK_OVERFLOW_CHECK=mprotect + - PMEMOBJ_CONF=sds.at_create=0 storage: - class: ram