lines = output.split('
')
for line in lines:
pmatch = policy.match(line)
dmatch = device.match(line)
+ cmatch = create.match(line)
lexemes = line.split()
if not lexemes:
break
- if lexemes[0] == 'create:':
+ if cmatch and cmatch.group(2):
if name and devices:
mpaths[name] = devices
name = None
devices = []
- name = lexemes[1]
+ name = cmatch.group(2)
elif lexemes[0].startswith('size='):
pass
elif pmatch:
@@ -85,7 +99,10 @@ def identifyMultipaths(devices):
map(lambda line: log.debug(line.rstrip()), conf)
log.debug("(end of /etc/multipath.conf)")
- topology = parseMultipathOutput(iutil.execWithCapture("multip ath", ["-d",]))
+ topology = parseMultipathOutput(
+ iutil.execWithCapture("multipath", ["-d",]))
+ topology.update(parseMultipathOutput(
+ iutil.execWithCapture("multipath", ["-ll",])))
# find the devices that aren't in topology, and add them into it...
topodevs = reduce(lambda x,y: x.union(y), topology.values(), set())
for name in set([d['name'] for d in devices]).difference(topodevs):
@@ -145,7 +162,7 @@ def identifyMultipaths(devices):
log.info("adding %s to multipath_disks" % (disk,))
d["ID_FS_TYPE"] = "multipath_member"
d["ID_MPATH_NAME"] = name
-
+
multipaths.append([devmap[d] for d in disks])
non_disk_serials = {}
--
1.7.3.3
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list