[PATCH] Make appropriate changes to adapt for s390 libblockdev plugin.
Samantha N. Bueno
sbueno+anaconda at redhat.com
Tue May 19 15:53:15 UTC 2015
On Tue, May 19, 2015 at 01:53:25PM +0200, Vratislav Podzimek wrote:
> On Mon, 2015-05-18 at 15:10 -0400, Samantha N. Bueno wrote:
> > This includes:
> > -- removing blivet.devices.dasd
> > -- moving some remaining, localized functions into blivet.devicetree
> > (make_dasd_list and make_unformatted_dasd_list) or blivet.blivet
> > (write_dasd_conf).
> > -- getting rid of dasd/zfcp input sanitizing functions
> > -- getting rid of the DASD test file (now in libblockdev)
> > ---
> > blivet/__init__.py | 8 +-
> > blivet/blivet.py | 15 ++-
> > blivet/devicelibs/dasd.py | 184 -------------------------------------
> > blivet/devicetree.py | 38 +++++++-
> > blivet/errors.py | 4 -
> > blivet/zfcp.py | 71 ++------------
> > tests/devicelibs_test/dasd_test.py | 32 -------
> > 7 files changed, 63 insertions(+), 289 deletions(-)
> > delete mode 100644 blivet/devicelibs/dasd.py
> > delete mode 100644 tests/devicelibs_test/dasd_test.py
> >
> > diff --git a/blivet/__init__.py b/blivet/__init__.py
> > index b4eabd8..b6aa26a 100644
> > --- a/blivet/__init__.py
> > +++ b/blivet/__init__.py
> > @@ -52,7 +52,7 @@ get_bootloader = lambda: None
> > import sys
> > import importlib
> >
> > -from . import util
> > +from . import util, arch
> > from .flags import flags
> >
> > import logging
> > @@ -64,7 +64,11 @@ log_bd_message = lambda level, msg: program_log.info(msg)
> >
> > # initialize the libblockdev library
> > from gi.repository import BlockDev as blockdev
> > -_REQUIRED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm"))
> > +if arch.isS390():
> > + _REQUIRED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "s390"))
> > +else:
> > + _REQUIRED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm"))
> > +
> > _required_plugins = blockdev.plugin_specs_from_names(_REQUIRED_PLUGIN_NAMES)
> > if not blockdev.is_initialized():
> > if not blockdev.try_init(require_plugins=_required_plugins, log_func=log_bd_message):
> > diff --git a/blivet/blivet.py b/blivet/blivet.py
> > index c49a380..3892580 100644
> > --- a/blivet/blivet.py
> > +++ b/blivet/blivet.py
> > @@ -37,7 +37,6 @@ from .devices import MDRaidArrayDevice, PartitionDevice, TmpFSDevice, devicePath
> > from .deviceaction import ActionCreateDevice, ActionCreateFormat, ActionDestroyDevice
> > from .deviceaction import ActionDestroyFormat, ActionResizeDevice, ActionResizeFormat
> > from .devicelibs.edd import get_edd_dict
> > -from .devicelibs.dasd import make_dasd_list, write_dasd_conf
> > from .errors import StorageError
> > from .size import Size
> > from .devicetree import DeviceTree
> > @@ -263,7 +262,7 @@ class Blivet(object):
> > self.iscsi.startup()
> > self.fcoe.startup()
> > self.zfcp.startup()
> > - self.dasd = make_dasd_list(self.dasd, self.devices)
> > + self.dasd = self.devicetree.make_dasd_list(self.dasd, self.devices)
> >
> > if self.dasd:
> > # Reset the internal dasd list (823534)
> > @@ -1399,6 +1398,18 @@ class Blivet(object):
> > self.zfcp.write(getSysroot())
> > write_dasd_conf(self.dasd, getSysroot())
> >
> > + def write_dasd_conf(self, disks, root):
> > + """ Write /etc/dasd.conf to target system for all DASD devices
> > + configured during installation.
> > + """
> > + if not (arch.isS390() or disks):
> Should be 'arch.isS390() and disks', I guess?
Hmm, interesting, and I think "and" is correct, yes. I guess it's
fortunate this bug hasn't been stumbled upon before.
> --
> Vratislav Podzimek
>
> Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
>
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
More information about the anaconda-patches
mailing list