On 06/15/2010 02:13 PM, Ferenc Wagner wrote:
Daniel Lezcano<daniel.lezc...@free.fr>  writes:

On 06/10/2010 11:47 PM, Ferenc Wagner wrote:

If you provide me with an example (and some description of
lxc.console), I can give it some testing and concretize this pure
guesswork.
lxc-create -n ubuntu -f ~/mynetwork.conf -t ubuntu
lxc-start -n ubuntu -s lxc.console=$(tty) -o $(tty) -l DEBUG
I'm not there yet, but found something interesting.  If lxc-checkconfig
reports full green, clone(NEWNS|NEWUTS|NEWIPC|NEWPID|NEWNET) in
lxc-start shouldn't fail.  Who's wrong here?

Cheers,
Feri.

$ lxc-checkconfig
Kernel config /proc/config.gz not found, looking in other places...
Found kernel config file /boot/config-2.6.26-2-686

2.6.26 ? Mmmh, You need at least a 2.6.29 for a system container (better to have a 2.6.32).

--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
Network namespace: enabled
Multiple /dev/pts instances: enabled

--- Control groups ---
Cgroup: enabled
Cgroup namespace: enabled
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: enabled
Cgroup cpuset: enabled

--- Misc ---
Veth pair device: enabled
Macvlan: enabled
Vlan: enabled
File capabilities: enabled

Note : Before booting a new kernel, you can check its configuration
usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig

$ sudo lxc-start -n debian -s lxc.console=$(tty)
lxc-start: failed to clone(0x6c020000): Invalid argument
lxc-start: Invalid argument - failed to fork into a new namespace
lxc-start: failed to spawn 'debian'
lxc-start: No such file or directory - failed to remove cgroup '/mnt/debian'

Bah ! Looks like the lxc-checkconfig is buggy (fix in attachment).

---
 src/lxc/lxc-checkconfig.in |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Index: lxc/src/lxc/lxc-checkconfig.in
===================================================================
--- lxc.orig/src/lxc/lxc-checkconfig.in
+++ lxc/src/lxc/lxc-checkconfig.in
@@ -11,8 +11,6 @@ SETCOLOR_NORMAL="echo -en \\033[0;39m"
 
 is_set() {
     $GREP -q "$1=[y|m]" $CONFIG
-    RES=$?
-
     return $?
 }
 
@@ -22,7 +20,7 @@ is_enabled() {
     is_set $1
     RES=$?
 
-    if [ $RES = 0 ]; then
+    if [ $RES -eq 0 ]; then
 	$SETCOLOR_SUCCESS && echo -e "enabled" && $SETCOLOR_NORMAL
     else
 	if [ ! -z "$mandatory" -a "$mandatory" = yes ]; then
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to