diff options
author | Radek Vykydal <rvykydal@redhat.com> | 2009-06-05 08:56:29 +0200 |
---|---|---|
committer | Radek Vykydal <rvykydal@redhat.com> | 2009-06-05 09:11:30 +0200 |
commit | 93fd07cd4cb46dad0d57bf216e603c8256751480 (patch) | |
tree | ab0bb49d566e9f0c52fabeeafdc9bf026a3ec957 /storage | |
parent | fee64fbdf603158229e371eaa848a3c44991c13a (diff) | |
download | anaconda-93fd07cd4cb46dad0d57bf216e603c8256751480.tar.gz anaconda-93fd07cd4cb46dad0d57bf216e603c8256751480.tar.xz anaconda-93fd07cd4cb46dad0d57bf216e603c8256751480.zip |
Fix discovery of existing raid/lvm for ks install without clearpart (#503310) (#503681)
Default clearPartType to None so that all devices are discovered during storage
initialization step, and UI parttype can be set to its default "Replace existing
linux system". Also set clearPartType appropriately when going back from partition dialog
so that all devices are discovered during storage reset.
There is one case that can't be resolved this way: clearpart --all or --linux
is set in ks and "Create custom layout" is selected in parttype UI step. Because of ks
setting, storage initialization doesn't discover devices (RAID, LVM) on
partitions that are to be cleared and therefore they are not present in custom
partition dialog. This can be workarounded by going back and than again to
custom partitioning dialog. I think we should grey-out type of partitioning
combo set to value from ks clearpart command.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/__init__.py | 9 | ||||
-rw-r--r-- | storage/partitioning.py | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/storage/__init__.py b/storage/__init__.py index e87db9be1..34f01828c 100644 --- a/storage/__init__.py +++ b/storage/__init__.py @@ -202,7 +202,7 @@ class Storage(object): self.ignoredDisks = [] self.exclusiveDisks = [] self.doAutoPart = False - self.clearPartType = CLEARPART_TYPE_NONE + self.clearPartType = None self.clearPartDisks = [] self.encryptedAutoPart = False self.encryptionPassphrase = None @@ -281,10 +281,7 @@ class Storage(object): _("Finding storage devices...")) self.iscsi.startup(self.anaconda.intf) self.zfcp.startup() - if self.anaconda.id.getUpgrade() or not self.anaconda.isKickstart: - # clearPartType defaults to CLEARPART_TYPE_LINUX, but the user - # has not made any selection, so we need to ignore it during - # population of the device tree + if self.anaconda.id.getUpgrade(): clearPartType = CLEARPART_TYPE_NONE else: clearPartType = self.clearPartType @@ -934,7 +931,7 @@ class Storage(object): f.write("# not guaranteed to work\n") # clearpart - if self.clearPartType == CLEARPART_TYPE_NONE: + if self.clearPartType is None or self.clearPartType == CLEARPART_TYPE_NONE: args = ["--none"] elif self.clearPartType == CLEARPART_TYPE_LINUX: args = ["--linux"] diff --git a/storage/partitioning.py b/storage/partitioning.py index 8e9ab3cf7..de3e3e50b 100644 --- a/storage/partitioning.py +++ b/storage/partitioning.py @@ -306,7 +306,7 @@ def clearPartitions(storage): - Needs some error handling, especially for the parted bits. """ - if storage.clearPartType == CLEARPART_TYPE_NONE: + if storage.clearPartType is None or storage.clearPartType == CLEARPART_TYPE_NONE: # not much to do return |