On Fri, Oct 25, 2013 at 04:10:02PM -0500, David Lehman wrote:
On Fri, 2013-10-25 at 15:41 -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.
I think you need to put that in a ZIP.is_valid_stage2_device:
class ZIPL...
def is_valid_stage2_...
valid = super(ZIPL, self).is_valid_stage2_device(...)
<your single pv code here>
return valid
Just to keep from infecting the generic code with mainframe special
sauce. Also because GRUB2 can have lvm stage2 without single pv (or is
that handled and I missed it?). Looks good otherwise.
Heh, good catch. I'd incorrectly assumed that this would be fine in just
is_valid_stage2_device() based on the error string for
SinglePhysicalVolumeError, but testing on x86_64 provides some strange
results (hanging forever in 'Checking storage configuration'). So, yeah,
I'll just move this to the s390x bootloader class. New patch to follow.
Samantha
>
> Resolves: rhbz#873135
> Resolves: rhbz#885011
> ---
> pyanaconda/bootloader.py | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
> index cf769ed..600ba6f 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")
> @@ -718,6 +719,17 @@ class BootLoader(object):
> "device.") % self.stage2_description)
> valid = False
>
> + # 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
> +
> log.debug("is_valid_stage2_device(%s) returning %s" %
(device.name,
> valid))
> return valid
_______________________________________________
anaconda-patches mailing list
anaconda-patches(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches