Skip to content

Commit

Permalink
Update vmd harasser with 2.6 function (#15440)
Browse files Browse the repository at this point in the history
Skip-build: true

Required-githooks: true

Signed-off-by: Maureen Jean <[email protected]>
Signed-off-by: Dalton Bohning <[email protected]>
  • Loading branch information
mjean308 authored and daltonbohning committed Nov 4, 2024
1 parent f4f4178 commit 4d8cb8b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 24 deletions.
6 changes: 6 additions & 0 deletions src/tests/ftest/util/soak_test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ def pre_tear_down(self):
run_metrics_check(self, prefix="final")
# Gather logs
get_job_logs(self)
self.log.info("<<preTearDown Pool List >>")
self.dmg_command.pool_list()
# Check pool space after all done
self.log.info("<<preTearDown Pool Query >>")
for pool in self.pool:
self.dmg_command.pool_query(pool.identifier)

if self.all_failed_harassers:
errors.extend(self.all_failed_harassers)
Expand Down
41 changes: 17 additions & 24 deletions src/tests/ftest/util/soak_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from daos_racer_utils import DaosRacerCommand
from data_mover_utils import DcpCommand, FsCopy
from dfuse_utils import get_dfuse
from dmg_utils import get_storage_query_device_info, get_storage_query_device_uuids
from dmg_utils import get_storage_query_device_info
from duns_utils import format_path
from exception_utils import CommandFailure
from fio_utils import FioCommand
Expand Down Expand Up @@ -573,10 +573,8 @@ def launch_vmd_identify_check(self, name, results, args):
results (queue): multiprocessing queue
args (queue): multiprocessing queue
"""
# pylint: disable=too-many-nested-blocks
status = True
failing_vmd = []
dmg = self.get_dmg_command().copy()
device_info = get_storage_query_device_info(self.dmg_command)
uuid_list = [device['uuid'] for device in device_info]
# limit the number of leds to blink to 1024
Expand All @@ -585,27 +583,22 @@ def launch_vmd_identify_check(self, name, results, args):
else:
uuids = uuid_list
self.log.info("VMD device UUIDs: %s", uuids)
host_uuids = get_storage_query_device_uuids(self.dmg_command)
for host, uuid_dict in host_uuids.items():
uuid_list = sorted(uuid_dict.keys())
self.log.info("Devices on host %s: %s", host, uuid_list)
# Now check whether the random uuid belongs to a particular host.
for uuid in uuids:
if uuid in uuid_list:
dmg.hostlist = host
# Blink led
dmg.storage_led_identify(ids=uuid, timeout=2)
# check if led is blinking
result = dmg.storage_led_check(ids=uuid)
# determine if leds are blinking as expected
for value in list(result['response']['host_storage_map'].values()):
if value['storage']['smd_info']['devices']:
for device in value['storage']['smd_info']['devices']:
if device['ctrlr']['led_state'] != "QUICK_BLINK":
failing_vmd.append([device['ctrlr']['pci_addr'], value['hosts']])
status = False
# reset leds to previous state
dmg.storage_led_identify(ids=uuid, reset=True)

for uuid in uuids:
# Blink led
self.dmg_command.storage_led_identify(ids=uuid, timeout=2)
# check if led is blinking
result = self.dmg_command.storage_led_check(ids=uuid)
# determine if leds are blinking as expected
for value in list(result['response']['host_storage_map'].values()):
if value['storage']['smd_info']['devices']:
for device in value['storage']['smd_info']['devices']:
if device['ctrlr']['led_state'] != "QUICK_BLINK":
failing_vmd.append([device['ctrlr']['pci_addr'], value['hosts']])
status = False
# reset leds to previous state
for uuid in uuids:
self.dmg_command.storage_led_identify(ids=uuid, reset=True)

params = {"name": name,
"status": status,
Expand Down

0 comments on commit 4d8cb8b

Please sign in to comment.