[master/f20-branch/rhel7-branch] V02, Check that s390x LVM configuration is valid. (#873135, #885011)
Brian C. Lane
bcl at redhat.com
Wed Oct 30 01:10:39 UTC 2013
On Mon, Oct 28, 2013 at 11:37:04AM -0400, Samantha N. Bueno wrote:
> On s390x, /boot (or / if /boot isn't a mountpoint) needs to exist on a
> single PV if using LVM, so check for this.
>
> Resolves: rhbz#873135
> Resolves: rhbz#885011
> ---
> pyanaconda/bootloader.py | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
> index cf769ed..d2704d0 100644
> --- a/pyanaconda/bootloader.py
> +++ b/pyanaconda/bootloader.py
> @@ -40,6 +40,7 @@ import pyanaconda.network
> from pyanaconda.nm import nm_device_hwaddress
> from blivet import platform
> from pyanaconda.i18n import _, N_
> +from blivet.errors import SinglePhysicalVolumeError
>
> import logging
> log = logging.getLogger("anaconda")
> @@ -2015,6 +2016,22 @@ class ZIPL(BootLoader):
> # configuration
> #
>
> + def is_valid_stage2_device(self, device, linux=True, non_linux=False):
> + valid = super(ZIPL, self).is_valid_stage2_device(self.stage2_device)
> +
> + # s390x can only have /boot on a single PV; or if there is no /boot
> + # partition, / must be on a single PV, so check for that here
> + if self.stage2_device.type == "lvmlv":
> + try:
> + self.stage2_device._getSinglePV()
> + valid = True
> + except SinglePhysicalVolumeError as e:
> + msg = str(e)
> + self.errors.append(msg)
> + valid = False
> +
> + return valid
Also, please log the new return value. Otherwise we could see the
super's log message saying True and nothing telling us it got switched
to False. eg.
log.debug("ZIPL.is_valid_stage2_device(%s) returning %s", \
device.name, valid)
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
More information about the anaconda-patches
mailing list