Re: [lxc-devel] [PATCH] Improve check for systemd in the template for Fedora

2013-08-13 Thread Michael H. Warfield
On Tue, 2013-08-13 at 20:57 -0500, Serge Hallyn wrote: > Quoting Michael H. Warfield (m...@wittsend.com): > > Woa! Hold! Time out. Do not do this. > > > > On Tue, 2013-08-13 at 16:36 +0900, Satoshi Matsumoto wrote: > > > Configure the guest init based on whether the PID 1 process is systemd >

Re: [lxc-devel] [PATCH] Improve check for systemd in the template for Fedora

2013-08-13 Thread Serge Hallyn
Quoting Michael H. Warfield (m...@wittsend.com): > Woa! Hold! Time out. Do not do this. > > On Tue, 2013-08-13 at 16:36 +0900, Satoshi Matsumoto wrote: > > Configure the guest init based on whether the PID 1 process is systemd > > or not. > > > In the template for Fedora, currently the guest

Re: [lxc-devel] [PATCH] Improve check for systemd in the template for Fedora

2013-08-13 Thread Michael H. Warfield
Woa! Hold! Time out. Do not do this. On Tue, 2013-08-13 at 16:36 +0900, Satoshi Matsumoto wrote: > Configure the guest init based on whether the PID 1 process is systemd > or not. > In the template for Fedora, currently the guest is configured based on > whether the /bin/systemd exists in the

[lxc-devel] [PATCH 2/8] lxc-attach: Completely rework lxc-attach and move to API function

2013-08-13 Thread Christian Seiler
- Move attach functionality to a completely new API function for attaching to containers. The API functions accepts the name of the container, the lxcpath, a structure indicating options for attaching and returns the pid of the attached process. The calling thread may then use waitpid(

[lxc-devel] [PATCH 4/8] Add attach support to container C API

2013-08-13 Thread Christian Seiler
Signed-off-by: Christian Seiler --- src/lxc/lxccontainer.c | 124 src/lxc/lxccontainer.h |8 +++- 2 files changed, 80 insertions(+), 52 deletions(-) diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c index 3affe22..1c77b63 100644 --

[lxc-devel] [PATCH 5/8] apparmor/attach: make sure buffer is NUL-terminated

2013-08-13 Thread Christian Seiler
Signed-off-by: Christian Seiler --- src/lxc/apparmor.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lxc/apparmor.c b/src/lxc/apparmor.c index a2d6476..cb81464 100644 --- a/src/lxc/apparmor.c +++ b/src/lxc/apparmor.c @@ -42,12 +42,13 @@ again: } sz +

[lxc-devel] [PATCH 3/8] Add helper functions to convert va_list of char* to char**.

2013-08-13 Thread Christian Seiler
Signed-off-by: Christian Seiler --- src/lxc/utils.c | 46 ++ src/lxc/utils.h |5 + 2 files changed, 51 insertions(+) diff --git a/src/lxc/utils.c b/src/lxc/utils.c index 89d335d..9dd742b 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -

[lxc-devel] [PATCH 8/8] attach: implement remaining options of lxc_attach_set_environment

2013-08-13 Thread Christian Seiler
This patch implements the extra_env and extra_keep options of lxc_attach_set_environment. The Python implementation, the C container API and the lxc-attach utility are able to utilize this feature; lxc-attach has gained two new command line options for this. Signed-off-by: Christian Seiler ---

[lxc-devel] [PATCH 7/8] python: add attach support

2013-08-13 Thread Christian Seiler
Add methods attach() and attach_wait() to the Python API that give access to the attach functionality of LXC. Both accept two main arguments: 1. run: A python function that is executed inside the container 2. payload: (optional) A parameter that will be passed to the python function A

Re: [lxc-devel] Preparation for LXC 1.0 alpha-1

2013-08-13 Thread Christian Seiler
Hi there, If you remember from quite a while ago, I proposed some changes to the attach functionality to make it quite a bit better: http://thread.gmane.org/gmane.linux.kernel.containers.lxc.devel/3429 A few initial patches were already applied back then, some others I wanted to redo with the re

[lxc-devel] [PATCH 0/8] lxc-attach rewrite, attach API

2013-08-13 Thread Christian Seiler
Hi there, This patch set can also be found on my local github tree at: It contains the following main parts: - move attach functionality to attach.c, rewrite it in such a way that the attached process is now a parent of the original p

[lxc-devel] [PATCH 6/8] python: improve convert_tuple_to_char_pointer_array

2013-08-13 Thread Christian Seiler
convert_tuple_to_char_pointer_array now also accepts lists and not only tuples when converting to a C array. Other fixes: - some checking that it's actually a list/tuple before trying to convert - off-by-a-few-bytes allocation error (sizeof(char *)*n+1 vs. sizeof(char *)*(n+1)/calloc(...))

[lxc-devel] [PATCH 1/8] Fix return type of read/write utility functions.

2013-08-13 Thread Christian Seiler
Signed-off-by: Christian Seiler --- src/lxc/utils.c | 14 +++--- src/lxc/utils.h |6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lxc/utils.c b/src/lxc/utils.c index c3f734b..89d335d 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -359,9 +359,9 @

[lxc-devel] [PATCH 1/1] lxc.conf.sgml.in: note the arguments and environment variables passed to hooks

2013-08-13 Thread Serge Hallyn
Signed-off-by: Serge Hallyn --- doc/lxc.conf.sgml.in | 21 + 1 file changed, 21 insertions(+) diff --git a/doc/lxc.conf.sgml.in b/doc/lxc.conf.sgml.in index 6500e50..02667fc 100644 --- a/doc/lxc.conf.sgml.in +++ b/doc/lxc.conf.sgml.in @@ -862,6 +862,27 @@ Foundation, Inc., 59

[lxc-devel] [PATCH 1/1] cgroups: rework to handle nested containers with multiple and partial mounts

2013-08-13 Thread Serge Hallyn
Currently, if you create a container and use the mountcgruop hook, you get the /lxc/c1/c1.real cgroup mounted to /. If you then try to start containers inside that container, lxc can get confused. This patch addresses that, by accepting that the cgroup as found in /proc/self/cgroup can be partiall

[lxc-devel] [PATCH] Improve check for systemd in the template for Fedora

2013-08-13 Thread Satoshi Matsumoto
Configure the guest init based on whether the PID 1 process is systemd or not. In the template for Fedora, currently the guest is configured based on whether the /bin/systemd exists in the host or not. This doesn't work correctly because the /usr/bin/systemd symlink has been removed from the syste