diff options
author | Peter Jones <pjones@redhat.com> | 2006-07-17 22:28:52 +0000 |
---|---|---|
committer | Peter Jones <pjones@redhat.com> | 2006-07-17 22:28:52 +0000 |
commit | 066636bcfe2417f4babeb85b9cf9aeb3f61f0a59 (patch) | |
tree | 2f45a695c774b639a7d4724fbac810483d16776f | |
parent | 1b1179e86989d6e6c300aaff80fcd9c0745e6b21 (diff) | |
download | anaconda-066636bcfe2417f4babeb85b9cf9aeb3f61f0a59.tar.gz anaconda-066636bcfe2417f4babeb85b9cf9aeb3f61f0a59.tar.xz anaconda-066636bcfe2417f4babeb85b9cf9aeb3f61f0a59.zip |
- add multipath support in kickstart.py
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | kickstart.py | 27 |
2 files changed, 29 insertions, 0 deletions
@@ -3,6 +3,8 @@ * dmraid.py: multipath functions analogous to those for dmraid. Also make DmDriveCache more generic. + * kickstart.py: add doMultiPath handler + 2006-07-17 Chris Lumens <clumens@redhat.com> * iutil.py (execWithRedirect): Move path check into preexec_fn so diff --git a/kickstart.py b/kickstart.py index ebad8424a..ad5e1f6bb 100644 --- a/kickstart.py +++ b/kickstart.py @@ -316,6 +316,32 @@ class AnacondaKSHandlers(KickstartHandlers): self.skipSteps.append("network") + def doMultiPath(self, id, args): + KickstartHandlers.doMPath(self, args) + + from partedUtils import DiskSet + ds = DiskSet() + ds.startMPath() + + mpath = self.ksdata.mpaths[-1] + log.debug("Searching for mpath '%s'" % (mpath.name,)) + for mp in DiskSet.mpList or []: + it = True + for dev in mpath.devices: + dev = dev.split('/')[-1] + log.debug("mpath '%s' has members %s" % (mp.name, list(mp.members))) + if not dev in mp.members: + log.debug("mpath '%s' does not have device %s, skipping" \ + % (mp.name, dev)) + it = False + if it: + log.debug("found mpath '%s', changing name to %s" \ + % (mp.name, mpath.name)) + newname = mpath.name + ds.renameMPath(mp, newname) + return + ds.startMPath() + def doDmRaid(self, id, args): KickstartHandlers.doDmRaid(self, args) @@ -801,6 +827,7 @@ class Kickstart(BaseInstallClass): # make sure our disks are alive from partedUtils import DiskSet ds = DiskSet() + ds.startMPath() ds.startDmRaid() # parse the %pre |