Skip to content

Commit

Permalink
Fix control_metadata_path specification for config generate.
Browse files Browse the repository at this point in the history
Skip-unit-tests: true
Skip-fault-injection-test: true
Test-tag: DmgNvmeScanTest ConfigGenerateOutput ConfigGenerateRun HarnessConfigTest

Required-githooks: true

Signed-off-by: Phil Henderson <[email protected]>
  • Loading branch information
phender committed Sep 17, 2024
1 parent 6c60662 commit 8e52e35
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/tests/ftest/control/config_generate_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
'''

import os

import yaml
from apricot import TestWithServers
from server_utils import ServerFailed
Expand Down Expand Up @@ -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')

Check failure on line 52 in src/tests/ftest/control/config_generate_run.py

View workflow job for this annotation

GitHub Actions / Pylint check

no-member, Instance of 'ConfigGenerateRun' has no '_test_env' member; maybe 'test_env'?

# 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)
Expand All @@ -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.
Expand Down

0 comments on commit 8e52e35

Please sign in to comment.