[lxc-devel] Erroneous "cgroup is not mounted" when using cgconfig (libcgroup)

2010-10-03 Thread Ward, David - 0663 - MITLL
The 'cgconfig' tool from libcgroup (http://libcg.sourceforge.net) can be used to mount one or more instances of the cgroup virtual filesystem, instead of using the 'mount' command. However, cgconfig does not update /etc/mtab, although the mounted cgroup filesystems do appear in /proc/mounts. (

[lxc-devel] [PATCH 2/8] use the rootfs mount point for the console

2010-10-03 Thread Daniel Lezcano
The rootfs is always located in the mount point now, let's use it. Signed-off-by: Daniel Lezcano --- src/lxc/conf.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index aae52f4..7755837 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c

[lxc-devel] [PATCH 3/8] use the rootfs mount point for the tty's

2010-10-03 Thread Daniel Lezcano
The rootfs is always located in rootfs->mount, let's use it for the tty. Signed-off-by: Daniel Lezcano --- src/lxc/conf.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 7755837..3da522f 100644 --- a/src/lxc/conf.c +++ b/src/lxc/

[lxc-devel] [PATCH 1/8] mount the rootfs to the mount directory first

2010-10-03 Thread Daniel Lezcano
Split the rootfs setup by mounting the rootfs to the mount point. This mount point will be used as the facto place where the rootfs is placed. Signed-off-by: Daniel Lezcano --- src/lxc/conf.c | 28 +--- 1 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src

[lxc-devel] [PATCH 5/8] Use container's proc to setup the utmp watching

2010-10-03 Thread Daniel Lezcano
The /var/run/utmp is located in: /proc//root/var/run/utmp, let's use it. Signed-off-by: Daniel Lezcano --- src/lxc/utmp.c | 30 +++--- 1 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/lxc/utmp.c b/src/lxc/utmp.c index dca9d72..e6249ce 100644 --- a/s

[lxc-devel] [PATCH 8/8] allow to specify a image or a device block as rootfs

2010-10-03 Thread Daniel Lezcano
This patch allows to specify an image or a block device. The image or the block device is mounted on rootfs->mount. Signed-off-by: Daniel Lezcano --- src/lxc/conf.c | 223 +--- 1 files changed, 132 insertions(+), 91 deletions(-) diff --git a

[lxc-devel] [PATCH 6/8] Don't display an error in lxc_file_for_each_line

2010-10-03 Thread Daniel Lezcano
Don't display an error when the callback returns an error different from zero. A value greater than zero may means "stop". Let's the caller to check the error. Signed-off-by: Daniel Lezcano --- src/lxc/parse.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/src/lxc/pa

[lxc-devel] [PATCH 4/8] Initialize default mount point

2010-10-03 Thread Daniel Lezcano
Let's initialize rootfs->mount to LXCROOTFSMOUNT. The value will be overwritten by the configuration in case it is specified. That will make the code nicer, instead of the ugly rootfs->mount checks. Signed-off-by: Daniel Lezcano --- src/lxc/conf.c | 27 +++ 1 files cha

[lxc-devel] [PATCH 7/8] add rootfs mount dir variable to pkg-config

2010-10-03 Thread Daniel Lezcano
In the case we use an image for rootfs, if we need to do extra mount from the host to the rootfs, we have to specify the place where the image is mounted. This value is configured by the user with the lxc.rootfs.mount otherwise defaulting to @lxcrootfsmo...@. Let's export this variable to pkg-confi