Merge "Handle different device outputs for multipath"

This commit is contained in:
Zuul
2023年11月22日 21:36:40 +00:00
committed by Gerrit Code Review

View File

@@ -274,11 +274,15 @@ def _get_multipath_parent_device(device):
# size=56G features='1 retain_attached_hw_handler' hwhandler='0' wp=rw
# `-+- policy='service-time 0' prio=1 status=active
# `- 0:0:0:0 sda 8:0 active ready running
# Other format:
# mpathat (wwid/alias) device_name vendor,product
try:
lines = out.splitlines()
mpath_device = lines[0].split('')[1]
# give back something like dm-0 so we can log it.
return mpath_device
mpath_device_out = lines[0].split('')
for mpath_device in mpath_device_out:
if mpath_device.startswith("dm"):
# give back something like dm-0 so we can log it.
return mpath_device
except IndexError:
# We didn't get any command output, so Nope.
pass

View File

@@ -1764,7 +1764,7 @@ MULTIPATH_VALID_PATH = '%s is a valid multipath device path'
MULTIPATH_INVALID_PATH = '%s is not a valid multipath device path'
MULTIPATH_LINKS_DM = (
'SUPER_FRIENDLY_NAME %s ATA,INTEL SSDSC2CT06\n'
'SUPER_FRIENDLY_NAME (12345) %s ATA,INTEL SSDSC2CT06\n'
'size=56G features=\'1 retain_attached_hw_handler\' hwhandler=\'0\' wp=rw\n' # noqa
' `-+- policy=\'service-time 0\' prio=1 status=active\n'
' `- 0:0:0:0 device s 8:0 active ready running\n'

View File

@@ -0,0 +1,5 @@
---
fixes:
- |
Fix the logic to detect the right parent device for a given multipath
device.
Reference in New Issue
openstack/ironic-python-agent
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.