Skip to content

Commit

Permalink
Fix fail to get SG_IO device issue
Browse files Browse the repository at this point in the history
Allow time to enable multipathd alive after restart

Signed-off-by: chunfuwen <[email protected]>
  • Loading branch information
chunfuwen committed Dec 23, 2021
1 parent 25cfab0 commit 265810b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions libvirt/tests/src/virtual_disks/virtual_disks_multipath.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,17 @@ def has_new_mpath_devs():
disk_params['driver_name'] = params.get("virt_disk_drive_name", "qemu")
disk_params['driver_type'] = params.get("virt_disk_device_format", "raw")
disk_xml = libvirt.create_disk_xml(disk_params)

def _verify_multipathd_alive():
"""
Verify whether multipathd statue is active, return bool value
"""
host_session = aexpect.ShellSession("sh")
return utils_misc.get_guest_service_status(
host_session, 'multipathd') == 'active'
# Allow time to enable multipathd alive after restart
utils_misc.wait_for(_verify_multipathd_alive, 40)

# Test disk operation with newly added disk xml
attach_option = ""
if not hotplug_disk:
Expand Down

0 comments on commit 265810b

Please sign in to comment.