[master/f20/rhel7] BootLoaderError should not reset storage (#1019541)
Brian C. Lane
bcl at redhat.com
Fri Oct 18 01:23:14 UTC 2013
From: "Brian C. Lane" <bcl at redhat.com>
Resetting storage can cause problems, eg. if custom is about to be run.
Really we just need to show the error and reset bootDrive.
---
pyanaconda/ui/gui/spokes/storage.py | 7 ++++++-
pyanaconda/ui/tui/spokes/storage.py | 8 +++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 43b1bf6..df2f824 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -427,7 +427,7 @@ class StorageSpoke(NormalSpoke, StorageChecker):
hubQ.send_message(self.__class__.__name__, _("Saving storage configuration..."))
try:
doKickstartStorage(self.storage, self.data, self.instclass)
- except (StorageError, BootLoaderError, KickstartValueError) as e:
+ except (StorageError, KickstartValueError) as e:
log.error("storage configuration failed: %s", e)
StorageChecker.errors = str(e).split("\n")
hubQ.send_message(self.__class__.__name__, _("Failed to save storage configuration..."))
@@ -439,6 +439,11 @@ class StorageSpoke(NormalSpoke, StorageChecker):
self.disks = getDisks(self.storage.devicetree)
# now set ksdata back to the user's specified config
self._applyDiskSelection(self.selected_disks)
+ except BootLoaderError as e:
+ log.error("BootLoader setup failed: %s", e)
+ StorageChecker.errors = str(e).split("\n")
+ hubQ.send_message(self.__class__.__name__, _("Failed to save storage configuration..."))
+ self.data.bootloader.bootDrive = ""
else:
if self.autopart:
# this was already run as part of doAutoPartition. dumb.
diff --git a/pyanaconda/ui/tui/spokes/storage.py b/pyanaconda/ui/tui/spokes/storage.py
index 953ac3a..3ee5ba7 100644
--- a/pyanaconda/ui/tui/spokes/storage.py
+++ b/pyanaconda/ui/tui/spokes/storage.py
@@ -258,7 +258,7 @@ class StorageSpoke(NormalTUISpoke):
print(_("Generating updated storage configuration"))
try:
doKickstartStorage(self.storage, self.data, self.instclass)
- except (StorageError, BootLoaderError, KickstartValueError) as e:
+ except (StorageError, KickstartValueError) as e:
log.error("storage configuration failed: %s", e)
print _("storage configuration failed: %s") % e
self.errors = [str(e)]
@@ -269,6 +269,12 @@ class StorageSpoke(NormalTUISpoke):
self.storage.autoPartType = self.data.clearpart.type
self.storage.reset()
self._ready = True
+ except BootLoaderError as e:
+ log.error("BootLoader setup failed: %s", e)
+ print _("storage configuration failed: %s") % e
+ self.errors = [str(e)]
+ self.data.bootloader.bootDrive = ""
+ self._ready = True
else:
print(_("Checking storage configuration..."))
(self.errors, self.warnings) = self.storage.sanityCheck()
--
1.8.3.1
More information about the anaconda-patches
mailing list