[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] Fix problem with /boot on LVM on a zFCP multipath device



Followup to previous fixes for /boot on LVM for s390x.  When the
underlying partitions are on a multipath volume, the device found by
zipl is a dm-X device.  The code correctly picks this up so we can pass
it to chreipl, but we also try to run getDeviceByName() on the dm-X
name, which is unnecessary here.  When getDeviceByName() returns None,
return a 2-tuple of (dm-X, None) to the caller so we use dm-X as-is.

Related: rhbz#670856
---
 booty/util.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/booty/util.py b/booty/util.py
index 48c3194..185c2af 100644
--- a/booty/util.py
+++ b/booty/util.py
@@ -2,7 +2,10 @@ import string
 from flags import flags
 
 def getDiskPart(dev, storage):
-    path = storage.devicetree.getDeviceByName(dev).path[5:]
+    device = storage.devicetree.getDeviceByName(dev)
+    if device is None:
+        return (dev, None)
+    path = device.path[5:]
     cut = len(dev)
     if dev[-1] in string.digits:
         if (path.startswith('rd/') or path.startswith('ida/') or
-- 
1.7.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]