[lxc-devel] A few fixes for lxc-fedora template

2011-10-26 Thread Tuomas Suutari
Hi, I was setting up a Fedora container on my Ubuntu 11.10 system, but ran into some problems with the lxc-fedora template. I tried with the latest version from the git master, but it also needed some small fixes to get it working. So here are the fixes that I did. Hopefully someone else also find

[lxc-devel] [PATCH 3/3] lxc-fedora.in: Fix fetching of the fedora-release rpm

2011-10-26 Thread Tuomas Suutari
The hardcoded URL seems to be broken and 404 error was not checked. Now the mirror is selected from mirrorlist (instead of hardcoding to funet.fi) and fetch errors are checked. Also added a retry loop (with 3 tries) to find a working mirror, since some of the mirrors are not OK. Signed-off-by: Tu

[lxc-devel] [PATCH 1/3] lxc-fedora.in: Add missing default release variable

2011-10-26 Thread Tuomas Suutari
The text says that 14 is default, but release=14 was not set anywhere in the script. Signed-off-by: Tuomas Suutari --- templates/lxc-fedora.in |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/templates/lxc-fedora.in b/templates/lxc-fedora.in index d35600a..8588aef 100644

[lxc-devel] [PATCH 2/3] lxc-fedora.in: Use i386 instead of i686

2011-10-26 Thread Tuomas Suutari
There is no i686 variant of Fedora, but Ubuntu seems to return i686 from the arch command. Signed-off-by: Tuomas Suutari --- templates/lxc-fedora.in |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/templates/lxc-fedora.in b/templates/lxc-fedora.in index 8588aef..1e8fff

[lxc-devel] [PATCH 0/3] The poor man's attach

2011-10-26 Thread Greg Kurz
Often people want to launch a command in an already running container. This can be achieved with the lxc-attach command, provided you have a patched kernel with full setns() support. For those who won't rebuild a kernel, we introduce the lxc-rexec command to be used in place of lxc-attach. The pri

[lxc-devel] [PATCH 1/3] lxc-init: use lxc_mainloop

2011-10-26 Thread Greg Kurz
The goal here is to be able to multiplex several event sources in lxc-init. It will be a lot easier to add I/O driven features: for example, a rexec-like service to start extra commands in a container. Signed-off-by: Greg Kurz Signed-off-by: Cedric Le Goater --- src/lxc/error.c| 23 +

[lxc-devel] [PATCH 3/3] lxc: introduce lxc-rexec

2011-10-26 Thread Greg Kurz
The lxc-rexec command connects to the lxc-init process on an AF_UNIX socket to spawn commands inside the container. Signals are forwarded from lxc-rexec to the command and the exit code is sent back to lxc-rexec. The command also runs in its own session with its own ctty. Multiple commands can be

[lxc-devel] [PATCH 2/3] lxc-init: use lxc logging infrastructure

2011-10-26 Thread Greg Kurz
Because there are no reasons that a vital component like lxc-init doesn't log into a file. Signed-off-by: Greg Kurz Signed-off-by: Cedric Le Goater --- src/lxc/execute.c | 22 - src/lxc/lxc.h |1 + src/lxc/lxc_execute.c |3 ++ src/lxc/lxc_init.c| 62

[lxc-devel] [lxc-dev]how to use lxc directly in kernel

2011-10-26 Thread yinxb
Hi I am a newbie to Linux container. Recently,I decide to using lxc derectly on linux kernel,but find it hard to install. (so far as I know,lxc tools is based on GUI Linux distribution). Anyone has this experience? or give me a hint on how to use the lxc directly on linux kernel without