diff options
author | Chris Lumens <clumens@redhat.com> | 2005-05-06 19:42:52 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2005-05-06 19:42:52 +0000 |
commit | d6a34c53478fafd728873d76f6898040f86e4904 (patch) | |
tree | 8c7d09486d0c25fe5b3a097bfe7a1f4f813c8d91 /autopart.py | |
parent | b1a4686adf66cc7def995d5556858d50a3d4359e (diff) | |
download | anaconda-d6a34c53478fafd728873d76f6898040f86e4904.tar.gz anaconda-d6a34c53478fafd728873d76f6898040f86e4904.tar.xz anaconda-d6a34c53478fafd728873d76f6898040f86e4904.zip |
Also remove bogus preexisting RAID information when doing kickstart installs.
Diffstat (limited to 'autopart.py')
-rw-r--r-- | autopart.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/autopart.py b/autopart.py index e1f6ba78e..b06f6d11f 100644 --- a/autopart.py +++ b/autopart.py @@ -1435,9 +1435,17 @@ def doAutoPartition(dir, diskset, partitions, intf, instClass, dispatch): # Remove all preexisting VG requests that reference nonexistant PV # requests. These VGs should only be present on installs where we're - # using preexisting partitions that already have LVM information. - for req in filter (lambda r: isinstance(r, partRequests.VolumeGroupRequestSpec), partitions.requests): - if len(filter (lambda id: partitions.getRequestByID(id) != None, req.physicalVolumes)) == 0: + # using preexisting partitions that already have LVM information. We + # need to do the same thing for preexisting RAID requests, as well. + for req in partitions.requests: + if isinstance(req, partRequests.VolumeGroupRequestSpec): + lst = req.physicalVolumes + elif isinstance(req, partRequests.RaidRequestSpec): + lst = req.raidmembers + else: + continue + + if len(filter (lambda id: partitions.getRequestByID(id) != None, lst)) == 0: partitions.removeRequest (req) # Now that we've removed bad VGs, remove all LVs that would have |