Anatoly Litovsky has uploaded a new change for review. Change subject: Returning correct device path for cciss devices if they are not on multipath. ......................................................................
Returning correct device path for cciss devices if they are not on multipath. Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1174146 Change-Id: I362e6baa05b080e0ade6c784b436006cfb48c08b Signed-off-by: Tolik Litovsky <[email protected]> --- M src/ovirtnode/ovirtfunctions.py 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/95/36395/1 diff --git a/src/ovirtnode/ovirtfunctions.py b/src/ovirtnode/ovirtfunctions.py index 8ab7b12..c067a6b 100644 --- a/src/ovirtnode/ovirtfunctions.py +++ b/src/ovirtnode/ovirtfunctions.py @@ -1450,6 +1450,7 @@ def translate_multipath_device(dev): #trim so that only sdX is stored, but support passing /dev/sdX logger.debug("Translating: %s" % dev) + multipath_dev = dev if dev is None: return False if "/dev/mapper" in dev: @@ -1458,8 +1459,8 @@ cciss_dev_cmd = "cciss_id " + dev cciss_dev = subprocess_closefds(cciss_dev_cmd, shell=True, stdout=PIPE, stderr=STDOUT) output, err = cciss_dev.communicate() - dev = "/dev/mapper/" + output.strip() - dm_dev_cmd = "multipath -ll '%s' | egrep dm-[0-9]+" % dev + multipath_dev = "/dev/mapper/" + output.strip() + dm_dev_cmd = "multipath -ll '%s' | egrep dm-[0-9]+" % multipath_dev dm_dev = subprocess_closefds(dm_dev_cmd, shell=True, stdout=PIPE, stderr=STDOUT) (dm_dev_output, dummy) = dm_dev.communicate() if dm_dev.returncode > 0: -- To view, visit http://gerrit.ovirt.org/36395 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I362e6baa05b080e0ade6c784b436006cfb48c08b Gerrit-PatchSet: 1 Gerrit-Project: ovirt-node Gerrit-Branch: master Gerrit-Owner: Anatoly Litovsky <[email protected]> _______________________________________________ node-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/node-patches
