[OpenWrt-Devel] LXC is broken on Caos Calmer

Daniel Golle daniel at makrotopia.org
Thu Feb 11 01:08:03 EST 2016


Hi Antonio,

thanks for trying all that and reporting back your results!

On Thu, Feb 11, 2016 at 12:47:50AM +0200, Antonio Aloisio wrote:
> Hi there!
> Here is a few findings about LXC templates available on OpenWRT CC.
> 
> Just for reference, here below you can see all the templates available on
> CC and what works and what does not.

Maybe we should split-up the templates into individual packages, each
having its own set of dependencies.

> 
> /usr/share/lxc/templates/lxc-oracle <-- BAD ARCHITECTURE. NO ARM
> /usr/share/lxc/templates/lxc-plamo <-- depends on "flock". It may work. I
> get Failed to download

flock is available as a package, you should be able to install it.

> /usr/share/lxc/templates/lxc-busybox <-- creates the containers, but
> doesn't start (busybox no statically linked)

Well, that's odd, but there's not much we can do. Maybe report that
to LXC and let them know not everybody uses glibc...

> /usr/share/lxc/templates/lxc-fedora <-- fails to
> download /releases/20/Fedora/armhfp/os

Also, please report that upstream (check that it wasn't already fixed
in more recent versions of LXC)

> /usr/share/lxc/templates/lxc-sshd <--- fails requires ssh-keygen. is it
> available on openwrt?

Installing openssh-keygen, openssh-client and openssh-client-utils may
help...

> /usr/share/lxc/templates/lxc-ubuntu-cloud <-- no idea what's broken
> /usr/share/lxc/templates/lxc-openmandriva
> /usr/share/lxc/templates/lxc-gentoo <-- requires tar. maybe works >220MB.
> Ran out of disk on /tmp

Probably temp directory for LXC should be configurable, so it can
go to /mnt/tmp or somewhere with enough space on a specific system...

> /usr/share/lxc/templates/lxc-download <-- no idea what's wrong


> /usr/share/lxc/templates/lxc-archlinux <-- fails require pacman. not
> available

I agree it'd be nice to have, I remember that pacstrap was quite
painful to get working, I've tried that before...

> /usr/share/lxc/templates/lxc-cirros <-- require tar. works? some problem
> still with lxc cgroups

Did you compile OpenWrt from source?
I'm asking because LXC depends on CONFIG_LXC_KERNEL_OPTIONS and
CONFIG_LXC_BUSYBOX_OPTIONS to work properly, and I believe this isn't
enabled in the binary release of CC.

> /usr/share/lxc/templates/lxc-debian <-- requires debootstrap. itäs not a
> openwrt package
> /usr/share/lxc/templates/lxc-ubuntu <-- requires debootstrap. itäs not a
> openwrt package

You can install debootstrap, it is available, I've just updated it to
the most recent release.

> /usr/share/lxc/templates/lxc-centos <-- requires yum. fails container
> creation

Hm, nobody ever packaged all the foreign-distribution package managers
for OpenWrt. It's quite a lot of work...

> /usr/share/lxc/templates/lxc-altlinux <-- requires apt-get. fails container
> creation

Why doesn't the template just you debootstrap...?

> /usr/share/lxc/templates/lxc-alpine <-- requires sha256sum. is it available?

Try installing coreutils-sha256sum which provides sha256sum

> /usr/share/lxc/templates/lxc-opensuse <-- requires zipper. not available


Cheers


Daniel

> 
> Cheers,
> Antonio
> 
> On Wed, Feb 10, 2016 at 10:03 PM, Daniel Golle <daniel at makrotopia.org>
> wrote:
> 
> > Hi Antonio,
> >
> > On Wed, Feb 10, 2016 at 09:52:25PM +0200, Antonio Aloisio wrote:
> > > Hi there,
> > > I have tried to run lxc on openwrt but it looks to me that those packages
> > > are broken.
> >
> > I'm actively using LXC, however, I use a custom overlayfs method to
> > create OpenWrt containers.
> > >
> > > root at Honeypot:/home/gnuton# lxc-create -t download -n xx
> > > Setting up the GPG keyring
> > > ERROR: Unable to fetch GPG key from keyserver.
> > > lxc_container: lxccontainer.c: create_run_template: 1102 container
> > creation
> > > template for xx failed
> >
> > I manually use debootstrap to setup Debian rootfs and throwing that at
> > LXC works great. I once went through the Debian template and believe it
> > would make sense to fix it up to work on OpenWrt, so LXC becomes more
> > useable. Do you have gnupg installed? If not or if GPG stuff fails for
> > some reason, you can try to to modify the Debian template to use
> > debootstrap having the signature checks disabled (not ideal,
> > obviously).
> >
> > > I have also installed LXC LuCi web GUI and it doesn't work too.
> > > The GUI would allow me to create a openwrt based conatainer, but the
> > truth
> > > is that there is no such template available as you may see from the above
> > > list.
> >
> > I never tried lxc-download nor the LuCI GUI which is afaik just a
> > proof-of-concept and not that usable in it's current state.
> >
> >
> > > Digging further I had a look at the source code and I noticed there some
> > > problems too
> > > for instance
> > >
> > https://github.com/openwrt/packages/blob/master/utils/lxc/patches/030-lxc-download.patch
> > > points lxc-download to use a not working server.
> >
> > If you feel like helping, please suggest a patch via github.
> >
> > > I would like to know what's the status of LXC, is it supposed to work or
> > > those packages are unmantained?
> >
> > Good question... @luka ?
> >
> >
> > Cheers
> >
> >
> > Daniel
> >
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list