[node-patches] Change in ovirt-node[master]: installer Fix multipath device detection

fabiand at fedoraproject.org fabiand at fedoraproject.org
Fri Oct 25 14:40:02 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: installer Fix multipath device detection
......................................................................

installer Fix multipath device detection

Previously the installation could fail in specififc multipath setups.
This is now fixed by a better multipath -l output parsing.

Change-Id: I079f565aa88fe2f9bb54addb5db774240e08b733
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirtnode/install.py
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/58/20558/1

diff --git a/src/ovirtnode/install.py b/src/ovirtnode/install.py
index cf8ff33..c7b6515 100755
--- a/src/ovirtnode/install.py
+++ b/src/ovirtnode/install.py
@@ -519,8 +519,11 @@
             # workaround for grub setup failing with spaces in dev.name:
             # use first active sd* device
             self.disk = re.sub("p[1,2,3]$", "", self.disk)
-            grub_disk_cmd = "multipath -l \"" + self.disk + \
-                            "\" | awk '/ active / {print $3}' | head -n1"
+            grub_disk_cmd = ("multipath -l " +
+                             "\"" + self.disk + "\" " +
+                             "| egrep -o '[0-9]+:.*' " +
+                             "| awk '/ active / {print $2}' " +
+                             "| head -n1")
             logger.debug(grub_disk_cmd)
             grub_disk = _functions.subprocess_closefds(grub_disk_cmd,
                                             shell=True,


-- 
To view, visit http://gerrit.ovirt.org/20558
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I079f565aa88fe2f9bb54addb5db774240e08b733
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list