it seems that lxc cannot handle cgroups when capabilities are not all in the
same mount
it fails now because it cannot write the devices.deny in the cgroup
if i comment out all the lxc.cgroup.devices lines in the config of the
container then i can actually start it

I would think that the way lxc identifies the cgroup mount might be the part
that needs patching



On Tue, May 31, 2011 at 11:00 AM, Ramez Hanna <rha...@informatiq.org> wrote:

> On Sat, May 28, 2011 at 3:33 PM, Ramez Hanna <rha...@informatiq.org>wrote:
>
>> I have failed to start a container on f15 although it worked fine on 14
>> here is the log
>> ==snip
>> [root@hovercraft boss]# cat lxc.log
>> lxc-start 1306584262.160 DEBUG lxc_conf - allocated pty '/dev/pts/9' (4/5)
>> lxc-start 1306584262.160 DEBUG lxc_conf - allocated pty '/dev/pts/10'
>> (6/7)
>> lxc-start 1306584262.160 DEBUG lxc_conf - allocated pty '/dev/pts/11'
>> (8/9)
>> lxc-start 1306584262.160 DEBUG lxc_conf - allocated pty '/dev/pts/12'
>> (10/11)
>> lxc-start 1306584262.160 INFO lxc_conf - tty's configured
>> lxc-start 1306584262.160 ERROR lxc_caps - failed to cap_get_flag: Invalid
>> argument
>> lxc-start 1306584262.160 DEBUG lxc_console - using '/dev/tty' as console
>> lxc-start 1306584262.160 DEBUG lxc_start - sigchild handler set
>> lxc-start 1306584262.161 INFO lxc_start - 'boss' is initialized
>> lxc-start 1306584262.161 ERROR lxc_namespace - failed to
>> clone(0x6c020000): Operation not permitted
>> lxc-start 1306584262.161 ERROR lxc_start - Operation not permitted -
>> failed to fork into a new namespace
>> lxc-start 1306584262.161 ERROR lxc_start - failed to spawn 'boss'
>> lxc-start 1306584262.161 DEBUG lxc_cgroup - using cgroup mounted at
>> '/sys/fs/cgroup/systemd'
>> lxc-start 1306584262.161 ERROR lxc_cgroup - No such file or directory -
>> failed to remove cgroup '/sys/fs/cgroup/systemd/boss'
>> == end
>>
>> mounts
>> [root@hovercraft boss]# mount |grep cgroup
>> tmpfs on /sys/fs/cgroup type tmpfs
>> (rw,nosuid,nodev,noexec,relatime,mode=755)
>> cgroup on /sys/fs/cgroup/systemd type cgroup
>> (rw,nosuid,nodev,noexec,relatime,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
>> cgroup on /sys/fs/cgroup/cpuset type cgroup
>> (rw,nosuid,nodev,noexec,relatime,cpuset)
>> cgroup on /sys/fs/cgroup/ns type cgroup
>> (rw,nosuid,nodev,noexec,relatime,ns)
>> cgroup on /sys/fs/cgroup/cpu type cgroup
>> (rw,nosuid,nodev,noexec,relatime,cpu)
>> cgroup on /sys/fs/cgroup/cpuacct type cgroup
>> (rw,nosuid,nodev,noexec,relatime,cpuacct)
>> cgroup on /sys/fs/cgroup/memory type cgroup
>> (rw,nosuid,nodev,noexec,relatime,memory)
>> cgroup on /sys/fs/cgroup/devices type cgroup
>> (rw,nosuid,nodev,noexec,relatime,devices)
>> cgroup on /sys/fs/cgroup/freezer type cgroup
>> (rw,nosuid,nodev,noexec,relatime,freezer)
>> cgroup on /sys/fs/cgroup/net_cls type cgroup
>> (rw,nosuid,nodev,noexec,relatime,net_cls)
>> cgroup on /sys/fs/cgroup/blkio type cgroup
>> (rw,nosuid,nodev,noexec,relatime,blkio)
>>
>> it looks like lxc is trying to create the container's cgroup under systemd
>> which seems to be the wrong location
>> any leads on how can i debug further
>> how does lxc find where cgroup is mounted?
>>
>> see bug https://bugzilla.redhat.com/show_bug.cgi?id=683667
>>
>
>
> upgraded to lxc-0.7.4.1-1.1.x86_64
>
> [root@hovercraft ~]# lxc-start -n boss -l DEBUG -o log
> lxc-start: open /sys/fs/cgroup/systemd/boss/devices.deny : No such file or
> directory
> lxc-start: failed to setup the cgroups for 'boss'
> lxc-start: failed to setup the container
> lxc-start: invalid sequence number 1. expected 2
>
> lxc-start: failed to spawn 'boss'
>
> [root@hovercraft ~]# cat log
> lxc-start 1306828803.471 DEBUG lxc_conf - allocated pty '/dev/pts/9' (4/5)
> lxc-start 1306828803.471 DEBUG lxc_conf - allocated pty '/dev/pts/10' (6/7)
> lxc-start 1306828803.471 DEBUG lxc_conf - allocated pty '/dev/pts/11' (8/9)
> lxc-start 1306828803.471 DEBUG lxc_conf - allocated pty '/dev/pts/12'
> (10/11)
> lxc-start 1306828803.471 INFO lxc_conf - tty's configured
> lxc-start 1306828803.471 DEBUG lxc_console - using '/dev/tty' as console
> lxc-start 1306828803.471 DEBUG lxc_start - sigchild handler set
> lxc-start 1306828803.471 INFO lxc_start - 'boss' is initialized
> lxc-start 1306828803.478 DEBUG lxc_cgroup - using cgroup mounted at
> '/sys/fs/cgroup/systemd'
> lxc-start 1306828803.479 DEBUG lxc_cgroup - cgroup flags is 0x2
> lxc-start 1306828803.485 INFO lxc_conf - network has been setup
> lxc-start 1306828803.485 DEBUG lxc_conf - mounted
> '/var/lib/lxc/boss/rootfs' on '/usr/lib64/lxc/rootfs'
> lxc-start 1306828803.485 DEBUG lxc_conf - mounted 'proc' on
> '/usr/lib64/lxc/rootfs//proc', type 'proc'
> lxc-start 1306828803.486 DEBUG lxc_conf - mounted 'devpts' on
> '/usr/lib64/lxc/rootfs//dev/pts', type 'devpts'
> lxc-start 1306828803.486 DEBUG lxc_conf - mounted 'sysfs' on
> '/usr/lib64/lxc/rootfs//sys', type 'sysfs'
> lxc-start 1306828803.486 INFO lxc_conf - mount points have been setup
> lxc-start 1306828803.486 DEBUG lxc_cgroup - using cgroup mounted at
> '/sys/fs/cgroup/systemd'
> lxc-start 1306828803.486 ERROR lxc_cgroup - open
> /sys/fs/cgroup/systemd/boss/devices.deny : No such file or directory
> lxc-start 1306828803.486 ERROR lxc_conf - failed to setup the cgroups for
> 'boss'
> lxc-start 1306828803.486 ERROR lxc_start - failed to setup the container
> lxc-start 1306828803.486 ERROR lxc_sync - invalid sequence number 1.
> expected 2
> lxc-start 1306828803.486 ERROR lxc_start - failed to spawn 'boss'
> lxc-start 1306828803.486 DEBUG lxc_cgroup - using cgroup mounted at
> '/sys/fs/cgroup/systemd'
> lxc-start 1306828803.491 DEBUG lxc_cgroup - '/sys/fs/cgroup/systemd/boss'
> unlinked
>
>
>
>
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users

Reply via email to