Skip to content

Commit ae68f63

Browse files
author
gitlab
committed
Merge branch 'fix-add-multipath-blacklist' into 'master'
fix add multipath blacklist See merge request zstackio/zstack-utility!2268
2 parents 44e39a9 + dfef157 commit ae68f63

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

kvmagent/kvmagent/plugins/storage_device.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,9 @@ def refresh_mpath(disks_by_path):
313313
devpaths = [os.path.realpath(os.path.join("/dev/disk/by-path", s)) for s in disks_by_path]
314314
mpaths = set()
315315
for devpath in devpaths:
316-
if devpath: mpaths.add(shell.call("multipath -l -v1 "+devpath).strip())
316+
r, o = bash.bash_ro("multipath -l -v1 %s" % devpath)
317+
if r == 0 and o.strip() != "":
318+
mpaths.add(o.strip())
317319
for mpath in mpaths:
318320
if mpath: shell.run("multipathd resize map "+mpath)
319321

0 commit comments

Comments
 (0)