[lxc-users] [ Fedora template ] Error while creating a new container

Michael H. Warfield mhw at WittsEnd.com
Mon Apr 13 16:49:29 UTC 2015


On Sun, 2015-04-12 at 19:15 -0300, Martin Cigorraga wrote:
> Hi all,

> Host OS: Fedora 21 up-to-date, kernel 3.19.3

> Yesterday I tried to create a Fedora container but constantly had the
> following errors; while ultimately I could manage to end up with a
> working system after running an update once the container was created,
> I don't know how much crippled it ended being...

> Please check the following errors:
> # lxc-create -n F21 -t fedora -B btrfs
> Host CPE ID from /etc/os-release: cpe:/o:fedoraproject:fedora:21
> Checking cache download in /var/cache/lxc/fedora/x86_64/21/rootfs ...
> Downloading fedora minimal ...
> Fetching rpm name from
> http://www.las.ic.unicamp.br/pub/fedora/linux/releases/21/Everything/x86_64/os//Packages/f...
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100   413  100   413    0     0    440      0 --:--:-- --:--:-- --:--:--   440
> 100   837  100   837    0     0    749      0  0:00:01  0:00:01 --:--:--   749
> Failed to identify fedora release rpm.
> Fetching rpm name from
> http://fedora.c3sl.ufpr.br/linux/releases/21/Everything/x86_64/os//Packages/f...
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100   286  100   286    0     0    252      0  0:00:01  0:00:01 --:--:--   252
>   0     0    0  240k    0     0  87074      0 --:--:--  0:00:02 --:--:--  186k
> Fetching fedora release rpm from
> http://fedora.c3sl.ufpr.br/linux/releases/21/Everything/x86_64/os//Packages/f/fedora-release-21-2.noarch.rpm......
>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                  Dload  Upload   Total   Spent    Left  Speed
> 100 21860  100 21860    0     0  15132      0  0:00:01  0:00:01 --:--:-- 15138
> Bootstrap Environment testing...

The "Failed to identify fedora release rpm above is normal, if that's
what you are complaining about.  At least normal for the template when
it encounters a broken repository.  I checked the www.las.ic.unicam.br
repository and their "Packages/f" directory is empty.  That's why I
coded the logic in there to do a directory listing first and look for
the release file (which may have additional revisions).  The template
could not identify a release file in there so it moved onto a different
repository where is was able to find the fedora-release rpm.  It did
what it was suppose to do.  I guess the failure message could be clearer
on that point.

> OS fedora is whitelisted.  Installation Bootstrap Environment not required.

> warning: /var/cache/lxc/fedora/x86_64/21/partial/fedora-release-21-2.noarch.rpm:
> Header V3 RSA/SHA256 Signature, key ID 95a43f54: NOKEY
> Preparing...                          ################################# [100%]
> Updating / installing...
>    1:fedora-release-21-2              ################################# [100%]
> sed: can't read
> //var/cache/lxc/fedora/x86_64/21/partial/etc/yum.repos.d/*: No such
> file or directory

Ok...  I didn't recognize the above error with sed but I found it.  It's
attempting to adjust the basearch parameters in the yum repo files (used
primarily to adjust for an i386 container on an x86_64 host).  That's
indicating that the repo files have not been downloaded for F21.

This is in the most recent template (taken from 1.1.0):

--
    # F21 and newer need fedora-repos in addition to fedora-release...
    # Note that fedora-release and fedora-system have a mutual dependency.
    # So installing the reops package after the release package we can
    # spare one --nodeps.
    if [ "$release" -ge "21" ]; then
      ${BOOTSTRAP_CHROOT}rpm --root ${BOOTSTRAP_INSTALL_ROOT} -ivh ${BOOTSTRAP_INSTALL_ROOT}/${REPOS_RPM}
    fi
--

There is more in there for actually downloading that REPOS_RPM as well.

What version of lxc are you running?  I'm currently running 1.1.0 rpms
built from the releases on an F21 host without seeing any of these
errors.  You also seem to be missing a couple of the "repo" downloads
that are present in the 1.1.0 template.

Latest rev for lxc on stock F21 is 1.0.7.  I just checked that template
and the above code is not present, which explains the sed error, since
the template files are not then present.  F21 and above also have to
install the fedora-repos rpm.  That's where your problem is.  It looks
like 1.0.7 is the latest release in the 1.0.x line and needs the F21
repo fix applied to template in that branch.  My recommendation would be
to upgrade to 1.1.0

> Loaded plugins: etckeeper, fastestmirror, keys, langpacks, list-data,
> priorities, ps, remove-with-leaves, rpm-warm-cache, show-leaves,
> tmprepo, upgrade-helper
> Determining fastest mirrors...

> /

> From the errors shown above, I want to add that the first time the
> container is created it *always* has exactly the same problems:
> 1. Problems with fedora-release;

Which appears to be a problem with one of the F21 repositories.  There
may be some additional problem in the retry logic for that broken repo
but I'm not seeing it.  Seems to be working correctly, although you're
not getting the fedora-repos rpms.

> 2. Mispell path:
> //var/cache/lxc/fedora/x86_64/21/partial/etc/yum.repos.d/* (though
> there's no typo in the template file itself).

This appears to be related to the fedora-release / fedora-repos split in
F21 and is fixed in the 1.1.0 branch and master.  Not at all sure what
you meant by "mispell path" but it's the correct path (just with a
superfluous duplicate leading '/').

> Let me know if I can be of further assistance to help squash down these bugs.

I don't know that there are any plans for a 1.0.8 release or how fast
that would be picked up by Fedora.

You might want to file a bugzilla report with Fedora against Fedora 21.
I don't know that there are any plans for a 1.0.8 release or how fast
that would be picked up by Fedora.  Might be easier to get them to pick
up the 1.1.0 release.  I'll also ping the maintainer and see what he
wants to do.

> -Martín

Regards,
Mike
-- 
Michael H. Warfield (AI4NB) | (770) 978-7061 |  mhw at WittsEnd.com
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 465 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20150413/1a8189d1/attachment.sig>


More information about the lxc-users mailing list