Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-15655 test: stop passing server group #14201

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tests/ftest/aggregation/continuous_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def run_ior_repeat(self, namespace, pool, container):
"""
ior_cmd = IorCommand(namespace=namespace)
ior_cmd.get_params(self)
ior_cmd.set_daos_params(self.server_group, pool, container.identifier)
ior_cmd.set_daos_params(pool, container.identifier)
testfile = os.path.join(os.sep, "test_file_1")
ior_cmd.test_file.update(testfile)
manager = get_job_manager(test=self, job=ior_cmd, subprocess=self.subprocess)
Expand Down
3 changes: 1 addition & 2 deletions src/tests/ftest/aggregation/multiple_pool_cont.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ def longrun_aggregation(self, total_pools=1, total_containers_per_pool=1):
container.identifier)
try:
result = run_ior(self, job_manager, ior_log, self.hostlist_clients,
self.workdir, None, self.server_group,
container.pool, container,
self.workdir, None, container.pool, container,
self.processes)
self.log.info(result)
except CommandFailure as error:
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/aggregation/space_rb.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def run_ior_verify_error(self, namespace, pool, container, job_num, errors):
"""
ior_cmd = IorCommand(namespace=namespace)
ior_cmd.get_params(self)
ior_cmd.set_daos_params(self.server_group, pool, container.identifier)
ior_cmd.set_daos_params(pool, container.identifier)
testfile = os.path.join(os.sep, f"test_file_{job_num}")
ior_cmd.test_file.update(testfile)
manager = get_job_manager(test=self, job=ior_cmd, subprocess=self.subprocess)
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/container/multiple_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_multiple_container_delete(self):
for loop in range(50):
self.log.info("Create-Write-Destroy Iteration %d", loop)
self.create_cont()
self.ior_cmd.set_daos_params(self.server_group, self.pool, self.container.identifier)
self.ior_cmd.set_daos_params(self.pool, self.container.identifier)
# If the transfer size is less than 4K, the objects are
# inserted into SCM and anything greater goes to SSD
self.run_ior_with_pool(create_cont=False)
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/container/per_server_fault_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def verify_per_server_fault(self, create_pool, ranks_to_stop, properties,
self.container = self.get_container(pool=self.pool, properties=properties)

# Run IOR to write some data to the container.
self.ior_cmd.set_daos_params(self.server_group, self.pool, self.container.identifier)
self.ior_cmd.set_daos_params(self.pool, self.container.identifier)
manager = self.get_ior_job_manager_command()
self.run_ior(manager=manager, processes=1)

Expand Down
3 changes: 1 addition & 2 deletions src/tests/ftest/control/dmg_telemetry_io_latency.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ def test_io_latency_telmetry_metrics(self):
self.log.info("<<< Start ior %s transfer_size=%s", operation, transfer_size)
self.ior_cmd.transfer_size.update(transfer_size)
self.ior_cmd.flags.update(flags)
self.ior_cmd.set_daos_params(
self.server_group, self.pool, self.container[-1].identifier)
self.ior_cmd.set_daos_params(self.pool, self.container[-1].identifier)
# Run ior command
ior_results = self.run_ior_with_pool(
timeout=200, create_pool=False, create_cont=False)
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/deployment/agent_failure.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def run_ior_collect_error(self, results, job_num, file_name, clients):
"""
ior_cmd = IorCommand()
ior_cmd.get_params(self)
ior_cmd.set_daos_params(self.server_group, self.pool, self.container.identifier)
ior_cmd.set_daos_params(self.pool, self.container.identifier)
testfile = os.path.join(os.sep, file_name)
ior_cmd.update_params(test_file=testfile)

Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/deployment/network_failure.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def run_ior_report_error(self, results, job_num, file_name, pool, container,
ior_cmd.get_params(self)

# Standard IOR prep sequence.
ior_cmd.set_daos_params(self.server_group, pool, container.identifier)
ior_cmd.set_daos_params(pool, container.identifier)
ior_cmd.test_file.update(os.path.join(os.sep, file_name))

manager = get_job_manager(
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/deployment/server_rank_failure.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def run_ior_report_error(self, results, job_num, file_name, pool, container,
ior_cmd.get_params(self)

# Standard IOR prep sequence.
ior_cmd.set_daos_params(self.server_group, pool, container.identifier)
ior_cmd.set_daos_params(pool, container.identifier)
ior_cmd.update_params(test_file=os.path.join(os.sep, file_name))

manager = get_job_manager(
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/deployment/target_failure.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def run_ior_report_error(self, results, job_num, file_name, pool, container, nam
ior_cmd.get_params(self)

# Standard IOR prep sequence.
ior_cmd.set_daos_params(self.server_group, pool, container.identifier)
ior_cmd.set_daos_params(pool, container.identifier)
testfile = os.path.join(os.sep, file_name)
ior_cmd.test_file.update(testfile)

Expand Down
3 changes: 1 addition & 2 deletions src/tests/ftest/erasurecode/space_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ def _run_test(self, ior_namespace):
# Run IOR
self.ior_cmd.namespace = ior_namespace
self.ior_cmd.get_params(self)
self.ior_cmd.set_daos_params(
self.server_group, self.pool.identifier, self.container.identifier)
self.ior_cmd.set_daos_params(self.pool.identifier, self.container.identifier)
self.run_ior_with_pool(create_pool=False, create_cont=False, display_space=False)

# Save space per target after running IOR
Expand Down
3 changes: 1 addition & 2 deletions src/tests/ftest/io/parallel_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,7 @@ def test_multipool_parallelio(self):

# run ior on all containers
self.ior_cmd.test_file.update(os.path.join(dfuse_cont_dir, 'testfile'))
self.ior_cmd.set_daos_params(
self.server_group, pool, self.container[cont_num].identifier)
self.ior_cmd.set_daos_params(pool, self.container[cont_num].identifier)
thread = threading.Thread(
target=self.run_ior,
args=(self.get_ior_job_manager_command(), processes, None,
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/ior/crash.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def test_ior_crash(self):
# Create pool and container
self.pool = self.get_pool(connect=False)
self.container = self.get_container(self.pool)
self.ior_cmd.set_daos_params(self.server_group, self.pool, self.container.identifier)
self.ior_cmd.set_daos_params(self.pool, self.container.identifier)

# Don't check subprocess status, since output is buffered and can't be read in real time
self.ior_cmd.pattern = None
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/nvme/enospace.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def ior_bg_thread(self, event):
# Define the IOR Command and use the parameter from yaml file.
ior_bg_cmd = IorCommand()
ior_bg_cmd.get_params(self)
ior_bg_cmd.set_daos_params(self.server_group, self.pool, None)
ior_bg_cmd.set_daos_params(self.pool, None)
ior_bg_cmd.dfs_oclass.update(self.ior_cmd.dfs_oclass.value)
ior_bg_cmd.api.update(self.ior_cmd.api.value)
ior_bg_cmd.transfer_size.update(self.ior_scm_xfersize)
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/nvme/fragmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def ior_runner_thread(self, results):
ior_cmd = IorCommand()
ior_cmd.get_params(self)
cont_label = self.label_generator.get_label('cont')
ior_cmd.set_daos_params(self.server_group, self.pool, cont_label)
ior_cmd.set_daos_params(self.pool, cont_label)
ior_cmd.dfs_oclass.update(oclass)
ior_cmd.api.update(api)
ior_cmd.transfer_size.update(test[0])
Expand Down
3 changes: 1 addition & 2 deletions src/tests/ftest/nvme/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ def test_nvme_io(self):
self.ior_cmd.transfer_size.update(ior_param[1])
self.ior_cmd.block_size.update(ior_param[2])
self.ior_cmd.dfs_oclass.update(obj_type)
self.ior_cmd.set_daos_params(
self.server_group, self.pool, self.container.identifier)
self.ior_cmd.set_daos_params(self.pool, self.container.identifier)
self.run_ior(self.get_ior_job_manager_command(), ior_param[3])

# Verify IOR consumed the expected amount from the pool
Expand Down
4 changes: 2 additions & 2 deletions src/tests/ftest/nvme/io_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def test_nvme_io_verification(self):
self.ior_cmd.block_size.update(self.ior_block_size)
container = self.get_container(self.pool)
container.open() # Workaround for pydaos handles
self.ior_cmd.set_daos_params(self.server_group, self.pool, container.identifier)
self.ior_cmd.set_daos_params(self.pool, container.identifier)
self.run_ior(self.job_manager, self.ior_processes)

# Verify IOR consumed the expected amount from the pool
Expand Down Expand Up @@ -136,7 +136,7 @@ def test_nvme_server_restart(self):
else:
self.ior_cmd.block_size.update(self.ior_block_size)
container = self.get_container(self.pool)
self.ior_cmd.set_daos_params(self.server_group, self.pool, container.identifier)
self.ior_cmd.set_daos_params(self.pool, container.identifier)
self.run_ior(self.job_manager, self.ior_processes)

# Stop all servers
Expand Down
3 changes: 1 addition & 2 deletions src/tests/ftest/nvme/pool_capacity.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ def ior_thread(self, pool, oclass, api, test, flags, results):
# Define the arguments for the ior_runner_thread method
ior_cmd = IorCommand()
ior_cmd.get_params(self)
ior_cmd.set_daos_params(
self.server_group, pool, self.label_generator.get_label('TestContainer'))
ior_cmd.set_daos_params(pool, self.label_generator.get_label('TestContainer'))
ior_cmd.dfs_oclass.update(oclass)
ior_cmd.api.update(api)
ior_cmd.transfer_size.update(test[2])
Expand Down
1 change: 0 additions & 1 deletion src/tests/ftest/nvme/pool_exclude.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ def run_nvme_pool_exclude(self, num_pool, oclass=None):
"hosts": self.hostlist_clients,
"path": self.workdir,
"slots": None,
"group": self.server_group,
"pool": pool[val],
"container": self.cont_list[-1],
"processes": self.params.get("np", "/run/ior/client_processes/*"),
Expand Down
1 change: 0 additions & 1 deletion src/tests/ftest/pool/verify_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ def test_verify_pool_space(self):
'hosts': self.hostlist_clients,
'path': self.workdir,
'slots': None,
'group': self.server_group,
'processes': None,
'ppn': 8,
'namespace': '/run/ior/*',
Expand Down
3 changes: 1 addition & 2 deletions src/tests/ftest/recovery/pool_membership.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,7 @@ def test_dangling_rank_entry(self):

# 2. Write some data with IOR using SX.
self.log_step("Write some data with IOR.")
self.ior_cmd.set_daos_params(
self.server_group, self.pool, self.container.identifier)
self.ior_cmd.set_daos_params(self.pool, self.container.identifier)
self.run_ior_with_pool(create_pool=False, create_cont=False)

# 3. Stop servers.
Expand Down
2 changes: 1 addition & 1 deletion src/tests/ftest/server/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def test_metadata_server_restart(self):
# Define the arguments for the run_ior_loop method
ior_cmd = IorCommand()
ior_cmd.get_params(self)
ior_cmd.set_daos_params(self.server_group, self.pool, None)
ior_cmd.set_daos_params(self.pool, None)
ior_cmd.flags.value = self.params.get("ior{}flags".format(operation), "/run/ior/*")

# Define the job manager for the IOR command
Expand Down
6 changes: 3 additions & 3 deletions src/tests/ftest/util/data_mover_test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ def set_ior_params(self, param_type, path, pool=None, cont=None,
self.ior_cmd.api.update("DFS", display_api)
self.ior_cmd.test_file.update(path, display_test_file)
if pool:
self.ior_cmd.set_daos_params(self.server_group, pool, cont_uuid or None)
self.ior_cmd.set_daos_params(pool, cont_uuid or None)

def run_ior_with_params(self, param_type, path, pool=None, cont=None,
path_suffix=None, flags=None, display=True,
Expand Down Expand Up @@ -856,9 +856,9 @@ def set_mdtest_params(self, param_type, path, pool=None, cont=None, flags=None,
self.mdtest_cmd.api.update("DFS", display_api)
self.mdtest_cmd.test_dir.update(path, display_test_dir)
if pool and cont_uuid:
self.mdtest_cmd.set_daos_params(self.server_group, pool, cont_uuid)
self.mdtest_cmd.update_params(dfs_pool=pool.identifier, dfs_cont=cont_uuid)
elif pool:
self.mdtest_cmd.set_daos_params(self.server_group, pool, None)
self.mdtest_cmd.update_params(dfs_pool=pool.identifier, dfs_cont=None)

def run_mdtest_with_params(self, param_type, path, pool=None, cont=None,
flags=None, display=True):
Expand Down
3 changes: 1 addition & 2 deletions src/tests/ftest/util/ior_test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@ def update_ior_cmd_with_pool(self, create_cont=True):
self.pool.connect()
self.create_cont()
# Update IOR params with the pool and container params
self.ior_cmd.set_daos_params(self.server_group, self.pool,
self.container.uuid)
self.ior_cmd.set_daos_params(self.pool, self.container.uuid)

def get_ior_job_manager_command(self):
"""Get the MPI job manager command for IOR.
Expand Down
27 changes: 11 additions & 16 deletions src/tests/ftest/util/ior_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get_ior(test, manager, hosts, path, slots, namespace="/run/ior/*", ior_param
return ior


def run_ior(test, manager, log, hosts, path, slots, group, pool, container, processes, ppn=None,
def run_ior(test, manager, log, hosts, path, slots, pool, container, processes, ppn=None,
intercept=None, plugin_path=None, dfuse=None, display_space=True, fail_on_warning=False,
namespace="/run/ior/*", ior_params=None):
# pylint: disable=too-many-arguments
Expand All @@ -52,7 +52,6 @@ def run_ior(test, manager, log, hosts, path, slots, group, pool, container, proc
hosts (NodeSet): hosts on which to run the ior command
path (str): hostfile path.
slots (int): hostfile number of slots per host.
group (str): DAOS server group name
pool (TestPool): DAOS test pool object
container (TestContainer): DAOS test container object.
processes (int): number of processes to run
Expand Down Expand Up @@ -80,11 +79,11 @@ def run_ior(test, manager, log, hosts, path, slots, group, pool, container, proc
ior = get_ior(test, manager, hosts, path, slots, namespace, ior_params)
ior.update_log_file(log)
return ior.run(
group, pool, container, processes, ppn, intercept, plugin_path, dfuse, display_space,
pool, container, processes, ppn, intercept, plugin_path, dfuse, display_space,
fail_on_warning, False)


def thread_run_ior(thread_queue, job_id, test, manager, log, hosts, path, slots, group,
def thread_run_ior(thread_queue, job_id, test, manager, log, hosts, path, slots,
pool, container, processes, ppn, intercept, plugin_path, dfuse,
display_space, fail_on_warning, namespace, ior_params):
# pylint: disable=too-many-arguments
Expand All @@ -99,7 +98,6 @@ def thread_run_ior(thread_queue, job_id, test, manager, log, hosts, path, slots,
hosts (NodeSet): hosts on which to run the ior command
path (str): hostfile path.
slots (int): hostfile number of slots per host.
group (str): DAOS server group name
pool (TestPool): DAOS test pool object
container (TestContainer): DAOS test container object.
processes (int): number of processes to run
Expand Down Expand Up @@ -129,7 +127,7 @@ def thread_run_ior(thread_queue, job_id, test, manager, log, hosts, path, slots,
saved_verbose = manager.verbose
manager.verbose = False
try:
thread_result["result"] = run_ior(test, manager, log, hosts, path, slots, group,
thread_result["result"] = run_ior(test, manager, log, hosts, path, slots,
pool, container, processes, ppn, intercept,
plugin_path, dfuse, display_space, fail_on_warning,
namespace, ior_params)
Expand Down Expand Up @@ -177,7 +175,7 @@ def write_data(test, container, namespace='/run/ior_write/*', **ior_run_params):
elif 'ppn' not in ior_run_params:
ior_run_params['ppn'] = test.params.get('ppn', namespace, None)

ior.run(test.server_group, container.pool, container, **ior_run_params)
ior.run(container.pool, container, **ior_run_params)
return ior


Expand Down Expand Up @@ -214,7 +212,7 @@ def read_data(test, ior, container, namespace='/run/ior_read/*', **ior_run_param
elif 'ppn' not in ior_run_params:
ior_run_params['ppn'] = test.params.get('ppn', namespace, 1)
ior.update('flags', test.params.get('flags', namespace))
ior.run(test.server_group, container.pool, container, **ior_run_params)
ior.run(container.pool, container, **ior_run_params)


class IorCommand(SubProcessCommand):
Expand All @@ -226,7 +224,7 @@ class IorCommand(SubProcessCommand):
>>> # Typical use inside of a DAOS avocado test method.
>>> ior_cmd = IorCommand()
>>> ior_cmd.get_params(self)
>>> ior_cmd.set_daos_params(self.server_group, self.pool)
>>> ior_cmd.set_daos_params(pool, container)
>>> mpirun = Mpirun()
>>> server_manager = self.server_manager[0]
>>> env = self.ior_cmd.get_default_env(server_manager, self.client_log)
Expand Down Expand Up @@ -339,11 +337,10 @@ def get_param_names(self):

return param_names

def set_daos_params(self, group, pool, cont):
"""Set the IOR parameters for the DAOS group, pool, and container uuid.
def set_daos_params(self, pool, cont):
"""Set the IOR parameters for the pool and container.

Args:
group (str): DAOS server group name
pool (TestPool/str): DAOS test pool object or pool uuid/label
cont (str): the container uuid or label
"""
Expand All @@ -353,7 +350,6 @@ def set_daos_params(self, group, pool, cont):
except AttributeError:
dfs_pool = pool
self.update_params(
dfs_group=group,
dfs_pool=dfs_pool,
dfs_cont=cont)

Expand Down Expand Up @@ -590,13 +586,12 @@ def get_unique_log(self, container):
parts.append('read')
return '.'.join(['_'.join(parts), 'log'])

def run(self, group, pool, container, processes, ppn=None, intercept=None, plugin_path=None,
def run(self, pool, container, processes, ppn=None, intercept=None, plugin_path=None,
dfuse=None, display_space=True, fail_on_warning=False, unique_log=True, il_report=1):
# pylint: disable=too-many-arguments
"""Run ior.

Args:
group (str): DAOS server group name
pool (TestPool): DAOS test pool object
container (TestContainer): DAOS test container object.
processes (int): number of processes to run
Expand Down Expand Up @@ -625,7 +620,7 @@ def run(self, group, pool, container, processes, ppn=None, intercept=None, plugi
result = None
error_message = None

self.command.set_daos_params(group, pool, container.identifier)
self.command.set_daos_params(pool, container.identifier)

if intercept:
self.env["LD_PRELOAD"] = intercept
Expand Down
3 changes: 2 additions & 1 deletion src/tests/ftest/util/mdtest_test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ def execute_mdtest(self, out_queue=None, display_space=True):
if self.container is None:
self.container = self.get_mdtest_container(self.pool)
# set Mdtest params
self.mdtest_cmd.set_daos_params(self.server_group, self.pool, self.container.identifier)
self.mdtest_cmd.update_params(
dfs_pool=self.pool.identifier, dfs_cont=self.container.identifier)

# start dfuse if api is POSIX
if self.mdtest_cmd.api.value == "POSIX":
Expand Down
Loading
Loading