[Lxc-users] Unable to create lxc CT on fedora 19

Michael H. Warfield mhw at WittsEnd.com
Mon Jul 8 16:44:38 UTC 2013


On Mon, 2013-07-08 at 18:22 +0200, Thomas Moschny wrote: 
> 2013/7/8 Michael H. Warfield <mhw at wittsend.com>:
> > 2) The lxc-fedora template (even in 0.9.0) is busted, as I feared it
> > would be, for Fedora 19 because the Fedora 19 release file is a -2
> > release and it's only looking for a -1 release.  I saw that code a month
> > ago and thought "that can't be right" but it hasn't busted until now.
> > Nobody answered when I asked about that logic on the devel list back
> > then so I guess it's one more thing on my list to fix.  The whole retry
> > logic in that template is wrong, IMNSHO.

> It is unclear to me why the fedora-release rpm is installed
> separately. Yum knows a --releasever option that could be used
> instead.

It's because of the catch-22 trying to bootstrap on a foreign distro,
and this is where most of the other templates fall flat on their faces
(and Fedora, Debian, and Ubuntu does as well, just not as badly).  You
have to download a minimal file system assuming you only have distro
independent tools.  Once that's built, you can use the distro dependent
tools (yum, apt, dpkg, zypper) in the chrooted container.  But you can't
use them till you have it set up and don't have them before.  That makes
for a challenge, for sure!  In some cases, it make take a little help
from the distro vendors there.

I've just figure out some of what I need to do to get the SuSE template
working on non-SuSE hosts.  Seems that rpm is present on SuSE and I
should be able to eliminate zypper and use purely rpm to install the
minimal (I'm finding this how the hard way working on some SuSE zLinux
s360 stuff).

Debian and Fedora (and Redhat based et all) have debboot and febboot to
assist in cross building this, but that's not universal.  The template
owners (and I'm just a contributor) really need to try and make their
templates work in a more distro independent manner.  But, that's why you
will see these sorts of download peculiarities in some of the templates.
We're working around running on a distro different than what we're
installing.

> Independently, the retry logic is broken. It should fetch the
> mirrorlist only once and try mirrors on that list, from top to bottom.

Right (I'm working on that now) and download information to tell it what
the correct release package is (pull down a directory of Packages/f/ and
search for fedora-release-xx in this case).  I'm working on it. 

That logic is broken for more than one reason and is going to need more
than one loop.

1) It needs a couple of retries for network errors in getting the mirror
list.  That's one loop and I'll probably just shorten the first loop and
add a sleep for that one.

2) It then needs to process through the list as you say - that's the
second loop.  I'll probably make that a "for" loop over, say, the top 6
repo URLs (if you don't get it in 6, you've got bigger problems, so come
back again...).

3) It needs to deal with multiple/variable/indeterminant release clicks.
That should be handled by pulling the directory and finding the correct
release package name from the directory.

> Regards,
> Thomas

Regards,
Mike
-- 
Michael H. Warfield (AI4NB) | (770) 985-6132 |  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: 482 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130708/9de7ff97/attachment.pgp>


More information about the lxc-users mailing list