Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker --lxc-conf cpuset does not work #4667

Closed
RomanChebotarev opened this issue Mar 14, 2014 · 6 comments
Closed

Docker --lxc-conf cpuset does not work #4667

RomanChebotarev opened this issue Mar 14, 2014 · 6 comments

Comments

@RomanChebotarev
Copy link

@RomanChebotarev RomanChebotarev commented Mar 14, 2014

Hi! I use Docker 0.9.0 (Ubuntu package.). When I try to run container with cgroups subsystem cpuset, i get next error:

$ docker run -c 1000  --lxc-conf="lxc.cgroup.cpuset.cpus = 0" \ 
-i -t ubuntu /bin/bash
2014/03/14 16:05:59 Error: Cannot start container ***<container-hash-id>*** : 
lxc.cgroup.cpuset.cpus = 0 is not supported by the native driver
Docker & system information
  • Linux vanilla kernel 3.13.3, with CGroups and Linux namespace support.

Docker running with arguments:

/usr/bin/docker -d -p /var/run/docker.pid --dns 10.7.7.7 --graph=/home/docker
$ docker version
Client version: 0.9.0
Go version (client): go1.2.1
Git commit (client): 2b3fdf2
Server version: 0.9.0
Git commit (server): 2b3fdf2
Go version (server): go1.2.1
Last stable version: 0.9.0
$ docker info
Containers: 31
Images: 44
Driver: devicemapper
 Pool Name: docker-8:6-15073286-pool
 Data file: /home/docker/devicemapper/devicemapper/data
 Metadata file: /home/docker/devicemapper/devicemapper/metadata
 Data Space Used: 3057.8 Mb
 Data Space Total: 102400.0 Mb
 Metadata Space Used: 5.1 Mb
 Metadata Space Total: 2048.0 Mb
WARNING: No memory limit support # Why? My kernel support it!
WARNING: No swap limit support # Why? My kernel support it!
$ cat /etc/lsb-release-crunchbang 
DISTRIB_ID=CrunchBang
DISTRIB_RELEASE=11
DISTRIB_CODENAME=waldorf
DISTRIB_DESCRIPTION="CrunchBang 11 waldorf"
$ cat /etc/debian_version 
7.4

Last log lines when i starting container:

Cannot start container 4b3be96c5253ea67888fc0fa4fcd7b9392c68cc090169c6df3d33c5dbd55f10c: lxc.cgroup.cpuset.cpus = 0-3 is not supported by the native driver
[/home/docker|746b595f] -job start(4b3be96c5253ea67888fc0fa4fcd7b9392c68cc090169c6df3d33c5dbd55f10c) = ERR (1)
[error] server.go:951 Error: Cannot start container 4b3be96c5253ea67888fc0fa4fcd7b9392c68cc090169c6df3d33c5dbd55f10c: lxc.cgroup.cpuset.cpus = 0-3 is not supported by the native driver
[error] server.go:86 HTTP Error: statusCode=500 Cannot start container 4b3be96c5253ea67888fc0fa4fcd7b9392c68cc090169c6df3d33c5dbd55f10c: lxc.cgroup.cpuset.cpus = 0-3 is not supported by the native driver
@tianon
Copy link
Member

@tianon tianon commented Mar 14, 2014

For enabling memory and swap accounting, see http://docs.docker.io/en/latest/installation/ubuntulinux/#memory-and-swap-accounting

The reason you can't use --lxc-conf by default is that LXC is no longer the default execution engine. If you must use --lxc-conf, you'll have to switch to the LXC execution driver by specifying -e lxc as part of DOCKER_OPTS in "/etc/default/docker".

@RomanChebotarev
Copy link
Author

@RomanChebotarev RomanChebotarev commented Mar 14, 2014

For enabling memory and swap accounting, see http://docs.docker.io/en/latest/installation/ubuntulinux/#memory-and-swap-accounting

This is important for Linux Kernels from Debian/Ubuntu repository. But I use vanilla kernel 3.13.3 from kernel.org and cgroup_enable=memory is not important for me. (At present my kernel was loaded without swapaccount=1, because my system not using swap, but I would check your advice and try to load the kernel with the swapaccount=1)

If you must use --lxc-conf, you'll have to switch to the LXC execution driver by specifying -e lxc

Thank, this solve my problem! But, how I can use all cgroups features (eg: cpu.cfs_period_us & cpu.cfs_quota_us; cpuset.cpus; memory.limit) over native Docker driver?

@RomanChebotarev
Copy link
Author

@RomanChebotarev RomanChebotarev commented Mar 14, 2014

Hmm... I don't know what happen, but now docker info not show warnings about memory accounting and memory accounting work without system reboot and any other changes in my kernel.

(Question about using native Docker driver for access to all cgroups features is still actual for me)

@RomanChebotarev
Copy link
Author

@RomanChebotarev RomanChebotarev commented Mar 17, 2014

Bump! :-)

@creack
Copy link
Contributor

@creack creack commented Mar 17, 2014

@RomanChebotarev This will come in the future. It is not yet possible.
Closing for now.

@creack creack closed this Mar 17, 2014
@RomanChebotarev
Copy link
Author

@RomanChebotarev RomanChebotarev commented Mar 17, 2014

@creack thanks for response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.