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

Merge upstream/release/2.6 into upstream/google/2.6 #15264

Closed
wants to merge 13 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
DAOS-623 test: Support running independent io sys admin steps (#15134) (
#15248)

Support running independent io sys admin steps from the yaml.

Signed-off-by: Dalton Bohning <dalton.bohning@intel.com>
  • Loading branch information
daltonbohning authored Oct 7, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 26f39c0e74674c2ecb9b3bbb3fe73a58c89700e5
140 changes: 81 additions & 59 deletions src/tests/ftest/deployment/io_sys_admin.py
Original file line number Diff line number Diff line change
@@ -40,66 +40,88 @@ def test_io_sys_admin(self):
new_cont_user = self.params.get("user", "/run/container_set_owner/*")
new_cont_group = self.params.get("group", "/run/container_set_owner/*")

# Toggle independent steps
steps_to_run = {
"pool_create_ownership": True,
"storage_system_query": True,
"io": True,
"snapshot": True,
"datamover": True
}
for step in steps_to_run:
run = self.params.get(step, "/run/io_sys_admin/steps_to_run/*", None)
if run is not None:
steps_to_run[step] = run

dmg = self.get_dmg_command()
daos = self.get_daos_command()

for idx in range(1, 4):
pool = self.get_pool(namespace=f"/run/pool_{idx}/", create=False)
check_pool_creation(self, [pool], 60)
containers = []
for cont_idx in range(1, 4):
containers.append(
self.get_container(pool, namespace=f"/run/container_{cont_idx}/"))
containers[-1].set_owner(f"{new_cont_user}@", f"{new_cont_group}@")

daos.container_list(pool.identifier)
self.destroy_containers(containers)
pool.destroy()

# dmg storage scan
dmg.storage_scan()
dmg.system_query()
dmg.system_leader_query()

# write large data sets
self.run_file_count()
# create snapshot
self.container[-1].create_snap()
# overwrite the last ior file
self.ior_cmd.signature.update('456')
self.processes = self.ior_np
self.ppn = self.ior_ppn
self.run_ior_with_pool(create_pool=False, create_cont=False)

nvme_free_space_before_snap_destroy = self.get_free_space()[1]
# delete snapshot
self.container[-1].destroy_snap(epc=self.container[-1].epoch)
# Now check if the space is returned back.
counter = 1
returned_space = self.get_free_space()[1] - nvme_free_space_before_snap_destroy

data_written = (int(self.ppn) * human_to_bytes(self.ior_cmd.block_size.value))
while returned_space < int(data_written):
# try to wait for 4 x 60 secs for aggregation to be completed or
# else exit the test with a failure.
if counter > 4:
self.log.info("Free space before snapshot destroy: %s",
nvme_free_space_before_snap_destroy)
self.log.info("Free space when test terminated: %s",
self.get_free_space()[1])
self.fail("Aggregation did not complete as expected")

time.sleep(60)
if steps_to_run["pool_create_ownership"]:
self.log_step("Verify pool creation time and container set-owner")
for idx in range(1, 4):
pool = self.get_pool(namespace=f"/run/pool_{idx}/", create=False)
check_pool_creation(self, [pool], 60)
containers = []
for cont_idx in range(1, 4):
containers.append(
self.get_container(pool, namespace=f"/run/container_{cont_idx}/"))
containers[-1].set_owner(f"{new_cont_user}@", f"{new_cont_group}@")

daos.container_list(pool.identifier)
self.destroy_containers(containers)
pool.destroy()

if steps_to_run["storage_system_query"]:
self.log_step("Verify storage scan and system query")
dmg.storage_scan()
dmg.system_query()
dmg.system_leader_query()

if steps_to_run["io"]:
self.log_step("Verifying large dataset IO")
self.run_file_count()

if steps_to_run["snapshot"]:
self.log_step("Verifying snapshot creation and aggregation")
self.container[-1].create_snap()
# overwrite the last ior file
self.ior_cmd.signature.update('456')
self.processes = self.ior_np
self.ppn = self.ior_ppn
self.run_ior_with_pool(create_pool=False, create_cont=False)

nvme_free_space_before_snap_destroy = self.get_free_space()[1]
# delete snapshot
self.container[-1].destroy_snap(epc=self.container[-1].epoch)
# Now check if the space is returned back.
counter = 1
returned_space = self.get_free_space()[1] - nvme_free_space_before_snap_destroy
counter += 1

self.log.info("#####Starting FS_COPY Test")
self.run_dm_activities_with_ior("FS_COPY", self.pool, self.container[-1])
self.log.info("#####Starting DCP Test")
self.run_dm_activities_with_ior("DCP", self.pool, self.container[-1])
self.log.info("#####Starting DSERIAL Test")
self.run_dm_activities_with_ior("DSERIAL", self.pool, self.container[-1])
self.log.info("#####Starting CONT_CLONE Test")
self.run_dm_activities_with_ior("CONT_CLONE", self.pool, self.container[-1])
self.log.info("#####Completed all Datamover tests")
self.container.pop(0)

data_written = (int(self.ppn) * human_to_bytes(self.ior_cmd.block_size.value))
while returned_space < int(data_written):
# try to wait for 4 x 60 secs for aggregation to be completed or
# else exit the test with a failure.
if counter > 4:
self.log.info(
"Free space before snapshot destroy: %s",
nvme_free_space_before_snap_destroy)
self.log.info(
"Free space when test terminated: %s", self.get_free_space()[1])
self.fail("Aggregation did not complete as expected")

time.sleep(60)
returned_space = self.get_free_space()[1] - nvme_free_space_before_snap_destroy
counter += 1

if steps_to_run["datamover"]:
self.log_step("Verifying datamover")
self.log.info("#####Starting FS_COPY Test")
self.run_dm_activities_with_ior("FS_COPY", self.pool, self.container[-1])
self.log.info("#####Starting DCP Test")
self.run_dm_activities_with_ior("DCP", self.pool, self.container[-1])
self.log.info("#####Starting DSERIAL Test")
self.run_dm_activities_with_ior("DSERIAL", self.pool, self.container[-1])
self.log.info("#####Starting CONT_CLONE Test")
self.run_dm_activities_with_ior("CONT_CLONE", self.pool, self.container[-1])
self.log.info("#####Completed all Datamover tests")
self.container.pop(0)
8 changes: 8 additions & 0 deletions src/tests/ftest/deployment/io_sys_admin.yaml
Original file line number Diff line number Diff line change
@@ -104,3 +104,11 @@ dcp:
np: 16
hdf5_vol:
plugin_path: /usr/lib64/mpich/lib

io_sys_admin:
steps_to_run:
pool_create_ownership: True
storage_system_query: True
io: True
snapshot: True
datamover: True
Loading