Commit graph

29701 commits

Author SHA1 Message Date
Victor Vieux
59c6eb8c2f Merge pull request #31754 from vieux/bump_17.03.1
bump to 17.03.1-rc1
2017-03-13 23:25:41 -07:00
Victor Vieux
fe47f34b54 bump tp 17.03.1
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:20 -07:00
Misty Stanley-Jones
1313d424eb Fix markdown in references for Kramdown
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
(cherry picked from commit 0ce13eb0d3)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:20 -07:00
Yong Tang
c73e4dedbd Fix issue where service healthcheck is {} in remote API
This fix tries to address the issue raised in 30178 where
service healthcheck is `{}` in remote API will result in
dns resolve failue.

The reason was that when service healthcheck is `{}`,
service binding was not done.

This fix fixes the issue.

An integration test has been added.

This fix fixes 30178.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 8feb5c5a48)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:19 -07:00
Harald Albers
17c6fa06f6 Improve POSIX compatibility of bash completion
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 76f4681b56)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:19 -07:00
Harald Albers
a3fa6aa153 Improve bash completion for docker run --cap-{add,drop}
Docker has several capabilities enabled by default and some not.
It seems natural to follow this distinction in --cap-add and
--cap-drop.

Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 36d8b66cb9)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:19 -07:00
Tonis Tiigi
8953fda3ef overlay2: fix unmounting layer without merge dir
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit e1af6c8a57)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:19 -07:00
Daniel Nephin
bc8f9c8249 Support customizing the default network for a stack.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit b7577dd2ad)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:19 -07:00
yuexiao-wang
a3c0c6d03b 'docker daemon' deprecation message doesn't use the new versioning scheme
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
(cherry picked from commit 5a9cee7bb5)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:19 -07:00
Sebastiaan van Stijn
9ae5dd5413 do not ignore "volume in use" errors when force-delete
When using `docker volume rm -f`, all errors were ignored,
and volumes where Purged, even if they were still in
use by a container.

As a result, repeated calls to `docker volume rm -f`
actually removed the volume.

The `-f` option was implemented to ignore errors
in case a volume was already removed out-of-band
by a volume driver plugin.

This patch changes the remove function to not
ignore "volume in use" errors if `-f` is used.
Other errors are still ignored as before.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9d521a4d2f)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:18 -07:00
John Howard
0017cf150a Windows: Cleanup HCS on restore
Signed-off-by: John Howard <jhoward@microsoft.com>

This ensures that any compute processes in HCS are cleanedup
during daemon restore. Note Windows cannot (currently) reconnect
to containers on restore.

(cherry picked from commit f59593cbd1)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:18 -07:00
allencloud
f99de4e30f move secret into swarm thing in swagger
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit 6918624985)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:18 -07:00
Aleksa Sarai
930606f844 daemon: also ensureDefaultApparmorProfile in exec path
When 567ef8e785 ("daemon: switch to 'ensure' workflow for AppArmor
profiles") was merged, it didn't correctly handle the exec path if
AppArmor profiles were deleted. Fix this by duplicating the
ensureDefaultApparmorProfile code in the exec code.

Fixes: 567ef8e785 ("daemon: switch to 'ensure' workflow for AppArmor profiles")
Signed-off-by: Aleksa Sarai <asarai@suse.de>
(cherry picked from commit 790a81ea9a)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:18 -07:00
Victor Vieux
9c5e221e36 update changelog
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-03-13 21:21:14 -07:00
Victor Vieux
883a34e867 Merge pull request #31807 from aaronlehmann/vendor-swarmkit-1775645
[17.03.x] Vendor swarmkit 1775645
2017-03-13 21:18:39 -07:00
Victor Vieux
9a6c8c999d Merge pull request #31802 from vieux/fix_stats
[17.03.x] Correct CPU usage calculation in presence of offline CPUs and newer Linux #31579
2017-03-13 18:09:29 -07:00
Aaron Lehmann
6a9acf0b94 Vendor swarmkit 1775645
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-03-13 17:42:56 -07:00
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
3c3f3204bf Merge pull request #31742 from aaronlehmann/vendor-swarmkit-f93948c
[17.03.x] Vendor swarmkit f93948c
2017-03-10 14:10:41 -08:00
Aaron Lehmann
a8b51a3296 Vendor swarmkit f93948c
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-03-10 11:08:44 -08:00
Justin Cormack
4bd1b7174c Merge pull request #31662 from mlaventure/17.03-update-containerd
Update containerd to 595e75c212d19a81d2b808a518fe1afc1391dad5
2017-03-10 16:42:37 +00:00
Kenfe-Mickael Laventure
74c52a7bab Update containerd to 595e75c212d19a81d2b808a518fe1afc1391dad5
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-03-09 13:50:28 -08:00
Victor Vieux
e0cff8e193 Merge pull request #31653 from dnephin/fix-compose-bindata
[17.03.x] Fix the generated bindata in the release branch
2017-03-09 13:23:59 -08:00
Victor Vieux
502b068b3c Merge pull request #31692 from thaJeztah/17.03.x-fix-autoremove-on-older-api
[17.03.x] fix autoremove on older api
2017-03-09 12:18:05 -08:00
Victor Vieux
15805a0afb Merge pull request #31666 from mlaventure/17.03-update-runc
[17.03.x] Update runc to 54296cf40ad8143b62dbcaa1d90e520a2136ddfe
2017-03-09 12:17:30 -08:00
Sebastiaan van Stijn
32dbb5c465
Add integration tests for client- and daemon-side auto-remove
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-03-09 12:29:20 +01:00
Sebastiaan van Stijn
19bbb4e9f0
[17.03.x] fix autoremove on pre 1.25 API
Commit 87a53468b2 cherry-picked
changes into the 17.03 branch to make the client
skip auto-removing containers on API 1.25 and up.

Some changes got lost during that cherry-pick,
resulting in 17.03 clients to not fall back to
the old behavior when connecting to API version
1.24 or below.

This patch addresses this issue for the 17.03
branch by copying the `HostConfig.AutoRemove` property
to a local variable before it is overridden
in `ContainerCreate()`.

This change is not needed on "master" (17.04-dev),
which does not have this problem.

Thanks to Josh Hawn for finding this bug.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-03-09 11:59:11 +01:00
Kenfe-Mickael Laventure
030f7b370f Update runc to 54296cf40ad8143b62dbcaa1d90e520a2136ddfe
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-03-08 14:49:32 -08:00
Daniel Nephin
2a60fc01ab Fix the generatd bindata in the release branch.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-08 10:20:23 -05:00
Sebastiaan van Stijn
b2cba289fc Merge pull request #31474 from thaJeztah/docs-cherry-picks
[17.03.x] Docs cherry picks
2017-03-02 13:11:45 +01:00
Sebastiaan van Stijn
de692b1065
Merge pull request #31467 from thaJeztah/remove-jekyll-markers
remove Jekyll tags from CLI reference
(cherry picked from commit 9321a12115)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-03-02 11:03:57 +01:00
Sebastiaan van Stijn
9f55f97a5a
Merge pull request #31398 from pjaffe/patch-1
Remove incorrect duplicate phrase from build.md
(cherry picked from commit fb5ccc6605)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-03-02 11:03:51 +01:00
Brian Goff
ef658fa65e
Merge pull request #31291 from albers/docs-daemon-hosts
Clarify why `hosts` in `daemon.json` does not work
(cherry picked from commit 27c9a6e9c2)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-03-02 11:03:46 +01:00
Vincent Demeester
05b81bc152
Merge pull request #30832 from allencloud/update-swaggeryml-on-cluster-status-code
remove 400 and 404 for get nodes endpoint and add 503 for secret update
(cherry picked from commit e8b92f154d)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-03-02 11:03:39 +01:00
Sebastiaan van Stijn
4b025d0605
Merge pull request #30731 from shin-/plugin_privileges_param_fix
Parameter name in GetPluginPrivileges is "remote"
(cherry picked from commit 8d28fc8fc4)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-03-02 11:03:32 +01:00
Brian Goff
3a232c89e4 Merge pull request #31311 from aaronlehmann/vendor-swarmkit-1f3e4e6
[17.03.x] Vendor swarmkit 1f3e4e6
2017-02-24 09:11:59 -05:00
Aaron Lehmann
bef21471d7 Vendor swarmkit 1f3e4e6
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-02-23 11:07:29 -08:00
Victor Vieux
60ccb2265b bump to version 17.03.0-ce
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-23 02:03:50 -08:00
Victor Vieux
faa90e9378 Merge pull request #31266 from vieux/17.03-cherry
17.03 cherry-picks
2017-02-23 02:02:52 -08:00
Victor Vieux
d9bc94cad2 Merge pull request #31260 from mlaventure/bump-runc-17.03
[17.03] Bump runc to a01dafd48bc1c7cc12bdb01206f9fea7dd6feb70
2017-02-23 01:07:05 -08:00
Kenfe-Mickael Laventure
e285c70dec Bump runc to a01dafd48bc1c7cc12bdb01206f9fea7dd6feb70
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-02-23 01:05:38 -08:00
Aaron Lehmann
ff70cbf5ea Shutdown leaks an error when the container was never started
I found that sometimes tasks would end up in a rejected state when
trying to update them quickly. The problem was that Shutdown could fail
if called before the container was started. Instead of returning an
error in this case, Shutdown should succeed. This allows tasks to
progress to the "shutdown" state as expected.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 37b492ae1b)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-23 00:00:01 -08:00
Victor Vieux
4fa77953f8 update CHANGELOG
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-22 23:59:15 -08:00
Yong Tang
3599289e2c Fix duplicate mount point for --volumes-from in docker run
This fix tries to fix the issue raised in 21845. The issue with 21845
is that if multiple `--volumes-from` with the same destination has been
specified, then one volume will be overridden by the other. This will mess
up with volumes reference and prevent the overridden volume from
being removed at the end.

Issue 21845 was observed with `docker-compose` though it is possible to
emulate the same behavior with `docker` alone:
```
$ cat Dockerfile
FROM busybox
VOLUME ["/tmp/data"]
$ docker build -t vimage .
$ docker run --name=data1 vimage true
$ docker run --name=data2 vimage true
$ docker run --name=app --volumes-from=data1 --volumes-from=data2 -d busybox top
$ docker rm -f -v $(docker ps -aq)
$ docker volume ls
$ docker volume rm ...
```
NOTE: Second case:
```
$ cat Dockerfile
FROM busybox
VOLUME ["/tmp/data"]
$ docker build -t vimage .
$ docker run --name=data1 vimage true
$ docker run --name=data2 vimage true
$ docker run --name=app --volumes-from=data1 --volumes-from=data2 -v /tmp/data:/tmp/data -d busybox top
$ docker rm -f -v $(docker ps -aq)
$ docker volume ls
$ docker volume rm ...
```
NOTE: Third case: Combination of --volumes-from and `HostConfig.Mounts` (API only)

This fix tries to address the issue by return an error if duplicate
mount points was used with `--volumes-from`.

An integration test has been added.

This fix fixes 21845.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 9526e5c6ae)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-22 23:37:49 -08:00
Victor Vieux
49849eda4a Merge pull request #31270 from thaJeztah/17.03-cherry-pick-29076
[17.03] Block obsolete and unusual socket families in the default seccomp profile
2017-02-22 22:56:55 -08:00
Victor Vieux
d06b03a99d Merge pull request #31274 from tonistiigi/update-containerd
[17.03.x] vendor: update containerd to 977c511ed
2017-02-22 19:38:23 -08:00
Victor Vieux
455ebb8892 Merge pull request #31271 from thaJeztah/cherry-pick-changelog-validation
[17.03] Cherry pick changelog validation
2017-02-22 19:38:05 -08:00
Victor Vieux
d77ec85abc Merge pull request #31275 from thaJeztah/17.03-swagger-cherry-picks
17.03 swagger cherry picks
2017-02-22 18:26:57 -08:00
Nalin Dahyabhai
4730409857 Synchronize the cursor returned by followJournal
Make sure that the cursor value returned by followJournal() is the last
of the values returned by its goroutine's calls to drainJournal() by
waiting for it, rather than returning a value that may be superceded by
another if we're singalling the goroutine that it should exit by closing
a pipe.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
(cherry picked from commit d57c330617)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-22 17:51:27 -08:00
Victor Vieux
44aec1b692 add -ce support
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-02-22 17:38:37 -08:00