[f21-branch][PATCH] Search for a valid stage1 device on disks with stage1 mount points (#1168118)

Vratislav Podzimek vpodzime at redhat.com
Fri Nov 28 11:55:36 UTC 2014


On Fri, 2014-11-28 at 06:02 -0500, Martin Kolman wrote:
> 
> ----- Original Message -----
> > From: "Vratislav Podzimek" <vpodzime at redhat.com>
> > To: anaconda-patches at lists.fedorahosted.org
> > Sent: Friday, November 28, 2014 11:49:09 AM
> > Subject: [f21-branch][PATCH] Search for a valid stage1 device on disks with	stage1 mount points (#1168118)
> > 
> > From: Adam Williamson <awilliam at redhat.com>
> > 
> > Otherwise we try the first disk which may not contain a valid stage1 device
> > and
> > then give up (because the first disk is used to boot from, right?).
> > 
> > Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> > ---
> >  pyanaconda/kickstart.py | 13 ++++++++++++-
> >  1 file changed, 12 insertions(+), 1 deletion(-)
> > 
> > diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
> > index 72d77f3..d44b349 100644
> > --- a/pyanaconda/kickstart.py
> > +++ b/pyanaconda/kickstart.py
> > @@ -379,9 +379,20 @@ class Bootloader(commands.bootloader.F21_Bootloader):
> >          if self.timeout is not None:
> >              storage.bootloader.timeout = self.timeout
> >  
> > +        # try to reduce the set of possible 'boot disks' to the disks
> > containing
> > +        # a valid stage1 mount point, if there are any, because those disks
> > +        # should be searched for a stage1_valid device
> > +        disks = storage.disks
> > +        if platform.bootStage1ConstraintDict["mountpoints"]:
> > +            disks = [p.disk for p in storage.devices if getattr(p.format,
> > "mountpoint", None) in platform.bootStage1ConstraintDict["mountpoints"]]
> > +            if not disks:
> > +                # but if not, just go ahead and use the set of all disks or
> > +                # else we'll error out later
> > +                disks = storage.disks
> > +
> >          # Throw out drives specified that don't exist or cannot be used
> >          (iSCSI
> >          # device on an s390 machine)
> > -        disk_names = [d.name for d in storage.disks
> > +        disk_names = [d.name for d in disks
> >                        if not d.format.hidden and not d.protected and
> >                        (not blivet.arch.isS390() or not isinstance(d,
> >                        blivet.devices.iScsiDiskDevice))]
> >          diskSet = set(disk_names)
> Looks good to me, ACK!
Thanks. Pushed to f21-branch, open for discussion for master and
rhel7-branch.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list