find_multipath_device doens't raise exception when executing "multipath -l" failed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
os-brick |
Fix Released
|
Undecided
|
zhangsong |
Bug Description
I'm using the multipath feature.
During the volume disconnecting procedure, remove_
----
[root@compute-4 ~]# ls -l /dev/disk/by-path/ | grep 3b5a9cc3-
lrwxrwxrwx. 1 root root 9 Nov 22 22:12 ip-10.254.
lrwxrwxrwx. 1 root root 9 Nov 22 22:12 ip-10.254.
[
root@compute-4 ~]# multipath -l /dev/mapper/mpathd
mpathd (3603b5a9cc328a
size=1.0G features='0' hwhandler='0' wp=rw
|-+- policy=
| `- 33:0:0:1 sdc 8:32 failed faulty offline
`-+- policy=
`- 34:0:0:1 sdh 8:112 failed faulty offline
----
I think an exception should be raised instead of printing warning only:
---
def find_multipath_
"""Discover multipath devices for a mpath device.
This uses the slow multipath -l command to find a
the output to discover the multipath device name
and it's devices.
"""
mdev = None
devices = []
out = None
try:
(out, _err) = self._execute(
except putils.
return None
---
Changed in os-brick: | |
assignee: | nobody → zhangsong (zhangsong) |
Changed in os-brick: | |
status: | Incomplete → In Progress |
tags: | added: multipath |
The only time I can see calling multipath -l <device> fails if multipath doesn't exist or isn't installed on the system, or there was a putils problem.
You can run multipath -l <device that doesn't exist> and you won't get an error from multipath. It simply returns.
Can you provide an example of seeing this failure ? Your example above worked just fine.
root@host:/mnt# multipath -l /this/does/ not/exist
root@host:/mnt#