summaryrefslogtreecommitdiffstats
path: root/storage/__init__.py
diff options
context:
space:
mode:
authorRadek Vykydal <rvykydal@redhat.com>2009-06-05 08:56:29 +0200
committerRadek Vykydal <rvykydal@redhat.com>2009-06-05 09:11:30 +0200
commit93fd07cd4cb46dad0d57bf216e603c8256751480 (patch)
treeab0bb49d566e9f0c52fabeeafdc9bf026a3ec957 /storage/__init__.py
parentfee64fbdf603158229e371eaa848a3c44991c13a (diff)
downloadanaconda-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/__init__.py')
-rw-r--r--storage/__init__.py9
1 files changed, 3 insertions, 6 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"]