[lxc-users] Cannot start container when lxc.cgroup.memory.* in config
Jäkel, Guido
G.Jaekel at dnb.de
Fri Mar 7 10:55:14 UTC 2014
Dear Pheb,
Your lxc-checkconfig says:
>Cgroup memory controller: enabled
But in the output of the mount command, the "memory" keyword is missing. You have to look for the reason.
For reference I append what one of my hosts state:
# grep cgroup /proc/mounts
cgroup /cgroup cgroup rw,relatime,blkio,freezer,devices,memory,cpuacct,cpu,cpuset,clone_children 0 0
greetings
Guido
>-----Original Message-----
>From: lxc-users-bounces at lists.linuxcontainers.org [mailto:lxc-users-bounces at lists.linuxcontainers.org] On Behalf Of phep
>Sent: Friday, March 07, 2014 11:08 AM
>To: lxc-users at lists.linuxcontainers.org
>Subject: [lxc-users] Cannot start container when lxc.cgroup.memory.* in config
>
>Hi,
>
>My host machine is an (admittedly) ageing Athlon AMD Athlon(TM) XP 2200+ on
>an Asustek A7V8X-X MB. RAM is 1.5 G big and the swap partition is 3 Go. The
>box is running a freshly updated Debian wheezy 7.4.
>
>The host fstab has the following line :
>cgroup /sys/fs/cgroup cgroup defaults 0 0
>
>The mount command displays this for cgroup :
>
>cgroup on /sys/fs/cgroup type cgroup
>(rw,relatime,perf_event,blkio,net_cls,freezer,devices,cpuacct,cpu,cpuset,clone_children)
>
>lxc-checkconfig displays :
>Kernel config /proc/config.gz not found, looking in other places...
>Found kernel config file /boot/config-3.2.0-4-686-pae
>--- 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 clone_children flag: 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
>
>
>I lxc-created a wheezy debian container with no problem using the "debian"
>template.I first run the container a couple of times with the default basic
>configuration being only augmented in order to have a bridged veth interface
>with a static adress. Everything went fine, then.
>
>My problem is that if I have any or both of the following two lines in the
>configuration file :
>
>lxc.cgroup.memory.limit_in_bytes = 500M
>lxc.cgroup.memory.memsw.limit_in_bytes = 3G
>
>I cannot start the container anymore. This is what I get :
>
># lxc-start -n uc23 -f /var/lib/lxc/uc23/config
>lxc-start: cgroup is not mounted
>lxc-start: failed to setup the cgroups for 'uc23'
>lxc-start: failed to setup the container
>lxc-start: invalid sequence number 1. expected 2
>lxc-start: failed to spawn 'uc23'
>lxc-start: Device or resource busy - failed to remove cgroup
>'/sys/fs/cgroup//lxc/uc23'
>
>After that /sys/fs/cgroup/lxc/uc23 is actually left in place until I restart
>the container (with the default configuration).
>
>As soon as I comment off both lines, the container happily starts anew... :-/
>
>Could it be the hardware is too old ?
>
>I noticed that if I list the contents of /sys/fs/cgroup I cannot find any
>"memory" pseudo-directory.
>
>I made some googling to no avail, alas, and would welcome any pointer...
>
>TIA
>
>phep
>_______________________________________________
>lxc-users mailing list
>lxc-users at lists.linuxcontainers.org
>http://lists.linuxcontainers.org/listinfo/lxc-users
More information about the lxc-users
mailing list