[master/rhel7] Check initrd size on ppc64 and warn (#1060691)

Brian C. Lane bcl at redhat.com
Fri Feb 14 15:29:37 UTC 2014


On Fri, Feb 14, 2014 at 07:57:28AM +0100, Vratislav Podzimek wrote:
> On Thu, 2014-02-13 at 09:42 -0800, Brian C. Lane wrote:
> > ppc64 initrd cannot be larger than 32MiB, so log a warning if it is too
> > large.
> > 
> > Related: rhbz#1060691
> > ---
> >  src/pylorax/treebuilder.py | 7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/src/pylorax/treebuilder.py b/src/pylorax/treebuilder.py
> > index 2bf3a31..0ae1bc3 100644
> > --- a/src/pylorax/treebuilder.py
> > +++ b/src/pylorax/treebuilder.py
> > @@ -214,6 +214,13 @@ class TreeBuilder(object):
> >                  os.rename(initrd, initrd + backup)
> >              cmd = dracut + [outfile, kernel.version]
> >              runcmd(cmd, root=self.vars.inroot)
> > +
> > +            # ppc64 cannot boot images > 32MiB, check size and warn
> > +            if self.vars.arch.basearch == "ppc64" and os.path.exists(outfile):
> > +                st = os.stat(outfile)
> > +                if st.st_size > 32 * 1024 * 1024:
> > +                    logging.warning("ppc64 initrd %s is > 32MiB", outfile)
> What about logging the actual size as well?

Already pushed :/ Mostly I was aiming for something you can grep the
logs for that indicated a problem.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)


More information about the anaconda-patches mailing list