-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Description
Description of problem:
Docker 1.7.0-rc1 fails to create containers with CpuShare outside the kernel allowable range.
Previous versions of Docker allowed container creation below the minimum or above the maximum and the kernel would silently adjust to be within the range (i.e. CpuShare of 1 would become 2 and CpuShare greater than 262144 would become 262144). In this commit libcontainer was changed to return errors rather than silently proceeding. This change in behavior affects all versions of the Docker Remote API, and is effectively breaking for clients who strongly tie to a specific API version.
docker version
:
Client version: 1.7.0-rc1
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 395cced
OS/Arch (client): linux/amd64
Server version: 1.7.0-rc1
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 395cced
OS/Arch (server): linux/amd64
docker info
:
Containers: 12
Images: 31
Storage Driver: devicemapper
Pool Name: docker-202:1-131298-pool
Pool Blocksize: 65.54 kB
Backing Filesystem: extfs
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 1.015 GB
Data Space Total: 107.4 GB
Data Space Available: 28.9 GB
Metadata Space Used: 2.413 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.145 GB
Udev Sync Supported: true
Deferred Removal Enabled: false
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.89-RHEL6 (2014-09-01)
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.14.35-28.38.amzn1.x86_64
Operating System: Amazon Linux AMI 2015.03
CPUs: 1
Total Memory: 996.3 MiB
Name: ip-172-31-18-169
ID: XRH7:FJA6:63ZN:AWVH:OMXN:NAV3:TRUX:5JIG:ZRTY:V5OG:GOIC:MII7
uname -a
:
Linux ip-172-31-18-169 3.14.35-28.38.amzn1.x86_64 #1 SMP Wed Mar 11 22:50:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Environment details (AWS, VirtualBox, physical, etc.): AWS
How reproducible:
Reproduceable everywhere I tested, including an EC2 instance running the Amazon Linux AMI and on a VM on my desktop running Ubuntu.
Steps to Reproduce:
- Start the Docker 1.7.0-rc1 daemon
- Attempt to create a container with CpuShare below the minimum with a 1.19
client and watch it fail:sudo ./docker-1.7.0-rc1 run -c 1 busybox
- Attempt to create a container with CpuShare below the minimum with an older
client and watch it fail:sudo docker run -c 1 busybox
Actual Results:
Container fails to run with both a 1.19 client and a client speaking an older
API
Expected Results:
Container fails to run with a >1.19 client but succeeds with a client speaking
an older API
Additional info: