Commit graph

3600 commits

Author SHA1 Message Date
Yong Tang
63c0366bc9 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>
2016-07-26 11:56:58 -07:00
Sebastiaan van Stijn
3c4d3b2cac Merge pull request #25033 from anusha-ragunathan/plugin-restart
Check for plugin state before enabling plugin.
2016-07-26 18:24:02 +02:00
Vincent Demeester
e6923f6d75 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>
2016-07-25 20:31:10 -07:00
Anusha Ragunathan
b867f6c6e1 Check for plugin state before enable and disable.
This prevents unnecessary API call to containerd.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-07-25 19:24:28 -07:00
Tibor Vass
afac3361dc Merge pull request #25023 from cpuguy83/25022_fix_label_panic
fix panic on --label-add
2016-07-25 18:13:15 -07:00
Brian Goff
a4634cd8a8 Merge pull request #24545 from runshenzhu/health-check
swarm: block controller.Start until container is healthy
2016-07-25 20:32:27 -04:00
Brian Goff
85bc3194aa fix panic on --label-add
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-07-25 19:20:44 -04:00
runshenzhu
a99db84b4a extend health check to start service
Signed-off-by: runshenzhu <runshen.zhu@gmail.com>
Signed-off-by: Runshen Zhu <runshen.zhu@gmail.com>
2016-07-25 15:49:22 -07:00
Vincent Demeester
8f11896a45 Merge pull request #24949 from Microsoft/jjh/tasklist-tlist
Windows: nanoserver TestBuildCmdShellArgsEscaped
2016-07-25 22:58:09 +02:00
Tibor Vass
c65925f24b Merge pull request #24943 from aaronlehmann/rolling-updates
Add failure action for rolling updates
2016-07-25 10:15:28 -07:00
Michael Crosby
b6197e9514 Merge pull request #24942 from anusha-ragunathan/plugin-liverestore
Handle plugin shutdown when liveRestore is set.
2016-07-25 09:49:34 -07:00
Aaron Lehmann
57ae29aa74 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>
2016-07-25 08:51:19 -07:00
Vincent Demeester
40044cb18f Merge pull request #24963 from allencloud/fix-typos
fix typos
2016-07-25 09:39:48 +02:00
Aaron Lehmann
a0ccd0d42f 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>
2016-07-24 09:23:07 -07:00
Vincent Demeester
3742557ed4 Merge pull request #24932 from thaJeztah/change-to-camelBack-for-consistency
Change "rotate_worker_token" to "rotateWorkerToken"
2016-07-24 10:05:07 +02:00
Madhu Venugopal
48d0b81181 Merge pull request #24954 from aboch/lnk
Fix regression on --link on bridge network
2016-07-23 04:47:57 -07:00
allencloud
4e959ef2f7 fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-07-23 11:32:23 +08:00
Alessandro Boch
3a3f800ff4 Fix regression on --link on bridge network
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-07-22 18:52:46 -07:00
Sebastiaan van Stijn
bd81df1278
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>
2016-07-23 01:04:12 +02:00
Anusha Ragunathan
4a44cf1d4c 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>
2016-07-22 15:26:43 -07:00
John Howard
2dba96ca2a Windows: nanoserver tlist not tasklist
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-07-22 12:55:46 -07:00
John Howard
0d4b8cbdac Windows: TestRunCleanupCmdOnEntrypoint for nanoserver
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-07-22 09:05:38 -07:00
Sebastiaan van Stijn
796a19a785 Merge pull request #24918 from Microsoft/jjh/badtestcomment
Fix incorrect test comment
2016-07-22 14:30:18 +02:00
Sebastiaan van Stijn
ac63413a2c Merge pull request #24919 from Microsoft/jjh/TestRunLookupGoogleDNS
Windows: Fix TestRunLookupGoogleDNS for nanoserver
2016-07-22 11:21:28 +02:00
John Howard
80a63e8a21 Windows: Fix TestRunLookupGoogleDNS for nanoserver
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-07-21 19:46:17 -07:00
John Howard
b02107db8b Fix bad test comment
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-07-21 19:39:35 -07:00
Aaron Lehmann
2cc5bd33ee 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>
2016-07-21 15:23:03 -07:00
Sebastiaan van Stijn
bdf4d9c1cd Merge pull request #24884 from Microsoft/jjh/TestBuildWorkdirWindowsPath
Windows: TestBuildWorkdirWindowsPath hard code fix
2016-07-21 11:42:26 +02:00
John Howard
ceed93a874 Windows: TestBuildWorkdirWindowsPath hard code fix
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-07-20 21:23:38 -07:00
Tõnis Tiigi
ea59668046 Merge pull request #24563 from dperny/test-leader-election
Added leader election test
2016-07-20 16:02:09 -07:00
Sebastiaan van Stijn
4b7a83dbce Merge pull request #24853 from Microsoft/jjh/nanoserver
Windows: Allow nanoserver image for CLI
2016-07-20 22:50:08 +02:00
Sebastiaan van Stijn
7d84c71500 Merge pull request #24620 from yongtang/24270-service-list-filter
Allow partial name match for service ls --filter, node ls --filter, node tasks --filter
2016-07-20 21:25:06 +02:00
John Howard
624e6cdbf3 Windows: Allow nanoserver image for CLI
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-07-20 09:59:52 -07:00
Sebastiaan van Stijn
2a78789ad1 Merge pull request #24266 from allencloud/add_cmd_docker_stack_services_STACKNAME
add command `docker stack services STACKNAME`
2016-07-20 18:38:08 +02:00
Yong Tang
e734fa58ea 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>
2016-07-20 08:16:10 -07:00
Brian Goff
a9b392014f Merge pull request #24653 from dongluochen/testrollingupdate
Add integration test for rolling update
2016-07-19 16:51:40 -04:00
Vincent Demeester
f2afd1a906 Merge pull request #24049 from tophj-ibm/remove-lingering-volume-from-tests
DockerExternalVolumeSuite: add daemon to test
2016-07-19 22:39:39 +02:00
Dong Chen
d327765a62 Test rolling update.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2016-07-19 12:09:30 -07:00
Drew Erny
3489e76513 Added leader election test
Signed-off-by: Drew Erny <drew.erny@docker.com>
2016-07-19 11:29:27 -07:00
Arnaud Porterie
ffba13f435 Merge pull request #24648 from mlaventure/fix-kill-test
Fix TestDaemonRestartWithKilledRunningContainer failures on RHEL systems
2016-07-19 18:24:34 +00:00
Kenfe-Mickael Laventure
64483c3bda Do not rely on "live" event anymore
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-07-19 08:24:39 -07:00
Doron Podoleanu
6bec735c91 Use const http status code instead of just numbers see #24783
Signed-off-by: Doron Podoleanu <doronp@il.ibm.com>
2016-07-19 10:40:20 +03:00
allencloud
4b21b411ec add command docker stack services STACKNAME
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-07-19 14:21:58 +08:00
Brian Goff
f49fdb9d0b Merge pull request #24755 from thaJeztah/fix-error-message
update "image delete" error to match actual behavior
2016-07-18 22:47:55 -04:00
Yong Tang
1d600ebcb5 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>
2016-07-18 17:53:08 -07:00
Sebastiaan van Stijn
340964db1c Merge pull request #24692 from anusha-ragunathan/plugins-ux
Print plugin name on successful install, enable and disable.
2016-07-19 01:09:35 +02:00
Arnaud Porterie
6fc46474fb Merge pull request #24701 from dperny/test-leader-proxy
Added test for leader proxying
2016-07-18 22:15:16 +00:00
Sebastiaan van Stijn
f0988dd395
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>
2016-07-18 23:17:55 +02:00
Drew Erny
d305aa48dd Added test for leader proxying
Signed-off-by: Drew Erny <drew.erny@docker.com>
2016-07-18 13:18:02 -07:00
Anusha Ragunathan
6dca1e6d3f Print plugin name on successful install, enable and disable.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-07-18 09:47:12 -07:00