[master/rhel7-branch][PATCH] Don't allow bootloader and /boot on iSCSI on s390 (#1034222)
Chris Lumens
clumens at redhat.com
Tue Nov 26 19:38:43 UTC 2013
> @@ -573,6 +574,11 @@ class BootLoader(object):
> log.debug("stage1 device cannot be of type %s" % device.type)
> return False
>
> + if blivet.arch.isS390() and all(isinstance(disk, blivet.devices.iScsiDiskDevice)
> + for disk in device.disks):
> + log.debug("stage1 device cannot be on an iSCSI disk on s390(x)")
> + return False
> +
> description = self.device_description(device)
>
> if self.stage2_is_valid_stage1 and device == self.stage2_device:
> @@ -684,6 +690,11 @@ class BootLoader(object):
> if device.protected:
> valid = False
>
> + if blivet.arch.isS390() and all(isinstance(disk, blivet.devices.iScsiDiskDevice)
> + for disk in device.disks):
> + self.errors.append(_("%s cannot be on an iSCSI disk on s390(x)") % self.stage2_description)
> + valid = False
> +
> if not self._device_type_match(device, self.stage2_device_types):
> self.errors.append(_("%s cannot be of type %s")
> % (self.stage2_description, device.type))
I'd like to see the two all() bits moved into a common function.
Everything else looks fine.
- Chris
More information about the anaconda-patches
mailing list