Commit graph

59 commits

Author SHA1 Message Date
Ian Campbell
9b001c4f5f Correct CPU usage calculation in presence of offline CPUs and newer Linux
In https://github.com/torvalds/linux/commit/5ca3726 (released in v4.7-rc1) the
content of the `cpuacct.usage_percpu` file in sysfs was changed to include both
online and offline cpus. This broke the arithmetic in the stats helpers used by
`docker stats`, since it was using the length of the PerCPUUsage array as a
proxy for the number of online CPUs.

Add current number of online CPUs to types.StatsJSON and use it in the
calculation.

Keep a fallback to `len(v.CPUStats.CPUUsage.PercpuUsage)` so this code
continues to work when talking to an older daemon. An old client talking to a
new daemon will ignore the new field and behave as before.

Fixes #28941.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
(cherry picked from commit 115f91d757)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 16:16:05 -07:00
Victor Vieux
fc0b5dbedb bump api version to 1.26
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-07 16:42:41 -08:00
John Howard
f811d5b128 Windows: Require REST 1.25 or later
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-31 14:33:59 -07:00
Daniel Nephin
f06d8d6db9 Generate api/types:Port from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-20 13:24:23 -07:00
Michael Crosby
91e197d614 Add engine-api types to docker
This moves the types for the `engine-api` repo to the existing types
package.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-09-07 11:05:58 -07:00
Derek McGowan
9836162446 Atomically save libtrust key file
The libtrust keyfile which is used to set the "ID" property of a daemon must be generated or loaded on every startup.
If the process crashes during startup this could cause the file to be incomplete causing future startup errors.
Ensure that the file is written atomically to ensure the file is never in an incomplete state.

Fixes #23985

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-06-27 15:54:39 -07:00
Tibor Vass
04292192e0 Bump API Version to v1.25
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-06-14 20:03:50 -07:00
Vincent Demeester
7534f17261
Update code for latest engine-api
- Update CopyToContainer uses
- Use engine-api/types/versions instead of pkg/version

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-04-19 16:56:54 +02:00
Tibor Vass
928ea1e957 Bump API Version to v1.24
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-03-23 12:26:23 -04:00
Vincent Demeester
312f5e435b Move getContext… function to builder package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-02-11 20:59:59 +01:00
Tibor Vass
a0fab35fe8 Bump API Version to v1.23
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-01-15 10:44:02 -05:00
David Calavera
907407d0b2 Modify import paths to point to the new engine-api package.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-01-06 19:48:59 -05:00
Doug Davis
e6806223e8 Use constant instead of "scratch"
Move NoBaseImageSpecifier to a common spot and then use it instead of
"scratch" in a couple of places.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-12-31 06:21:56 -08:00
Doug Davis
6287ec9095 Add a DOCKER_API_VERSION env var
Closes: #11486

Just for @ahmetalpbalkan  :-)

Fixed some comment formatting too while in there.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-12-14 12:45:34 -08:00
Justas Brazauskas
927b334ebf Fix typos found across repository
Signed-off-by: Justas Brazauskas <brazauskasjustas@gmail.com>
2015-12-13 18:04:12 +02:00
Garrett Barboza
c4c6d33bbc Change sorting method and add test to DisplayablePorts
Signed-off-by: Garrett Barboza <garrett@garrettbarboza.com>
2015-10-19 10:38:54 -05:00
Tibor Vass
22a0ea5550 Bump API Version to v1.22
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-10-13 17:27:33 -07:00
Alexander Morozov
01112989b7 Fix some style issues
Just read code and saw inconsistencies in variable decls and stuff.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-10-02 13:39:33 -07:00
root
cfeab585c0 fix golint errors/warnings of pkg api/
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2015-07-30 09:46:25 +08:00
David Calavera
0eb88a0751 Bump api version to 1.21.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-07-27 09:48:47 -07:00
Antonio Murdaca
910322a893 Error out if client API version is too old
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-06-18 11:03:07 +02:00
Jessica Frazelle
e76d0f5571 bump api version to 1.20
Signed-off-by: Jessica Frazelle <princess@docker.com>
2015-05-28 15:32:05 -07:00
jhowardmsft
86d1223a29 Windows: mkdirall volume path aware
Signed-off-by: jhowardmsft <jhoward@microsoft.com>
2015-04-30 11:59:42 -07:00
Antonio Murdaca
844538142d Small if err cleaning
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-27 21:50:33 +02:00
Antonio Murdaca
4b9fe9c298 Remove job from container_inspect
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-23 00:58:13 +02:00
Doug Davis
1bfa80bdd9 Remove Job from PS API
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-08 10:30:17 -07:00
Doug Davis
065648a832 Last step in removing engine.Tabel from api/client/*
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-04-06 10:55:53 -07:00
Alexander Morozov
81f9b72c64 Bump API version and docs to v1.19
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-01 13:40:56 -07:00
Antonio Murdaca
6f4d847046 Replace aliased imports of logrus, fixes #11762
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-26 23:22:04 +01:00
Avi Das
c136591f40 Add comments to api/common constants, closes #11583
Signed-off-by: Avi Das <andas222@gmail.com>
2015-03-23 22:35:41 -05:00
Michal Minar
210ab030bc Format error by value
- Use `%v` verb to format errors.
- Give `param` constant in portallocator some better name.

Signed-off-by: Michal Minar <miminar@redhat.com>
2015-03-16 12:05:53 +01:00
Jessica Frazelle
ba99a73c2f fix naming, add a test for port range on docker ps
Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
2015-02-16 11:08:32 -08:00
Colm Hally
5dfef4fe08 Group published and exposed ports by contiguous ranges
Signed-off-by: Colm Hally <colmhally@gmail.com>
2015-02-16 10:52:23 -08:00
Alexander Morozov
d92b4232f7 Bump api version to 1.18
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-10 10:48:54 -08:00
Michael Crosby
e15300b251 Merge pull request #10360 from dmcgowan/keyfile-error-message
Add file path to errors loading the key file
2015-01-26 14:44:07 -08:00
Derek McGowan
a90e91b500 Add file path to errors loading the key file
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-26 12:58:45 -08:00
Derek McGowan
2cd5b7dae8 Use filepath instead of path
Currently loading the trust key uses path instead of filepath. This creates problems on some operating systems such as Windows.

Fixes #10319

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2015-01-23 14:44:30 -08:00
Victor Vieux
9c7689a10e bump API version
Signed-off-by: Victor Vieux <vieux@docker.com>
2015-01-22 01:15:34 +00:00
Doug Davis
eb3ea3b43c Allow for Dockerfile to be named something else.
Add a check to make sure Dockerfile is in the build context
Add docs and a testcase
Make -f relative to current dir, not build context

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-01-06 16:33:26 -08:00
Jessica Frazelle
7c7026bd22 Be consistent about libtrust import path.
Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-12-03 17:36:14 -08:00
Victor Vieux
6e92dfdfd8 Update libtrust version
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-11-20 17:39:54 +00:00
Victor Vieux
9a85f60c75 add ID and Hostname in docker info
Signed-off-by: Victor Vieux <vieux@docker.com>
2014-11-17 19:23:41 +00:00
Alexandr Morozov
7c62cee51e Use logrus everywhere for logging
Fixed #8761

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
2014-10-24 15:03:06 -07:00
Andrea Luzzardi
ca6cc65609 Bump API to v1.16.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2014-10-24 11:25:44 -07:00
Alexandr Morozov
e261618b24
Bump docs and api to 1.15
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-08-26 13:08:50 +04:00
Josiah Kiehl
a02f67be5b Extract log utils into pkg/log
Docker-DCO-1.1-Signed-off-by: Josiah Kiehl <josiah@capoferro.net> (github: capoferro)
2014-08-13 15:18:15 -07:00
Erik Hollensbe
4398108433 Move parsing functions to pkg/parsers and the specific kernel handling
functions to pkg/parsers/kernel, and parsing filters to
pkg/parsers/filter. Adjust imports and package references.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
2014-07-29 13:09:10 -07:00
Victor Vieux
b3ee9ac74e update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-24 22:19:50 +00:00
Adrien Folie
680e27d6ec bump api to 1.14 & update docs
Docker-DCO-1.1-Signed-off-by: Adrien Folie <folie.adrien@gmail.com> (github: folieadrien)
2014-07-10 03:24:01 +02:00
Eric Windisch
17d870bed5 Pause/freeze containers during commit
Initiates a pause before committing a container,
adds a pause option to the commit command, defaulting to 'true'.

Fixes bug: #6267
Fixes bug: #3675

Docker-DCO-1.1-Signed-off-by: Eric Windisch <ewindisch@docker.com> (github: ewindisch)
2014-07-01 00:30:21 +00:00