Commit graph

29517 commits

Author SHA1 Message Date
Tõnis Tiigi
fc82c4b391 Merge pull request #30044 from tonistiigi/update-runc-113
[v1.13] vendor: update runc to 2f7393a4
2017-01-11 08:37:36 -08:00
Madhu Venugopal
e0c07ab799 Merge pull request #30042 from aaronlehmann/vendor-swarmkit-296fcfc
[1.13] Update vendored swarmkit to 296fcfc
2017-01-10 20:59:14 -08:00
Tonis Tiigi
acbad31dcd vendor: update runc to 2f7393a4
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-01-10 18:07:20 -08:00
Victor Vieux
7e792d6ca9 Merge pull request #30012 from tiborvass/plugin-devices-redone
[1.13] Plugins: Rename DeviceCreation to AllowAllDevices
2017-01-10 17:28:14 -08:00
Madhu Venugopal
c8083e8735 Modify network plugin test for swarm-mode
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2017-01-10 16:38:24 -08:00
Aaron Lehmann
18fd3885c6 Update vendored swarmkit to 296fcfc
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-01-10 16:07:45 -08:00
Tibor Vass
83b2782ea9 plugins: rename DeviceCreation to AllowAllDevices
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit f265727bdf)
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-01-10 15:21:46 -08:00
Alexander Morozov
ece7e8ba27 Merge pull request #30034 from aaronlehmann/vendor-swarmkit-70cb786
[1.13] Update vendored swarmkit to 70cb786
2017-01-10 15:19:17 -08:00
Tonis Tiigi
4b2b0eb608 Add workaround for possible SetClusterProvider deadlock
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-01-10 15:14:26 -08:00
Aaron Lehmann
3fc1510dff [1.13] Update vendored swarmkit to 70cb786
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-01-10 12:55:35 -08:00
Vincent Demeester
340f288211 Merge pull request #29962 from vieux/1.13.0-rc6-cherrypicks
1.13.0 rc6 cherrypicks
2017-01-10 10:09:04 +01:00
Victor Vieux
0b2a029e56 Merge pull request #30009 from thaJeztah/revert-27146
[1.13.x] Revert "Require continuation char to be last char in a line"
2017-01-09 17:45:17 -08:00
Brian Goff
b7f412ef44 Merge pull request #29958 from cpuguy83/1.13_fix_selinux_packaging
[1.13] Fix conflicts with newly updated selinux policies
2017-01-09 20:15:51 -05:00
Sebastiaan van Stijn
57c17882a3
Revert "Require continuation char to be last char in a line"
This reverts commit 105bc63295,
which (although correct), resulted in a backward incompatible
change.

We can re-implement this in future, after this changes
goes through a deprecation cycle

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-01-10 00:36:40 +01:00
Victor Vieux
25879cfa54 Merge pull request #29994 from vdemeester/29974-fix-external-network
[1.13.x] Few stack deploy network fixes
2017-01-09 14:40:54 -08:00
Victor Vieux
6c2fdb64d1 Merge pull request #30004 from dnephin/fix-1.13-stack-deploy-resources
[1.13] Fix parsing resources from compose file for stack deploy
2017-01-09 14:40:30 -08:00
Victor Vieux
3fc150171f Merge pull request #30007 from aaronlehmann/vendor-swarmkit-8ea08a3
[1.13] Update vendored swarmkit to 8ea08a3
2017-01-09 14:39:57 -08:00
Victor Vieux
53ac375422 Merge pull request #29905 from coolljt0725/cherry-pick-29721
1.13.x cherry-pick: Cherry pick 29721
2017-01-09 14:22:23 -08:00
Aaron Lehmann
831eeb38f1 [1.13] Update vendored swarmkit to 8ea08a3
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-01-09 11:45:04 -08:00
Daniel Nephin
f27a297595 Fix parsing resources from compose file for stack deploy.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-09 14:15:32 -05:00
Sebastiaan van Stijn
46af2edec2 un-fork go-memdb
commit 9322636c89
temporarily switched to a fork of go-memdb, because
a pull request that was needed was not yet merged
upstream.

this pull request was merged, so we can un-fork
this dependency.

this change does not bump the dependency, and
only un-forks. bumping the dependency should
be done in a separate change, if needed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 5f057f6350)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-09 06:37:40 -08:00
Aaron Lehmann
f2260228a7 vendor: Unfork logrus dependency
Vendor the latest official logrus release instead of a custom fork
(which now happens to be identical to the fork).

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 11df2db538)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-09 06:37:40 -08:00
Victor Vieux
b2219f1bb5 remove -f on secret create and unify usage with other commands
Signed-off-by: Victor Vieux <vieux@docker.com>
(cherry picked from commit db6652ca71)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-09 06:37:40 -08:00
Tonis Tiigi
7c8511236c Fix workdir cache invalidation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit e160860054)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-09 06:37:40 -08:00
Harald Albers
b2e12626c7 Add bash completion for plugin names
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit e7243a303a)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-09 06:37:40 -08:00
Yunxiang Huang
57a63f1ed2 Fix "zsh/_docker"
Signed-off-by: Yunxiang Huang <hyxqshk@vip.qq.com>
(cherry picked from commit c6544394b8)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-09 06:37:40 -08:00
Tonis Tiigi
d3bffd978a Set plugins used in tests back to original names
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit f4798b98fc)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-09 06:37:40 -08:00
Harald Albers
40736b1848 Fix wrong command in changelog
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 1fe0270e72)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-09 06:37:40 -08:00
Vincent Demeester
462cd90f74
Create only network that are used
- default network is only created if needed
- it's possible to override default network configuration

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-09 12:56:58 +01:00
Vincent Demeester
19cf2b3d5f
Fix external network name not properly handle by stack deploy
Make sure we use the Network external name if it's not empty.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-09 12:26:02 +01:00
Sebastiaan van Stijn
1dded0dee4 Merge pull request #29895 from cpuguy83/cherry_pick_29893
[1.13.x] Fix race accessing plugin storage map
2017-01-07 13:03:34 +01:00
Brian Goff
9f0e745152 Merge pull request #29926 from aaronlehmann/vendor-swarmkit-7f910df
[1.13] Vendor swarmkit 7f910df
2017-01-06 16:19:39 -05:00
Brian Goff
464b205956 Fix conflicts with newly updated selinux policies
The base selinux policies on centos/rhel/oraclelinux have all been
updated in a way that conflicts with the policies we install with
`docker-engine-selinux`. This patch fixes these conflicts.

In addition, removes special cases for old/unsupported versions of
fedora in our selinux package, and change to use a single minimum
version for the selinux base policy package, as this is the minimum
version required to use our selinux policy package.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit ec9a05e5e2)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-01-06 16:04:59 -05:00
Brian Goff
3b2982a2bb Fix race accessing plugin storage map
`plugins.GetAll()` was not locking the plugin map when checking if a
plugin exists, this can cause a race and potentially a panic if another
goroutine is trying to load a plugin into the map at the same time.

Also fixes a race during activation where a plugin inserts itself into
the plugin map but does not check if something else is already there.
This is already checked before trying to activate the plugin, however
the map lock is not held for this entire period, so other plugins may be
loaded during this time.
To fix, before inserting the plugin into the map, check if one with the
same name already exists and use that instead.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 21fcbb39b7)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-01-06 08:28:43 -05:00
Lei Jitang
d2e99882b9 Follow up #29365, fix fail to remove container after restart
Call daemon.Mount will increase the refcount of mounted path,
for those previous running containers, `Mount` call will make
the refcount to 2. see
https://github.com/docker/docker/blob/v1.13.0-rc4/daemon/graphdriver/counter.go#L38
```
	if !m.check {
		m.check = true
		if c.checker.IsMounted(path) {
			m.count++
		}
	}
	m.count++

```
graphdrive could restore on reboot after #22541, call
daemon.Mount to resore the graphdriver is not necessary.

And call `daemon.Mount` on restorting will mount all the containers
mounted layer even if it was stop.

This fix call Mount and then Unmount to get `BaseFs`

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2017-01-05 20:27:34 -05:00
Yong Tang
25b967e149 Allow containers to continue even if mount failed after live restore
This fix is a follow up to #29365. In #29365 a bug was fixed for
`docker exec -u user` after live restore by remounting.
However, #29365 will prevent containers from restored if mount failed.

In this fix, containers will be restored even if mount in that step failed.
Some functionalities might be missing (like `docker exec -u user`) but
at least it is possible to do certain operations like stop/restart/delete.

This fix is related to #29365.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 3003ae1d8b)
2017-01-05 20:27:19 -05:00
Aaron Lehmann
eb5273edd4 [1.13] Revendor swarmkit to 7f910df
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-01-05 14:53:47 -08:00
Vincent Demeester
46afc8f148 Change the way IPAM configuration is handled on stack deploy
We use the 'default' driver if none is specified.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-04 20:25:04 +01:00
Tibor Vass
1afd41e4f7 Merge pull request #29866 from vieux/1.13.0-rc5-cherrpicks
1.13.0 rc5 cherrypicks
2017-01-04 11:04:22 -08:00
Victor Vieux
43cc971d76 bump version to rc5
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 04:27:03 -08:00
Victor Vieux
7f20c11c47 Merge pull request #29878 from mavenugo/npfilter2
Cherry-pick #29877 : Use GetAllByCap to get list of network plugins in docker info
2017-01-04 14:54:32 -08:00
Madhu Venugopal
69240476d4 Swarmkit has enabled the plugin filtering logic based on the drivers
returned in "docker info". Currently info endpoint isnt using the
GetAllByCap, but relies on existing networks to get the plugin names.
This causes a basic issue when it comes to global network plugins which
swarm-mode relies on, wherein swarmkit will not be able to schedule the
network on the worker nodes due to the filtering logic.

In order to break this chicken & egg issue, we must start to use the
GetAllManagedPluginsByCap. We are unable to use GetAllByCap due to
various issues with Plugin-V1's lazy loading approach causing issues
especially during daemon restarts (which uses SystemInfo)

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2017-01-04 12:46:56 -08:00
Lei Jitang
a46dbbded9 Fix update clear the restart policy of monitor
Signed-off-by: Lei Jitang <leijitang@huawei.com>
(cherry picked from commit 737b5b1781)
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-04 12:44:55 +01:00
Victor Vieux
4e9dd0e51c replace no-remove by sample-volume-plugin in docs
Signed-off-by: Victor Vieux <vieux@docker.com>
(cherry picked from commit bcead9282e)
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-04 12:44:55 +01:00
Brian Goff
84f25c7cb8 Fix race/deadlock in v1 plugin handlers
When a plugin is activated, and then `plugins.Handle` is called to
register a new handler for a given plugin type, a deadlock occurs when
for anything which calls `waitActive`, including `Get`, and `GetAll`.

This happens because `Handle()` is setting `activated` to `false` to
ensure that plugin handlers are run on next activation.
Maybe these handlers should be called immediately for any plugins which
are already registered... but to preserve the existing behavior while
fixing the deadlock, track if handlers have been run on plugins and
reset when a new handler is registered.

The simplest way to reproduce the deadlock with Docker is to add a `-v
/foo` to the test container created for the external graphdriver tests.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 2938dce794)
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-04 12:44:55 +01:00
Yong Tang
6841887132 Add --file flag for docker secret create command
This fix tries to address the issue raised in 28581 and 28927
where it is not possible to create a secret from a file (only
through STDIN).

This fix add a flag `--file` to `docker secret create` so that
it is possible to create a secret from a file with:
```
docker secret create --file secret.in secret.name
```

or
```
echo TEST | docker secret create --file - secret.name
```

Related docs has been updated.

An integration test has been added to cover the changes.

This fix fixes 28581.
This fix is related to 28927.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit c6f0b7f448)
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-04 12:44:55 +01:00
Yanqiang Miao
aa5ac38f41 Optimization a error description
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
(cherry picked from commit 6c021893aa)
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-04 12:44:55 +01:00
Yong Tang
d01138c162 Remove docker stack ps -a to match removal of docker service/node ps -a
In #28507 and #28885, `docker service/node ps -a` has been removed so that
information about slots are show up even without `-a` flag.

The output of `docker stack ps` reused the same output as `docker service/node ps`.
However, the `-a` was still there. It might make sense to remove `docker stack ps -a`
as well to bring consistency with `docker service/node ps`.

This fix is related to #28507, #28885, and #25983.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit 9155e14e77)
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-04 12:44:54 +01:00
Brian Goff
def75b2c2c Fixes a race condition in client events monitoring
In cases where there is high latency (ie, not-local network)
`waitExitOrRemoved` was not receiving events for short-lived containers.
This caused the client to hang while waiting for a notification that the
container has stopped.

This happens because `client.Events()` returns immediately and spins a
goroutine up to process events. The problem here is it returns before
the request to the events endpoint is even made.
Even without high-latency issues, there is no guarantee that the
goroutine is even scheduled by the time the function returns.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 47585996bf)
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-04 12:44:54 +01:00
Harald Albers
ff7934faf2 Fix usage message of plugin inspect
Signed-off-by: Harald Albers <github@albersweb.de>
(cherry picked from commit 1b58d0bc51)
Signed-off-by: Victor Vieux <vieux@docker.com>
2017-01-04 12:44:54 +01:00