Commit graph

29157 commits

Author SHA1 Message Date
Michael Crosby
c0ea2c8498 Fix cfs period calculation
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit aff99136b4)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:45:58 -08:00
Stephen J Day
ce22bc39dc api/server/httputils: service unavailable for disable swarm
When swarm-mode is disabled, we need to return an error indicating this.
406 was chosen for the "Not Acceptable" verbiage, but this code has
specific semantics in relation to the `Accept` header, which aren't
applicable here.

We now use a 503 for this case. While it is not a perfect match, it does
make it clear that the particular "service" (read: API endpoint) is not
available. The body of the message provides the user with enough
information to take action on it by enabling swarm-mode and ensuring the
service is available.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
(cherry picked from commit 1d90d76048)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:44:36 -08:00
Yong Tang
3e9dd55695 Use map[string]bool for preProcessor to ignore unknwon field
This fix is an attempt to address the issue raised in 28339. In
`docker ps`, the formatter needs to expose all fields of `types.Container`
to `preProcessor` so that template could be executed.

This direct exposing is unreliable and could cause issues as user may incorrectly
assume all fields in `types.Container` will be available for templating.

However, the purpose of `preProcessor` is to only find out if `.Size`
is defined (so that opts.size could be set accordingly).

This fix defines `preProcessor` as `map[string]bool` with a func `Size()`.
In this way, any unknown fields will be ignored.

This fix adds several test cases to the existing `TestBuildContainerListOptions`.

This fix fixes 28339.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 312cc7eebd)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:42:21 -08:00
Boaz Shuster
19d2e68fb8 Change the docker-tag usage text to be clearer
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
(cherry picked from commit 039aca05c2)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:41:48 -08:00
John Howard
530b7cb4a0 Windows: Allow user in builder
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit a3c4ab9b65)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:41:13 -08:00
Nishant Totla
902774c871 Refactoring code for pinning image by digest
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
(cherry picked from commit dc1b6341b9)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:40:13 -08:00
Nishant Totla
1af49192e4 Updating docker/distribution vendoring
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
(cherry picked from commit d910781c66)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:40:06 -08:00
Andrea Luzzardi
0be7359265 1.13.x: Re-vendor swarmkit to a2080913b9cf2cac309845a28902896d65d3f527
Includes:
- https://github.com/docker/swarmkit/pull/1749
- https://github.com/docker/swarmkit/pull/1753
- https://github.com/docker/swarmkit/pull/1760
- https://github.com/docker/swarmkit/pull/1762
- https://github.com/docker/swarmkit/pull/1764
- https://github.com/docker/swarmkit/pull/1765

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2016-11-18 13:39:53 -08:00
Yong Tang
e013d7c543 Fix error messages for --cpus from daemon
This fix fixes error messages for `--cpus` from daemon.

When `docker run` takes `--cpus`, it will translate into NanoCPUs
and pass the value to daemon. The `NanoCPU` is not visible to the user.
The error message generated from daemon used 'NanoCPU' which may cause
some confusion to the user.

This fix fixes this issue by returning the error in CPUs instead.

This fix fixes 28456.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit d22ac2f3a0)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:38:21 -08:00
Tonis Tiigi
5e7e260bac Fix deadlock on cancelling healthcheck
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 89b1234737)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:37:44 -08:00
Vincent Demeester
20dd2d1e4e Update images cli reference with reference filter
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit a0d7b34d9c)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:37:07 -08:00
John Howard
3d43caf6f6 Windows: Revert 27884
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 7e03ce3f13)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:36:37 -08:00
Anusha Ragunathan
3f6e6b3f2d Cleanup after plugin install.
During error cases, we dont cleanup correctly. This commit takes care
of removing the plugin, if there are errors after the pull passed. It
also shuts down the plugin, if there are errors after the plugin in the
enable path.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit 1144f8f1d4)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:36:09 -08:00
Aaron Lehmann
48c2da3cd5 api: Remove omitempty tag on Parallelism
It doesn't make sense to use omitempty here. 0 is a meaningful value and
it's different from the default. If someone sets Parallelism to 0, we
want to show that Parallelism is 0, not hide the field.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit d8b8b12994)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:35:33 -08:00
Yong Tang
7ef4feaf38 Fix crash caused by docker service inspect --pretty
This fix tries to fix the crash caused by `docker service inspect --pretty`,
by performing necessary nil pointer check.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit b6857e91c1)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:34:35 -08:00
Stephen J Day
8b9b8bd930 api/server/httputils: ensure consistent status code
Error code resolution is powered by string matching. Not the greatest
thing in the world and I hope no one is proud of this code, but it
works. However, because a map is used, the iteration order of the map is
random, such that if an error matches two of the snippets, it may return
a different error code depending on the seed of the hashmap. This change
converts it to use a slice instead.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
(cherry picked from commit 3484e02590)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:34:05 -08:00
allencloud
cd587419d0 judge manager before unlocking
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 972a246c67)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:33:07 -08:00
Brian Goff
10ce88227d Reduce spew data dumped
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 4130eb24e9)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:32:26 -08:00
Tom Wilkie
9f3c9209d0 s/bCap/bLen/
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
(cherry picked from commit 3a05545851)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:31:39 -08:00
Tom Wilkie
f02e4e1900 Fix use of cap in MultiReadSeeker
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
(cherry picked from commit 158bb9bbd5)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:31:33 -08:00
Victor Vieux
411e0bdc8e refactor help func in CLI
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
(cherry picked from commit bf95472105)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:30:44 -08:00
Vincent Demeester
51dc584445 Update Tini to fix photon build-rpm compilation errors
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-11-18 13:29:20 -08:00
Akshay Karle
78fe91c31c fix a typo
Signed-off-by: Akshay Karle <akshay.a.karle@gmail.com>
2016-11-18 13:28:11 -08:00
allencloud
0b8f8876b9 fix typo
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 1f039a66ac)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:27:01 -08:00
Justin Cormack
c125c131d7 Fix check config script on 4.8 kernels
DEVPTS_MULTIPLE_INSTANCES is no longer an option, it is always set, so
do not check for this post 4.8.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
(cherry picked from commit 228ee16df3)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:26:03 -08:00
Felipe Oliveira
0a9521d321 fix infinite recursion
Signed-off-by: Felipe Oliveira <felipeweb.programador@gmail.com>
(cherry picked from commit 271b1f2756)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-18 13:25:29 -08:00
Aaron Lehmann
88a45c4a1b Merge pull request #28525 from aluzzardi/swarmkit-revendor
1.13.x: Re-vendor SwarmKit to 577d6bf89a474d3f459804efc5f160ba9fff2b5d
2016-11-17 11:08:33 -08:00
Sebastiaan van Stijn
22f0055e18 Merge pull request #28433 from thaJeztah/docker-1.13-changelog-updates
Docker 1.13 changelog updates
2016-11-17 10:01:50 +01:00
Andrea Luzzardi
73bf1ec999 1.13.x: Re-vendor SwarmKit to 577d6bf89a474d3f459804efc5f160ba9fff2b5d
Includes https://github.com/docker/swarmkit/pull/1746

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2016-11-16 18:10:07 -08:00
Tonis Tiigi
0269ac0494 Skip cli initialization for daemon command
Cli initialization pings back to remote API and
creates a deadlock if socket is already being
listened by systemd.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-11-16 17:10:48 -08:00
Victor Vieux
f2eeaed8a3 explicitly show plugins as unsupported on !linux
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-16 17:10:40 -08:00
Noah Treuhaft
43f1682cef Disable v1 protocol for the default registry
All images in the default registry (AKA docker.io, index.docker.io, and
registry-1.docker.io) are available via the v2 protocol, so there's no
reason to use the v1 protocol.  Disabling it prevents useless fallbacks.

Signed-off-by: Noah Treuhaft <noah.treuhaft@docker.com>
2016-11-16 17:10:33 -08:00
Riyaz Faizullabhoy
94c4cfc209 Edits to plugin docs after building authz plugin
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
2016-11-16 17:10:24 -08:00
Sebastiaan van Stijn
dc71b1425e Changelog updates
This adds some missing entries to the changelog,
and some smal fixes / inconsistencies.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-11-17 01:42:56 +01:00
Vincent Demeester
a51fe6b056 Update stats cli reference documentation
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-11-16 11:11:52 -08:00
Steve Durrheimer
1841986d17 Add zsh completion for 'docker system df'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2016-11-16 11:11:45 -08:00
Yanqiang Miao
0d815d9bb7 Remove redundant 'if' statement
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

update

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2016-11-16 11:11:39 -08:00
Brian Goff
3b93497fdb Don't validate platform-dep tmpfs opts on client
Daemon still does validation and errors out on incorrect options.

Fixes an issue where non-Linux clients attempting to pass tmpfs options
on `docker run` to a Linux daemon will incorrectly error out.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-11-16 11:11:32 -08:00
Victor Vieux
44bb0bb7f2 update tini to a87614212b3a51a9cad57ff7989103a841546745
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-16 11:11:22 -08:00
Yong Tang
896e4f2d75 Fix missing versions in example requests of api docs
It is not required to have version prefix for all the remote
APIs. Though there are still quite a few example requests
in api docs that does not have the version prefix.

This fix update the remote api docs to address this issue.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-16 11:07:38 -08:00
Yong Tang
7154093e59 Update docs for docker info for most recent changes.
This fix updates docs for `docker info` for most recent changes.
It also made several chagnes:
1. Replace 0.12.0-dev to 0.13.0 for api docs v1.24.
2. Replace 0.13.0-dev to 0.13.0 for api docs v1.25

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-16 11:06:12 -08:00
John Howard
dbf1900e8c Windows: Use sequential file access
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-16 11:05:23 -08:00
allencloud
d1b1dea80f allow node update api receive node name and id prefix
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-11-16 10:59:21 -08:00
Victor Vieux
2dfa08bc50 Merge pull request #28408 from vieux/1.13.0-rc2-cherrypicks
1.13.0 rc2 cherrypicks
2016-11-16 10:50:34 -08:00
Tõnis Tiigi
f5afe63eb6 Merge pull request #28463 from aluzzardi/swarmkit-revendor
1.13.x: Revendor swarmkit to 3076318ec0327e22c837c2bfdfacea08124dc755
2016-11-15 21:41:12 -08:00
Andrea Luzzardi
7a457451f6 Revendor swarmkit to 3076318ec0327e22c837c2bfdfacea08124dc755
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2016-11-15 19:04:09 -08:00
Sebastiaan van Stijn
5c69e4fa94 Revert reference docs for ambient capabilities
This feature was reverted for docker 1.13
in c5251f7116,
so removing the documentation as well.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-11-15 13:59:39 -08:00
Jonathan Boulle
c102ab8711 man/docker: wrap lines consistently
Quite a few changes, as it seems like previous wrapping was done
manually, so it's all over the place.

As noted in #28424

Signed-off-by: Jonathan Boulle <jonathanboulle@gmail.com>
2016-11-15 13:58:43 -08:00
Jonathan Boulle
44b5bcd744 man page: consistent indents for flag descriptions
Signed-off-by: Jonathan Boulle <jonathanboulle@gmail.com>
2016-11-15 13:57:57 -08:00
yuexiao-wang
0f254ab8b9 Remove inexistent link and add related links
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-11-15 13:57:10 -08:00