Commit Graph

3618 Commits

Author SHA1 Message Date
4cd88300bd Merge pull request #24502 from allencloud/change-comparison-log-in-container-config
update comparison log in container config
Upstream-commit: ca43efb40eb011e0f8adaca2eda77a5330f02089
Component: engine
2016-07-28 16:51:11 -07:00
8e586b192e Merge pull request #25077 from cpuguy83/fix_TestApiSwarmRestartCluster
Fix race in `TestApiSwarmRestartCluster`
Upstream-commit: 262063531a4845c436b64deff9a7fca9f90c0c13
Component: engine
2016-07-28 10:15:31 -07:00
a2827e4f47 Merge pull request #25137 from justincormack/32bit-seccomp-test
Add a test that the default seccomp profile allows execution of 32 bit binaries
Upstream-commit: 8a8a63aa32a60e12b3c4d8e9e3397a8bd3b96d54
Component: engine
2016-07-28 17:01:04 +02:00
ae11b0dc77 Merge pull request #24816 from stevvooe/service-ps-over-tasks
cli: `docker service|node|stack ps` instead of tasks
Upstream-commit: 1a7d339d3698d13a4cf9592e8e73df27bf43664f
Component: engine
2016-07-27 23:13:28 +02:00
3cd473134d Merge pull request #24760 from anusha-ragunathan/plugin-events
Make daemon events listen for plugin lifecycle events.
Upstream-commit: 297745b1cdfb79a12986465f8150e22b0018c640
Component: engine
2016-07-27 13:36:49 -07:00
6a1ceaa1e1 cli: docker service|node|stack ps instead of tasks
Rather than conflict with the unexposed task model, change the names of
the object-oriented task display to `docker <object> ps`. The command
works identically to `docker service tasks`. This change is superficial.

This provides a more sensical docker experience while not trampling on
the task model that may be introduced as a top-level command at a later
date.

The following is an example of the display using `docker service ps`
with a service named `condescending_cori`:

```
$ docker service ps condescending_cori
ID                         NAME                  SERVICE             IMAGE   LAST STATE              DESIRED STATE  NODE
e2cd9vqb62qjk38lw65uoffd2  condescending_cori.1  condescending_cori  alpine  Running 13 minutes ago  Running        6c6d232a5d0e
```

The following shows the output for the node on which the command is
running:

```console
$ docker node ps self
ID                         NAME                  SERVICE             IMAGE   LAST STATE              DESIRED STATE  NODE
b1tpbi43k1ibevg2e94bmqo0s  mad_kalam.1           mad_kalam           apline  Accepted 2 seconds ago  Accepted       6c6d232a5d0e
e2cd9vqb62qjk38lw65uoffd2  condescending_cori.1  condescending_cori  alpine  Running 12 minutes ago  Running        6c6d232a5d0e
4x609m5o0qyn0kgpzvf0ad8x5  furious_davinci.1     furious_davinci     redis   Running 32 minutes ago  Running        6c6d232a5d0e
```

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 0aa4e1e68973ede0c73f8a4356e2a17fc903f549
Component: engine
2016-07-27 11:06:42 -07:00
980ac6c629 Add a test that the default seccomp profile allows execution of 32 bit binaries
While testing #24510 I noticed that 32 bit syscalls were incorrectly being
blocked and we did not have a test for this, so adding one.

This is only tested on amd64 as it is the only architecture that
reliably supports 32 bit code execution, others only do sometimes.

There is no 32 bit libc in the buildpack-deps so we cannot build
32 bit C code easily so use the simplest assembly program which
just calls the exit syscall.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 93bbc76ee53240e0862c6f1ff409e7a4ee0883dc
Component: engine
2016-07-27 18:42:34 +01:00
cb9f5d85ea Merge pull request #25067 from lixiaobing10051267/masterBreak
Add break after found = true
Upstream-commit: 2c947a4b009f90ce79abbdf137ea908320ab28ec
Component: engine
2016-07-27 14:44:13 +02:00
49967c7276 Merge pull request #25104 from cpuguy83/fix_TestApiSwarmRaftQuorum
fix race in TestApiSwarmRaftQuorum
Upstream-commit: e07ff10f706a5bb9aa403c8d56876b09f9cba857
Component: engine
2016-07-27 12:50:09 +02:00
ce6c596db3 Merge pull request #25107 from stevvooe/cleanup-leader-election-test
integration-cli: cleanup leader election tests
Upstream-commit: ef63637b995b07a08b6cb326dc8953b927e9df1d
Component: engine
2016-07-27 12:47:33 +02:00
fbd6f3276f Merge pull request #25085 from aaronlehmann/restart-delay-integration-tests
Specify a lower restart delay for swarm integration tests
Upstream-commit: 5d65ba4ca7ecaaa31f13cd3052ac7c052f09e21f
Component: engine
2016-07-26 22:18:28 -04:00
9f01f14280 integration-cli: cleanup leader election tests
Ensure convergence before moving on with testing leader election
conditions. This reduce the flakiness of this test when run in different
environments.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 946e23776be78510799f3f242f7b9f7acbbfd357
Component: engine
2016-07-26 19:12:27 -07:00
025360735d fix race in TestApiSwarmRaftQuorum
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 4a856d7a87c65dd8c537a45443c72698f056cf13
Component: engine
2016-07-26 21:32:56 -04:00
2d9c640d4f Specify a lower restart delay for swarm integration tests
If no restart delay is specified for a swarm service, the default
restart delay is 5 seconds. This is a reasonable value for actual
deployments - one example of where it's useful is that if a bad image is
specified, the orchestrator will wait 5 seconds between attempts to
restart it instead of restarting it in a tight loop.

In integration tests, this 5 second delay is dead time. The tests run
faster if the delay is reduced. Set it to 100 ms to avoid the waste of
time.

This appears to speed up a few tests:

DockerSwarmSuite.TestApiSwarmForceNewCluster 37.241s -> 34.323s
DockerSwarmSuite.TestApiSwarmRestartCluster  22.038s -> 15.545s
DockerSwarmSuite.TestApiSwarmServicesMultipleAgents 24.456s -> 19.853s
DockerSwarmSuite.TestApiSwarmServicesStateReporting 19.240s -> 10.049s

...a small step towards making the Swarm integration tests run in a
reasonable amount of time.

Also, change the update delay for the rolling update test from 8 seconds
to 4 seconds, which should be sufficient to differentiate between
batches of updated tasks. This reduces the runtime for
DockerSwarmSuite.TestApiSwarmServicesUpdate from 28s to 20s.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: c93c6492589504ed9474922f7c98f9ecb24df77f
Component: engine
2016-07-26 12:12:43 -07:00
1fe61aeefa Fix flaky TestSwarmNodeTaskListFilter by waiting for task fully deployed
This is an attempt to fix the flaky test of TestSwarmNodeTaskListFilter in 25029.

Basically this fix adds a check to wait until 3 containers has already up,
before processing `node tasks ...`.

This might fix 25029.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 63c0366bc9a7f326ad61cdfa69fa860cf844a2c7
Component: engine
2016-07-26 11:56:58 -07:00
5a19e582d6 Fix race in TestApiSwarmRestartCluster
In `TestApiSwarmRestartCluster`, it's calling `checkClusterHealth`.
`checkClusterHealth` calls `d.info()`, which will return an error if
there is no cluster leader... problem is `checkClusterHealth` is doing a
nil error assertion w/o giving any time for a leader to be elected.

This moves the `d.info()` call into a `waitAndAssert` using the default
reconciliation timeout.

It also moves some other checks into a `waitAndAssert` to give the
cluster enough time to come back up.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: fdcde8bb65acf2c459e93678bf2659139ef5e918
Component: engine
2016-07-26 14:37:18 -04:00
062b507351 Make daemon events listen for plugin lifecycle events.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 42abccb841b5bc0d420044e69165852b0054c38f
Component: engine
2016-07-26 10:51:47 -07:00
3c909576f6 Merge pull request #25033 from anusha-ragunathan/plugin-restart
Check for plugin state before enabling plugin.
Upstream-commit: 3c4d3b2cacdd263ccded0ed0639c22fad96550d6
Component: engine
2016-07-26 18:24:02 +02:00
c402160cdb Add break after found = true
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 8928677ea2b4e69ecfd96a2c951a33e46b7b7388
Component: engine
2016-07-26 23:28:44 +08:00
eb900df556 Remove swarm inspect and use info instead
Remove the swarm inspect command and use docker info instead to display
swarm information if the current node is a manager.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: e6923f6d75c2bd1b22cc1229214ffceca3251cc6
Component: engine
2016-07-25 20:31:10 -07:00
37c9afdc01 Check for plugin state before enable and disable.
This prevents unnecessary API call to containerd.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: b867f6c6e18f9d999ddec911a241941428777569
Component: engine
2016-07-25 19:24:28 -07:00
b94b8fd3fd Merge pull request #25023 from cpuguy83/25022_fix_label_panic
fix panic on --label-add
Upstream-commit: afac3361dc66b0fd0c3910f89d0d7e8156b37e24
Component: engine
2016-07-25 18:13:15 -07:00
d759fd7b51 Merge pull request #24545 from runshenzhu/health-check
swarm: block controller.Start until container is healthy
Upstream-commit: a4634cd8a8edb9be9c73dc552e045fa868a861f7
Component: engine
2016-07-25 20:32:27 -04:00
d2f3f931f0 fix panic on --label-add
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 85bc3194aa12c19a5bd755666d1e9617dc1bb322
Component: engine
2016-07-25 19:20:44 -04:00
5a95df9753 extend health check to start service
Signed-off-by: runshenzhu <runshen.zhu@gmail.com>
Signed-off-by: Runshen Zhu <runshen.zhu@gmail.com>
Upstream-commit: a99db84b4a966f0f09e81c446e857323a2a3302c
Component: engine
2016-07-25 15:49:22 -07:00
7ebd4850f0 Merge pull request #24949 from Microsoft/jjh/tasklist-tlist
Windows: nanoserver TestBuildCmdShellArgsEscaped
Upstream-commit: 8f11896a45aea554935353cb1347cc2aa2529395
Component: engine
2016-07-25 22:58:09 +02:00
614fc25c93 Merge pull request #24943 from aaronlehmann/rolling-updates
Add failure action for rolling updates
Upstream-commit: c65925f24baf98455c211b4eb5c408daaaefb07a
Component: engine
2016-07-25 10:15:28 -07:00
94c36eb295 Merge pull request #24942 from anusha-ragunathan/plugin-liverestore
Handle plugin shutdown when liveRestore is set.
Upstream-commit: b6197e951498eed717ee550387c34e9a8e6350ed
Component: engine
2016-07-25 09:49:34 -07:00
f72c6bff06 Add failure action for rolling updates
This changes the default behavior so that rolling updates will not
proceed once an updated task fails to start, or stops running during the
update. Users can use docker service inspect --pretty servicename to see
the update status, and if it pauses due to a failure, it will explain
that the update is paused, and show the task ID that caused it to pause.
It also shows the time since the update started.

A new --update-on-failure=(pause|continue) flag selects the
behavior. Pause means the update stops once a task fails, continue means
the old behavior of continuing the update anyway.

In the future this will be extended with additional behaviors like
automatic rollback, and flags controlling parameters like how many tasks
need to fail for the update to stop proceeding. This is a minimal
solution for 1.12.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 57ae29aa74e77ade3c91b1c77ba766512dae9ab4
Component: engine
2016-07-25 08:51:19 -07:00
8e3d8789cb Merge pull request #24963 from allencloud/fix-typos
fix typos
Upstream-commit: 40044cb18fd4ff0ed13d8cdd41ec4dcecdac0703
Component: engine
2016-07-25 09:39:48 +02:00
2150ea40b1 Split advertised address from listen address
There are currently problems with "swarm init" and "swarm join" when an
explicit --listen-addr flag is not provided. swarmkit defaults to
finding the IP address associated with the default route, and in cloud
setups this is often the wrong choice.

Introduce a notion of "advertised address", with the client flag
--advertise-addr, and the daemon flag --swarm-default-advertise-addr to
provide a default. The default listening address is now 0.0.0.0, but a
valid advertised address must be detected or specified.

If no explicit advertised address is specified, error out if there is
more than one usable candidate IP address on the system. This requires a
user to explicitly choose instead of letting swarmkit make the wrong
choice. For the purposes of this autodetection, we ignore certain
interfaces that are unlikely to be relevant (currently docker*).

The user is also required to choose a listen address on swarm init if
they specify an explicit advertise address that is a hostname or an IP
address that's not local to the system. This is a requirement for
overlay networking.

Also support specifying interface names to --listen-addr,
--advertise-addr, and the daemon flag --swarm-default-advertise-addr.
This will fail if the interface has multiple IP addresses (unless it has
a single IPv4 address and a single IPv6 address - then we resolve the
tie in favor of IPv4).

This change also exposes the node's externally-reachable address in
docker info, as requested by #24017.

Make corresponding API and CLI docs changes.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: a0ccd0d42fdb0dd2005f67604cb81a5a6b26787e
Component: engine
2016-07-24 09:23:07 -07:00
66e0358be6 Merge pull request #24932 from thaJeztah/change-to-camelBack-for-consistency
Change "rotate_worker_token" to "rotateWorkerToken"
Upstream-commit: 3742557ed49048befea88125df781d5c87131e0d
Component: engine
2016-07-24 10:05:07 +02:00
8a421c2f1b Merge pull request #24954 from aboch/lnk
Fix regression on --link on bridge network
Upstream-commit: 48d0b811816fe7285644a8338c64879ecac7c2ca
Component: engine
2016-07-23 04:47:57 -07:00
1c3431e16a fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 4e959ef2f7f063803d04e06166f459257eb94b5c
Component: engine
2016-07-23 11:32:23 +08:00
ac007a8e3c Fix regression on --link on bridge network
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 3a3f800ff48ddfa729f1db7898bf689d25a6d4cf
Component: engine
2016-07-22 18:52:46 -07:00
411f901924 Change "rotate_worker_token" to "rotateWorkerToken"
This renames the `rotate_xxx` flags to camelBack, for
consistency with other API query-params, such as
`detachKeys`, `noOverwriteDirNonDir`, and `fromImage`.

Also makes this flag accept a wider range of boolean
values ("0", "1", "true", "false"), and throw an error
if an invalid value is passed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: bd81df12780b0765e55582574eaa2a125adf65fa
Component: engine
2016-07-23 01:04:12 +02:00
ed21a7262c Handle plugin shutdown when liveRestore is set.
When daemon has liveRestore set, daemon shutdown should not shutdown
plugins. Fixes #24759

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 4a44cf1d4c8e540b67aaa3834291a964c6ab7524
Component: engine
2016-07-22 15:26:43 -07:00
15890641b6 Windows: nanoserver tlist not tasklist
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 2dba96ca2a5cae57452ca13b77d48082bb876c1b
Component: engine
2016-07-22 12:55:46 -07:00
86ccbc24d1 Windows: TestRunCleanupCmdOnEntrypoint for nanoserver
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 0d4b8cbdac531058e76526adebb1b8258826d0cf
Component: engine
2016-07-22 09:05:38 -07:00
8ee842fee1 Merge pull request #24918 from Microsoft/jjh/badtestcomment
Fix incorrect test comment
Upstream-commit: 796a19a7853e72de1a2f09024a7474c61a979568
Component: engine
2016-07-22 14:30:18 +02:00
8a7079d20e Merge pull request #24919 from Microsoft/jjh/TestRunLookupGoogleDNS
Windows: Fix TestRunLookupGoogleDNS for nanoserver
Upstream-commit: ac63413a2cdb7fbf1f063efe14104d30144e0689
Component: engine
2016-07-22 11:21:28 +02:00
2390132a2f Windows: Fix TestRunLookupGoogleDNS for nanoserver
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 80a63e8a2126239cb06918da25b5ff22c2ad813b
Component: engine
2016-07-21 19:46:17 -07:00
345fd45d48 Fix bad test comment
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b02107db8b3ead7757141584523ce9b623c24c0b
Component: engine
2016-07-21 19:39:35 -07:00
b141a44de0 Replace secrets with join tokens
Implement the proposal from
https://github.com/docker/docker/issues/24430#issuecomment-233100121

Removes acceptance policy and secret in favor of an automatically
generated join token that combines the secret, CA hash, and
manager/worker role into a single opaque string.

Adds a docker swarm join-token subcommand to inspect and rotate the
tokens.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 2cc5bd33eef038bf5721582e2410ba459bb656e9
Component: engine
2016-07-21 15:23:03 -07:00
5e5e1a3d76 Merge pull request #24884 from Microsoft/jjh/TestBuildWorkdirWindowsPath
Windows: TestBuildWorkdirWindowsPath hard code fix
Upstream-commit: bdf4d9c1cd5fc6f91cb5ea831dfbe62870b4ab18
Component: engine
2016-07-21 11:42:26 +02:00
9ef04f92b8 Windows: TestBuildWorkdirWindowsPath hard code fix
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: ceed93a874bf74baf811ed7fe9a476f25adca7b8
Component: engine
2016-07-20 21:23:38 -07:00
0938c99ecd Merge pull request #24563 from dperny/test-leader-election
Added leader election test
Upstream-commit: ea59668046e1c842b311732fc280701da1056ace
Component: engine
2016-07-20 16:02:09 -07:00
5da22e7bcc Merge pull request #24853 from Microsoft/jjh/nanoserver
Windows: Allow nanoserver image for CLI
Upstream-commit: 4b7a83dbce9d804ac77074dd4d4a1d582334b63c
Component: engine
2016-07-20 22:50:08 +02:00
7fe7aaea87 Merge pull request #24620 from yongtang/24270-service-list-filter
Allow partial name match for service ls --filter, node ls --filter, node tasks --filter
Upstream-commit: 7d84c715005dd123b0a63f23b207c12cb998786f
Component: engine
2016-07-20 21:25:06 +02:00
34fed514cd Windows: Allow nanoserver image for CLI
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 624e6cdbf386d0862e882db9e35d2c7caaa1b337
Component: engine
2016-07-20 09:59:52 -07:00