Commit Graph

3590 Commits

Author SHA1 Message Date
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
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
9e5ae213df Merge pull request #24266 from allencloud/add_cmd_docker_stack_services_STACKNAME
add command `docker stack services STACKNAME`
Upstream-commit: 2a78789ad1e5a980a6822d90d7a5039ac7af1252
Component: engine
2016-07-20 18:38:08 +02:00
a996d4618b Allow partial name match for node ls, and node tasks
This fix is an extension to last commit to expand the partial
filter to node and task searches.

Additional integration tests have been added to cover the changes.

This fix fixes 24270.
This fix fixes 24112.

Note: A separate pull request will be opened on swarmkit.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e734fa58eadb4dfaa33b4be275d6f8f29d899e78
Component: engine
2016-07-20 08:16:10 -07:00
c9d322ff3f Merge pull request #24653 from dongluochen/testrollingupdate
Add integration test for rolling update
Upstream-commit: a9b392014f1ced4af6d3834a5e9f040c2eb6c8c2
Component: engine
2016-07-19 16:51:40 -04:00
4af08896ba Merge pull request #24049 from tophj-ibm/remove-lingering-volume-from-tests
DockerExternalVolumeSuite: add daemon to test
Upstream-commit: f2afd1a9062f47432afe858f9fc3fa5ad221003b
Component: engine
2016-07-19 22:39:39 +02:00
6c22592de6 Test rolling update.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: d327765a62a99dc63e9a8c16ac291861cee066f3
Component: engine
2016-07-19 12:09:30 -07:00
35b05741e6 Added leader election test
Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 3489e76513b76e6429075dbbcb6acb3341e42293
Component: engine
2016-07-19 11:29:27 -07:00
257d1bc3de Merge pull request #24648 from mlaventure/fix-kill-test
Fix TestDaemonRestartWithKilledRunningContainer failures on RHEL systems
Upstream-commit: ffba13f43539ff58a0021c9353229507d50b66d5
Component: engine
2016-07-19 18:24:34 +00:00
32ecbd59e9 Do not rely on "live" event anymore
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 64483c3bdaa1887b8b932e0564362fbbff025dc0
Component: engine
2016-07-19 08:24:39 -07:00
7f898cc8b4 Use const http status code instead of just numbers see #24783
Signed-off-by: Doron Podoleanu <doronp@il.ibm.com>
Upstream-commit: 6bec735c91c378e1c9cde1744e7c8aca7397104a
Component: engine
2016-07-19 10:40:20 +03:00
34b01d4562 add command docker stack services STACKNAME
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 4b21b411ecf4b43b16bdd7f4b78df8a362503724
Component: engine
2016-07-19 14:21:58 +08:00
77d0030a64 Merge pull request #24755 from thaJeztah/fix-error-message
update "image delete" error to match actual behavior
Upstream-commit: f49fdb9d0b6345422a77c550b6d06ea7442f3f28
Component: engine
2016-07-18 22:47:55 -04:00
962ced6b90 Allow partial name match for service ls --filter
This fix tries to address the issue raised in 24270 where it was
not possible to have a partial name match when list services
with name filter.

This fix updates swarmkit and allows prefix search when name is
provided as the filter for listing services.

An additional integration test is added to cover the changes.

This fix fixes 24270.

Note: A separate pull request will be opened on swarmkit.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 1d600ebcb5750c4c93356fae08e562d836ecee45
Component: engine
2016-07-18 17:53:08 -07:00
32c154633c Merge pull request #24692 from anusha-ragunathan/plugins-ux
Print plugin name on successful install, enable and disable.
Upstream-commit: 340964db1c8f161a2ad156023eb47dcc93bf804b
Component: engine
2016-07-19 01:09:35 +02:00
6103a02b12 Merge pull request #24701 from dperny/test-leader-proxy
Added test for leader proxying
Upstream-commit: 6fc46474fbcba6a554526f8c27554a1793e13aab
Component: engine
2016-07-18 22:15:16 +00:00
4be1849e85 update "image delete" error to match actual behavior
The error message;

    unable to delete .... (must be forced) - image is referenced in one or more repositories

Looks to be incorrect

Given the following images:

    docker images | grep 2d36b1c0ea40
    registry                           2                                     2d36b1c0ea40        7 weeks ago         171.2 MB
    registry                           2.4.1                                 2d36b1c0ea40        7 weeks ago         171.2 MB

Removing the image by *id* fails:

    docker rmi 2d36b1c0ea40
    Error response from daemon: conflict: unable to delete 2d36b1c0ea40 (must be forced) - image is referenced in one or more repositories

However, after untagging one image:

    docker rmi registry:2
    Untagged: registry:2

Removing the image works:

    docker rmi 2d36b1c0ea40
    Untagged: registry:2.4.1
    Deleted: sha256:2d36b1c0ea40159adc8b36f7563f1d7a6d443384fe2611e8b393c1cb3ae2e6ad
    Deleted: sha256:7abfddbf4e61927307b6646010845eeb7513ecc6541f33ea6103b2493e36aa4e
    Deleted: sha256:f512d7699dbb2994fe15d30ee1d404e57b58c3c310617b4471db649680b4cfa0
    Deleted: sha256:7291e34714908270aeda93f1dc681485f9734d41314e2fdc6c11f32ffa782a21
    Deleted: sha256:548f6562929484f3d78267e4b1e31dcfeb9f303059668888b4423ce5501c7fbc
    Deleted: sha256:afe56b46629e6d8e0bfc36fed13395a7cfa2bd83b58bb489976ef13553eff20b
    Deleted: sha256:cf0c3bd5d6a0a14ebf96cc7d3df79a37774a70f3086273e09da71a86fe74fec2
    Deleted: sha256:c5fdaf8b055f544d0211043e687905315c3a0b71c1c08df07e473dd0a30e43c8

    docker images | grep 2d36b1c0ea40
    <empty>

This changes the error message to reflect that behavior

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f0988dd39598a46d911abc54c19fc3377698d630
Component: engine
2016-07-18 23:17:55 +02:00
ecd1805a72 Added test for leader proxying
Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: d305aa48ddcd17244ca408c59a40e2ef2392f414
Component: engine
2016-07-18 13:18:02 -07:00
adb3025793 Print plugin name on successful install, enable and disable.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 6dca1e6d3f875de7a6652390f65fdb8ec2623e3b
Component: engine
2016-07-18 09:47:12 -07:00
00a715516e Merge pull request #24646 from anusha-ragunathan/use-volume-plugins
Remove use of exec-root in plugins due to socket pathname limits.
Upstream-commit: ba6adc5f46ae1e979551998a02e16e3396a77402
Component: engine
2016-07-18 16:28:22 +00:00
0633dc391e Remove use of exec-root in plugins due to socket pathname limits.
Unix sockets are limited to 108 bytes. As a result, we need to be
careful in not using exec-root as the parent directory for pluginID
(which is already 64 bytes), since it can result in socket path names
longer than 108 bytes. Use /tmp instead. Before this change, setting:
- dockerd --exec-root=/go/src/github.com/do passes
- dockerd --exec-root=/go/src/github.com/doc fails
After this change, there's no failure.

Also, write a volume plugins test to verify that the plugins socket
responds.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 21ecd5a93db34288c0c579d5738030716d7bef2d
Component: engine
2016-07-15 09:17:29 -07:00
e53dc037d4 Fix panic in stats test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: f5fb3c69fdd339c4ec1778a00d4cfc1aa887e310
Component: engine
2016-07-14 17:30:57 -07:00
8f0edf84fe Change the add/update flags to include 'add'
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4c6faa434071b87a55256e86020cb78495e9951d
Component: engine
2016-07-13 16:06:25 -04:00
61271c6fdb Add remove flags for service update
with unit tests

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: dc33fc1ff433fcc70efc22f5cea9b87c6ec64a3b
Component: engine
2016-07-13 16:06:25 -04:00
231ed0ed4e Merge pull request #23324 from icecrime/add_run_network
Add run network
Upstream-commit: 778b38cbf1f03d54ef86ba79882af45d653e71b0
Component: engine
2016-07-12 14:59:48 -07:00
f0e9eeb33f Merge pull request #24465 from LK4D4/restart_cluster_test
integration-cli: add test for restarting entire swarm cluster
Upstream-commit: 08a2fd7e2e95c235225e796b8b6d4c89478394ea
Component: engine
2016-07-12 13:12:33 -07:00
a4c4731dc9 Rename --net to --network
Add a `--network` flag which replaces `--net` without deprecating it
yet. The `--net` flag remains hidden and supported.

Add a `--network-alias` flag which replaces `--net-alias` without deprecating
it yet. The `--net-alias` flag remains hidden and supported.

Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
Upstream-commit: c0c7d5e71586ec8e4d54aef9e061f061e9223cc4
Component: engine
2016-07-12 13:01:35 -07:00
832af6ffb8 Merge pull request #24528 from rsippl/24526-empty-services-list
Return an empty services list if no services are running
Upstream-commit: 79432b436793b9850f50de38166740698aca41bf
Component: engine
2016-07-12 18:31:28 +00:00
944503693f Add API test for empty services list
Signed-off-by: Ralf Sippl <ralf.sippl@gmail.com>
Upstream-commit: 65e72133a11ea3e6873f62039956bbd70548a5a7
Component: engine
2016-07-12 17:31:44 +02:00