Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Docker lxc-start "cgroup is not mounted"
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
feystorm
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jan 2004
Posts: 95

PostPosted: Thu Feb 13, 2014 4:45 am    Post subject: [solved] Docker lxc-start "cgroup is not mounted" Reply with quote

New to docker, and trying to play with it on my system, but am unable to launch a single container.

What's even more interesting is that after failing to launch a container, I'm no longer able to open any terminal windows. Something goes wrong with /dev/pts and I have to reboot to recover.

Code:

# docker run -i -t ubuntu:12.04 /bin/bash
lxc-start: cgroup is not mounted
lxc-start: failed to setup the cgroups for '5359ebff9cd7d7d52fe128159ae685816d29334ef0f8edbd1744b6bf3a93c23d'
lxc-start: failed to setup the container
lxc-start: invalid sequence number 1. expected 2
lxc-start: failed to spawn '5359ebff9cd7d7d52fe128159ae685816d29334ef0f8edbd1744b6bf3a93c23d'
lxc-start: Device or resource busy - failed to remove cgroup '/sys/fs/cgroup/cpuset//lxc/5359ebff9cd7d7d52fe128159ae685816d29334ef0f8edbd1744b6bf3a93c23d'
[error] commands.go:2530 Error getting size: bad file descriptor


So, it complains about cgroup not being mounted, but it is:
Code:

# mount|grep cgroup
cgroup_root on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755)
openrc on /sys/fs/cgroup/openrc type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc)
cpuset on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cpu on /sys/fs/cgroup/cpu type cgroup (rw,nosuid,nodev,noexec,relatime,cpu)
cpuacct on /sys/fs/cgroup/cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct)
memory on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
freezer on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)




Docker daemon log:
Code:

[debug] api.go:933 Calling POST /containers/create
2014/02/12 23:33:35 POST /v1.9/containers/create
[/var/lib/docker|1e63ae9c] +job create()
[/var/lib/docker|1e63ae9c] -job create() = OK (0)
[debug] api.go:933 Calling POST /containers/{name:.*}/attach
2014/02/12 23:33:36 POST /v1.9/containers/94bc9494c98659dfc9b2268dc95c1e8e41a268a656f9737d9826a24f62396acf/attach?stderr=1&stdin=1&stdout=1&stream=1
[/var/lib/docker|1e63ae9c] +job inspect(94bc9494c98659dfc9b2268dc95c1e8e41a268a656f9737d9826a24f62396acf, container)
[/var/lib/docker|1e63ae9c] -job inspect(94bc9494c98659dfc9b2268dc95c1e8e41a268a656f9737d9826a24f62396acf, container) = OK (0)
[/var/lib/docker|1e63ae9c] +job attach(94bc9494c98659dfc9b2268dc95c1e8e41a268a656f9737d9826a24f62396acf)
[debug] container.go:421 attach: stdin: begin
[debug] container.go:458 attach: stdout: begin
[debug] container.go:496 attach: stderr: begin
[debug] container.go:542 attach: waiting for job 1/3
[debug] api.go:933 Calling POST /containers/{name:.*}/start
2014/02/12 23:33:36 POST /v1.9/containers/94bc9494c98659dfc9b2268dc95c1e8e41a268a656f9737d9826a24f62396acf/start
[/var/lib/docker|1e63ae9c] +job start(94bc9494c98659dfc9b2268dc95c1e8e41a268a656f9737d9826a24f62396acf)
[/var/lib/docker|1e63ae9c] +job allocate_interface(94bc9494c98659dfc9b2268dc95c1e8e41a268a656f9737d9826a24f62396acf)
[/var/lib/docker|1e63ae9c] -job allocate_interface(94bc9494c98659dfc9b2268dc95c1e8e41a268a656f9737d9826a24f62396acf) = OK (0)
[debug] container.go:373 startPty: begin of stdout pipe
[debug] container.go:384 startPty: begin of stdin pipe
[/var/lib/docker|1e63ae9c] +job release_interface(94bc9494c98659dfc9b2268dc95c1e8e41a268a656f9737d9826a24f62396acf)
[/var/lib/docker|1e63ae9c] -job release_interface(94bc9494c98659dfc9b2268dc95c1e8e41a268a656f9737d9826a24f62396acf) = OK (0)
[/var/lib/docker|1e63ae9c] -job start(94bc9494c98659dfc9b2268dc95c1e8e41a268a656f9737d9826a24f62396acf) = OK (0)
[debug] container.go:386 startPty: end of stdin pipe
[debug] container.go:475 attach: stdout: end
[debug] container.go:513 attach: stderr: end
[debug] container.go:547 attach: job 1 completed successfully
[debug] container.go:542 attach: waiting for job 2/3
[debug] container.go:547 attach: job 2 completed successfully
[debug] container.go:542 attach: waiting for job 3/3
[debug] server.go:2234 Closing buffered stdin pipe
[debug] container.go:448 attach: stdin: end
[debug] container.go:547 attach: job 3 completed successfully
[debug] container.go:549 attach: all jobs completed successfully
[/var/lib/docker|1e63ae9c] -job attach(94bc9494c98659dfc9b2268dc95c1e8e41a268a656f9737d9826a24f62396acf) = OK (0)
[debug] container.go:375 startPty: end of stdout pipe
[debug] api.go:933 Calling GET /containers/{name:.*}/json
2014/02/12 23:33:37 GET /v1.9/containers/94bc9494c98659dfc9b2268dc95c1e8e41a268a656f9737d9826a24f62396acf/json
[/var/lib/docker|1e63ae9c] +job inspect(94bc9494c98659dfc9b2268dc95c1e8e41a268a656f9737d9826a24f62396acf, container)
[/var/lib/docker|1e63ae9c] -job inspect(94bc9494c98659dfc9b2268dc95c1e8e41a268a656f9737d9826a24f62396acf, container) = OK (0)



This is the line from strace of urxvt that causes it to fail.
Code:

23:36:20 chown("/dev/pts/6", 1000, 5)   = -1 EPERM (Operation not permitted)


---

Software versions:

kernel 3.10.17-gentoo
docker-0.8.0
lxc-0.8.0-r1


---

Anyone with bright ideas?


Last edited by feystorm on Sat Feb 15, 2014 7:59 am; edited 1 time in total
Back to top
View user's profile Send private message
feystorm
Tux's lil' helper
Tux's lil' helper


Joined: 29 Jan 2004
Posts: 95

PostPosted: Sat Feb 15, 2014 7:58 am    Post subject: Reply with quote

Figured it out. It was actually a combination of things.

The first was some cgroup options missing in the kernel config. I'm not sure which of these solved it, but I turned them both on and the error message went away

Code:

CONFIG_CGROUP_DEVICE=y
CONFIG_BLK_CGROUP=y


But after that error wen't away, I got a new one. This one was about not being able to launch multiple instances of dev/pts.
Code:

CONFIG_DEVPTS_MULTIPLE_INSTANCES=y

I could have sworn I had this turned on, but it appears I didn't. After enabling it, the error went away, and it solved the issue with not being able to open any terminal windows.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum