Merge "Handle different device outputs for multipath"
This commit is contained in:
commit
7a4114512c
@ -274,11 +274,15 @@ def _get_multipath_parent_device(device):
|
|||||||
# size=56G features='1 retain_attached_hw_handler' hwhandler='0' wp=rw
|
# size=56G features='1 retain_attached_hw_handler' hwhandler='0' wp=rw
|
||||||
# `-+- policy='service-time 0' prio=1 status=active
|
# `-+- policy='service-time 0' prio=1 status=active
|
||||||
# `- 0:0:0:0 sda 8:0 active ready running
|
# `- 0:0:0:0 sda 8:0 active ready running
|
||||||
|
# Other format:
|
||||||
|
# mpathat (wwid/alias) device_name vendor,product
|
||||||
try:
|
try:
|
||||||
lines = out.splitlines()
|
lines = out.splitlines()
|
||||||
mpath_device = lines[0].split(' ')[1]
|
mpath_device_out = lines[0].split(' ')
|
||||||
# give back something like dm-0 so we can log it.
|
for mpath_device in mpath_device_out:
|
||||||
return mpath_device
|
if mpath_device.startswith("dm"):
|
||||||
|
# give back something like dm-0 so we can log it.
|
||||||
|
return mpath_device
|
||||||
except IndexError:
|
except IndexError:
|
||||||
# We didn't get any command output, so Nope.
|
# We didn't get any command output, so Nope.
|
||||||
pass
|
pass
|
||||||
|
@ -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_INVALID_PATH = '%s is not a valid multipath device path'
|
||||||
|
|
||||||
MULTIPATH_LINKS_DM = (
|
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
|
'size=56G features=\'1 retain_attached_hw_handler\' hwhandler=\'0\' wp=rw\n' # noqa
|
||||||
' `-+- policy=\'service-time 0\' prio=1 status=active\n'
|
' `-+- policy=\'service-time 0\' prio=1 status=active\n'
|
||||||
' `- 0:0:0:0 device s 8:0 active ready running\n'
|
' `- 0:0:0:0 device s 8:0 active ready running\n'
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fix the logic to detect the right parent device for a given multipath
|
||||||
|
device.
|
Loading…
Reference in New Issue
Block a user