From 9339343ef8a75892b1e22baf3ec668501a35454e Mon Sep 17 00:00:00 2001 From: "Samantha N. Bueno" Date: Tue, 2 Sep 2014 09:44:14 -0400 Subject: [PATCH] rhbz#885011 --- pyanaconda/bootloader.py | 8 ++++++++ pyanaconda/exception.py | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py index 839ebd9..c44296f 100644 --- a/pyanaconda/bootloader.py +++ b/pyanaconda/bootloader.py @@ -122,6 +122,9 @@ def _is_on_iscsi(device): class BootLoaderError(Exception): pass +class ZIPLError(Exception): + pass + class Arguments(set): ordering_dict = { "rhgb" : 99, @@ -2167,6 +2170,11 @@ class ZIPL(BootLoader): # We want to extract the device name and pass that. name = re.sub(r".+?: ", "", line) self.stage1_name = re.sub(r"(\s\(.+\))?\.$", "", name) + # a limitation of s390x is that the kernel parameter list must not + # exceed 896 bytes; there is nothing we can do about this, so just + # catch the error and show it to the user instead of crashing + elif line.startswith("Error: The length of the parameters "): + raise ZIPLError(line) if not self.stage1_name: raise BootLoaderError("could not find IPL device") diff --git a/pyanaconda/exception.py b/pyanaconda/exception.py index 7a8941e..857355a 100644 --- a/pyanaconda/exception.py +++ b/pyanaconda/exception.py @@ -34,6 +34,7 @@ import time from pyanaconda import kickstart import blivet.errors from pyanaconda.errors import CmdlineError +from pyanaconda.bootloader import ZIPLError from pyanaconda.ui.communication import hubQ from pyanaconda.constants import THREAD_EXCEPTION_HANDLING_TEST, IPMI_FAILED from pyanaconda.threads import threadMgr @@ -92,6 +93,13 @@ class AnacondaExceptionHandler(ExceptionHandler): "The installer will now terminate.") % str(value) self.intf.messageWindow(_("Hardware error occured"), hw_error_msg) sys.exit(0) + elif issubclass(ty, ZIPLError): + zipl_error_msg = _("The installation was stopped due to an error " + "installing the boot loader. The exact error " + "message is:\n\n%s.\n\n" + "The installer will now terminate.") % str(value) + self.intf.messageWindow(_("Boot loader error occurred"), zipl_error_msg) + sys.exit(0) else: try: from gi.repository import Gtk -- 1.9.3