Commit graph

3926 commits

Author SHA1 Message Date
Antonio Murdaca
8f7a8c75ae
vendor docker/engine-api@f9cef59044
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-08-31 22:39:13 +02:00
Tonis Tiigi
f0e9997287 Revert "Change related tests from DockerSuite to DockerDaemonSuite in docker_cli_info_test.go"
This reverts commit 0ce5ef279c.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-08-31 11:52:22 -07:00
Thomas Leonard
e95b6b51da Fix exec form of HEALTHCHECK CMD
We attached the JSON flag to the wrong AST node, causing Docker to treat
the exec form ["binary", "arg"] as if the shell form "binary arg" had
been used. This failed if "ls" was not present.

Added a test to detect this.

Fixes #26174

Signed-off-by: Thomas Leonard <thomas.leonard@docker.com>
2016-08-31 17:50:12 +01:00
John Howard
3ae6cd453e Windows: Enable multiple TestInspect tests
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-08-31 08:12:50 -07:00
Yong Tang
1e6eccae69 Fix issue in --ip6 validation for docker create
This fix tries to address the issue raised in comment:
https://github.com/docker/docker/pull/25943#discussion_r76843081
Previously, the validation for `ip6` is done by checking ParseIP().To16().
However, in case an IPv4 address or an IPv4-mapped Ipv6 address has been
provided, the validation will pass (should fail).

This fix first check if `--ip6` is passed with a valid IP address and returns
error for invalid IP addresses. It then check if an IPv4 or IPv4-mapped Ipv6
address is passed, and return error accordingly.

This fix adds two more cases in the tests. One for IPv4 address passed to `--ip6`
and another for Ipv4-mapped IPv6 address passed to `--ip6`. In both cases,
without this fix the validation will pass through.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-30 19:28:44 -07:00
Yong Tang
5c0fd2d06e Change related test from DockerSuite to DockerDaemonSuite in docker_cli_daemon_test.go
This fix is a follow-up of 26154. I did a grep on `integration-cli` and
found out that there are several tests in `docker_cli_daemon_test.go`
that still use `NewDaemon` instread of `DockerDaemonSuite`.

This fix changes related tests from DockerSuite to DockerDaemonSuite in
`docker_cli_daemon_test.go`.

With this fix, now `NewDaemon` is only called from `SetUpTest` on
various DockerXXXSuite. That should help maintain the test code base.

This fix is related to the comments in:
26115
24533.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-30 18:30:27 -07:00
Tõnis Tiigi
fbcf0a50b2 Merge pull request #26170 from Microsoft/jjh/testimages
Windows: Enable TestImage and TestImport tests
2016-08-30 17:52:50 -07:00
Tõnis Tiigi
b26059a0ca Merge pull request #26166 from Microsoft/jjh/testhelp
Windows: Enable TestHelpExitCodesHelpOutput
2016-08-30 17:50:52 -07:00
Tõnis Tiigi
4d15f428b1 Merge pull request #26165 from Microsoft/jjh/testexec
Windows: Enable a couple of exec tests
2016-08-30 17:50:25 -07:00
Tõnis Tiigi
75dc3614f7 Merge pull request #26164 from Microsoft/jjh/testcreate
Windows: Enable some create CI tests
2016-08-30 17:49:57 -07:00
Tõnis Tiigi
5d5d80ca69 Merge pull request #26163 from Microsoft/jjh/testcp
Windows: Enable some cp integration tests
2016-08-30 17:49:26 -07:00
Tõnis Tiigi
69f25f9da8 Merge pull request #26161 from Microsoft/jjh/testcontainerapi
Windows: Port api_containers_test tests
2016-08-30 17:48:43 -07:00
Alexander Morozov
399761af4d Merge pull request #26154 from yongtang/08302016-docker-cli-info-test-DockerDaemonSuite
Change related tests from DockerSuite to DockerDaemonSuite in `docker_cli_info_test.go`
2016-08-30 16:56:00 -07:00
John Howard
7ea707d5ef Windows: Enable TestImage and TestImport tests
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-08-30 15:20:55 -07:00
John Howard
f93f692e51 Windows: Enable TestHelpExitCodesHelpOutput
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-08-30 15:05:02 -07:00
John Howard
ea42182722 Windows: Enable a couple of exec tests
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-08-30 15:03:18 -07:00
John Howard
78aede292b Windows: Enable some create CI tests
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-08-30 14:38:19 -07:00
John Howard
088c3eeea8 Windows: Enable some cp integration tests
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-08-30 14:32:10 -07:00
Kenfe-Mickael Laventure
88bfa6ede8 Add integration test to check persistence of exitcode and error message
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-08-30 14:17:09 -07:00
John Howard
3d5aac305f Windows: Port api_containers_test tests
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-08-30 14:15:33 -07:00
Vincent Demeester
73614f9f1e Merge pull request #26020 from tonistiigi/fix-eventsbefore-test
Fix flaky TestEventsContainerFilterBeforeCreate
2016-08-30 22:24:52 +02:00
Vincent Demeester
cf3e834c9b Merge pull request #26153 from Microsoft/jjh/testcommitcli
Windows: Enable some commit tests
2016-08-30 22:17:20 +02:00
Vincent Demeester
8a46c18dd4 Merge pull request #26147 from Microsoft/jjh/testbuildapi
Windows: Enable 5 Build API tests
2016-08-30 22:12:36 +02:00
Vincent Demeester
16148d0420 Merge pull request #26149 from Microsoft/jjh/testbuildcli
Windows: Enable multiple cli build tests
2016-08-30 22:12:24 +02:00
Yong Tang
0ce5ef279c Change related tests from DockerSuite to DockerDaemonSuite in docker_cli_info_test.go
This fix changes related tests from DockerSuite to DockerDaemonSuite
in `docker_cli_info_test.go`. Previously that was done through `NewDaemon()`.

This fix is related to the comments in:
https://github.com/docker/docker/pull/26115#discussion_r76784977
https://github.com/docker/docker/pull/24533#issuecomment-243420042

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-30 10:11:01 -07:00
John Howard
bb4b31585c Windows: Enable multiple cli build tests
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-08-30 09:51:13 -07:00
John Howard
ac59dfa761 Windows: Enable some commit tests
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-08-30 09:48:18 -07:00
John Howard
a06c695177 Windows: Enable docker_cli_history_test
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-08-30 09:31:33 -07:00
Yong Tang
0f6acff796 Add registry mirrors information in the output of docker info
This fix tries to add the registry mirrors information in the output
of `docker info`.

In our active deployment, we use registry mirrors to help speeding
up the `docker pull`. In the current output of `docker info`,
registry mirrors is not present though it is available in `/info` API.

I think it makes sense to add the registry mirrors to `docker info`,
similiar to insecure registries.

This fix adds the registry mirrors to the output of `docker info`:
```
Registry Mirrors:
 https://192.168.1.2/
 http://registry.mirror.com:5000/
```

An integration test has been added to cover the changes.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-30 09:05:24 -07:00
John Howard
8bc1c9c08a Windows: Enable 5 Build API tests
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-08-30 08:41:17 -07:00
Brian Goff
edafc642b2 Merge pull request #25890 from cpuguy83/fix_swarm_control_sock_path
Use daemon exec root for swarm control socket
2016-08-30 08:51:52 -04:00
Yong Tang
80e3975117 Fix issue in API POST /services/(id or name)/update
This fix tries to address the issue raised in 26090 where
remote API `POST /services/(id or name)/update` cannot
use `name` to update. This is not consistent with the
documentation of the remote API.

This fix fixes this issue by performing a lookup with `getService`
in case `name` instead of `id` is used in API.

This fix adds an integration test to cover the changes.

This fix fixes 26090.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-29 21:13:53 -07:00
John Howard
934fe3f73e Windows: Enable 2 TestAttach* tests
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-08-29 15:57:27 -07:00
Brian Goff
d09c04a667 Merge pull request #25317 from yongtang/25304-docker-service-create-group
Support `--group` in `docker service create`
2016-08-29 10:27:31 -04:00
Vincent Demeester
bf0077c138 Merge pull request #25990 from vieux/plugin_inspect
add -f to plugin inspect
2016-08-28 17:03:40 +02:00
Arnaud Porterie
9ea28ea894 Merge pull request #26055 from mavenugo/ndn
Support container disconnect for non-existing network
2016-08-28 01:48:02 +00:00
Antonio Murdaca
e2be3fee02
integration-cli: fix TestImportBadURL w/o network
As explained in the test comment itself, the error message may vary on
different platform.
This patch adds another condition found while testing w/o network
access on RHEL based distros (Fedora, RHEL, CentOS).

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-08-27 23:57:54 +02:00
Yong Tang
b31969ee36 Support --group-add and --group-rm in docker service create/update
This fix tries to address the issue raised in 25304 to support
`--group-add` and `--group-rm` in `docker service create`.

This fix adds `--group-add` to `docker service create` and `docker service update`,
adds `--group-rm` to `docker service update`.

This fix updates docs for `docker service create` and `docker service update`:
1. Add `--group-add` to `docker service create` and `docker service update`
2. Add `--group-rm` to `docker service update`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-27 11:54:05 -07:00
Madhu Venugopal
05a3f2666e Support container disconnect for non-existing network
There are cases such as migrating from classic overlay network to the
swarm-mode networking (without kv-store), such a mechanism to allow
disconnecting a container even when a network isnt available will be
useful.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-08-26 16:48:52 -07:00
Tibor Vass
ed0dff8f16 Merge pull request #25424 from vieux/enabled
replace active by enabled for consistency in plugins
2016-08-26 15:22:41 -07:00
Alexander Morozov
bdadcfc1bb Merge pull request #25861 from WeiZhang555/wait-remove-for-start
Using waitExitOrRemoved for `docker start`
2016-08-26 13:36:56 -07:00
Vincent Demeester
5168c93419 Merge pull request #23830 from ardnaxelarak/23345_remove_name_from_volume_create
remove --name flag from volume create
2016-08-26 21:52:07 +02:00
Arnaud Porterie
6e85b81df2 Merge pull request #23614 from icecrime/inspect_services
Allow `docker inspect` on all types
2016-08-26 18:45:23 +00:00
Michael Crosby
175f6eb55f Merge pull request #25177 from cpuguy83/fix_TestDaemonDiscoveryBackendConfigReload
TestDaemonDiscoveryBackendConfigReload behavior
2016-08-26 10:54:48 -07:00
Brian Goff
20f99a8634 TestDaemonDiscoveryBackendConfigReload behavior
`TestDaemonDiscoveryBackendConfigReload` was doing some wierd things
with files, creating a file (directly in `./integration-cli`), removing
it, then creating a new file.
This is just weird, so fixed it to use a single file, file will go into
a temp dir so it doesn't pollute integration-cli.

It was also blindly sending a SIGHUP to the daemon process then sleeping
for 3 seconds.  This is racey, and slow.
Change this to look for the daemon-reload event in the event stream.
Reload logic is moved to a separate function and blocks (w/ a timeout)
waiting for the reload event to fire.

Runtime of the test is now ~0.5s on my machine, where as it was a
minimum of 3s due to the `time.Sleep` before.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-08-26 11:02:04 -04:00
Victor Vieux
63a19edcb1 add -f to plugin inspect
Signed-off-by: Victor Vieux <vieux@docker.com>

Signed-off-by: Victor Vieux <vieux@docker.com>
2016-08-25 22:40:05 -07:00
Yong Tang
c7045eb935 Validate --ip and --ip6 for docker create
This fix tries to fix the issue raised in 25863 where `--ip` value
is not validated for `docker create`. As a result, the IP address
passed by `--ip` is not used for `docker create` (ignored silently).

This fix adds validation in the daemon so that `--ip` and  `--ip6`
are properly validated for `docker create`.

An integration test has been added to cover the changes.

This fix fixes 25863.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-25 22:11:23 -07:00
Victor Vieux
cf4e268115 replace active by enabled for consistency in plugins
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-08-25 20:42:49 -07:00
Arnaud Porterie (icecrime)
3db9f7afce
Refactor docker inspect to work on all types
Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
2016-08-25 16:29:08 -07:00
Kara Alexandra
ba3f0bf0e7 Add option to specify name without --name in volume create
Signed-off-by: Kara Alexandra <kalexandra@us.ibm.com>
2016-08-25 14:20:06 -07:00
Daniel Nephin
25587906d1 Merge pull request #25354 from dnephin/remove-mflag-from-dockerd
Convert docker and dockerd commands to spf13/cobra
2016-08-25 17:19:19 -04:00
Alexander Morozov
8d99dfbc69 Merge pull request #25978 from justincormack/no-no-gccgo
Remove gccgo support
2016-08-25 12:12:29 -07:00
Tonis Tiigi
e372883fcd Fix flaky TestEventsContainerFilterBeforeCreate
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-08-25 10:29:10 -07:00
Daniel Nephin
6e7405ebd4 Fix tests and windows service.
Support args to RunCommand
Fix docker help text test.
Fix for ipv6 tests.
Fix TLSverify option.
Fix TestDaemonDiscoveryBackendConfigReload
Use tempfile for another test.
Restore missing flag.
Fix tests for removal of shlex.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-25 13:09:36 -04:00
Vincent Demeester
0c6926070f Merge pull request #25816 from anusha-ragunathan/vol-plugin-list
Make `docker volume list` lookup plugins installed using new model.
2016-08-25 19:02:25 +02:00
Zhang Wei
b8464c1c9b Using waitExitOrRemoved for docker start
Currently start command will invoke getExitCode - which is based on
Inspect API - to get returned exit code after container exits.
There's two race conditions here:

if container is started with Restart Policy, there's chance that the
container is restarted quickly before it calls getExitCode, under such
circumstance, the exit code is wrong.

if container is started with --rm, it's possible that container is
removed before getExitCode, in this situation, you can't get correct
exit code either.

Replace getExitCode with waitExitOrRemoved can solve this problem.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-08-26 00:16:49 +08:00
Vincent Demeester
d13ad3ef76 Merge pull request #24073 from johnharris85/move-restart-policy-check-to-daemon
Move restart-policy validation from client to daemon.
2016-08-25 17:02:30 +02:00
Daniel Nephin
b29558ed5d Merge pull request #25426 from dnephin/better-int-testing-cmd
Remove duplicate RunCommand functions used for integration-cli
2016-08-24 11:34:24 -04:00
Justin Cormack
eda90f6344 Remove gccgo support
Since Go 1.7, s390x uses upstream Go, so we have no reason to
support gccgo any more.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-08-24 11:09:35 +01:00
Justin Cormack
fe125adb0f Merge pull request #25905 from yongtang/25000-docker-stats-NetworkDisabled
Fix issue in `docker stats` with `NetworkDisabled=true`
2016-08-24 10:53:56 +01:00
Yong Tang
9cb8fb6ea0 Fix AuthZ plugins headers change issue
This fix tries to address the issue raised in 25927 where
the HTTP headers have been chaged when AUthZ plugin is in
place.

This issue is that in `FlushAll` (`pkg/authorization/response.go`),
the headers have been written (with `WriteHeader`) before all the
headers have bee copied.

This fix fixes the issue by placing `WriteHeader` after.

A test has been added to cover the changes.`

This fix fixes 25927

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-23 21:08:23 -07:00
Yong Tang
7bb9c5397e Fix issue in docker stats with NetworkDisabled=true
This fix tries to address the issue in 25000 where `docker stats`
will not show network stats with `NetworkDisabled=true`.

The `NetworkDisabled=true` could be either invoked through
remote API, or through `docker daemon -b none`.

The issue was that when `NetworkDisabled=true` either by API or
by daemon config, there is no SandboxKey for container so an error
will be returned.

This fix fixes this issue by skipping obtaining SandboxKey if
`NetworkDisabled=true`.

Additional test has bee added to cover the changes.

This fix fixes 25000.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-23 16:04:06 -07:00
Daniel Nephin
243885808f Change to use c.Assert() instead of result.Assert()
Fix delete containers and make sure it prints errors correctly.
Rename Result.Fails to Result.Assert()
Create a constant for the default expected.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-23 15:12:36 -04:00
Daniel Nephin
d7022f2b46 Create a unified RunCommand function with Assert()
Remove some run functions and replace them with the unified run command.
Remove DockerCmdWithStdoutStderr
Remove many duplicate runCommand functions.
Also add dockerCmdWithResult()
Allow Result.Assert() to ignore the error message if an exit status is expected.
Fix race in DockerSuite.TestDockerInspectMultipleNetwork
Fix flaky test DockerSuite.TestRunInteractiveWithRestartPolicy

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-23 15:11:46 -04:00
Daniel Nephin
fb42e84772 Remove unnecessary json.Unmarshal wrapper.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-23 15:11:46 -04:00
Vincent Demeester
b97f985054 Merge pull request #25939 from YuPengZTE/printf
It is better to add "\n" in printf
2016-08-23 10:26:54 +02:00
YuPengZTE
9b015bd4fd It is better to add "\n" in printf
Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
2016-08-23 09:01:25 +08:00
Tonis Tiigi
96a27cf093 Update executor changes from swarmkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-08-22 11:36:20 -07:00
Brian Goff
4d95ea319c Use daemon exec root for swarm control socket
Right now docker puts swarm's control socket into the docker root dir
(e.g. /var/lib/docker).
This can cause some nasty issues with path length being > 108
characters, especially in our CI environment.

Since we already have some other state going in the daemon's exec root
(libcontainerd and libnetwork), I think it makes sense to move the
control socket to this location, especially since there are other unix
sockets being created here by docker so it must always be at a path that
works.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-08-19 16:43:57 -04:00
Vincent Demeester
09b929083d Merge pull request #23436 from yongtang/23367-out-of-band-volume-driver-deletion
Add `--force` in `docker volume rm` to fix out-of-band volume driver deletion
2016-08-19 22:09:57 +02:00
Sebastiaan van Stijn
ec8f20cbf2 Merge pull request #25665 from vdemeester/remove-deprecated-run-flag-from-commit
Remove -run flag from commit command.
2016-08-19 15:19:23 +02:00
Vincent Demeester
54ed156879
Remove -run flag from commit command.
This flag has been deprecated in version below 1.10 so it's safe to
remove now, according to our deprecation policy.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-08-19 13:14:03 +02:00
Yong Tang
6c5c34d50d Add --force in docker volume rm to fix out-of-band volume driver deletion
This fix tries to address the issue in raised #23367 where an out-of-band
volume driver deletion leaves some data in docker. This prevent the
reuse of deleted volume names (by out-of-band volume driver like flocker).

This fix adds a `--force` field in `docker volume rm` to forcefully purge
the data of the volume that has already been deleted.

Related documentations have been updated.

This fix is tested manually with flocker, as is specified in #23367.
An integration test has also been added for the scenario described.

This fix fixes #23367.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-18 18:01:25 -07:00
Doug Davis
282b0aff08 Merge pull request #24978 from yongtang/24912-build-with-progress
Add hint of progress to the output of `docker build`
2016-08-18 16:10:48 -04:00
Alexander Morozov
a1fece6821 Merge pull request #25808 from justincormack/parallel-tests
Run seccomp tests in series not parallel
2016-08-17 14:50:24 -07:00
Anusha Ragunathan
59c45f7c0a Make docker volume list lookup plugins installed using new model.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-08-17 13:27:43 -07:00
Justin Cormack
84ec04306c Run seccomp tests in series not parallel
Fix #24803 as this had been failing sometimes.

As the parallel tests are probably genuine failures, and
had already been cut down, I will re-create these specifically
as a parallel execution test with no seccomp to make the
cause clearer.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-08-17 18:48:06 +01:00
Vincent Demeester
10a3a269a0 Merge pull request #25783 from tonistiigi/fix-retry
Fix retry logic for out of sequence errors
2016-08-17 09:56:06 +02:00
Tonis Tiigi
157561e95c Fix retry logic for out of sequence errors
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-08-16 18:57:01 -07:00
Sebastiaan van Stijn
1a2038c54f Remove unused "size" query parameter for images
Image inspect doesn't have a "size" query parameter.
The client sent this (when doing `docker inspect --size`),
but was unused in the daemon.

This removes the unused parameter, and a test that
didn't actually test anything.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-08-17 01:19:07 +02:00
Tibor Vass
1225e3e621 Merge pull request #25765 from tonistiigi/publish-add
Add retry checks to TestSwarmPublishAdd
2016-08-16 13:30:31 -07:00
Tonis Tiigi
7bd1c11959 Add retry checks to TestSwarmPublishAdd
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-08-16 10:39:05 -07:00
Tõnis Tiigi
9a3e7d9e34 Merge pull request #25701 from WeiZhang555/update-conflict-rm-restart
Forbid update restart policy of container with AutoRemove flag
2016-08-16 10:37:45 -07:00
Sebastiaan van Stijn
348f6529b7 Merge pull request #23808 from AkihiroSuda/formatinfo
add `--format` flag to `docker info`
2016-08-16 12:04:26 +02:00
Zhang Wei
4754c64ab5 Forbid update restart policy of container with AutoRemove flag
"--restart" and "--rm" are conflict options, if a container is started
with AutoRemove flag, we should forbid the update action for its Restart
Policy.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-08-16 15:36:13 +08:00
John Howard
3c6f4cd5a6 Merge pull request #25143 from cpuguy83/update_go-check
Add stack dumps from the daemon(s) on test timeout
2016-08-15 22:09:20 -07:00
Akihiro Suda
dc38c9a047 add --format flag to docker info
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-08-16 04:03:52 +00:00
Tõnis Tiigi
90be7a591d Merge pull request #25482 from yuexiao-wang/close_pipe
Close pipe after using pipe
2016-08-15 13:02:59 -07:00
Tonis Tiigi
34f779dbc3 Clear raft state file after every test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-08-12 17:30:37 -07:00
Tõnis Tiigi
b08a1c3fe4 Merge pull request #25660 from justincormack/no-fuse-dev
Do not create /dev/fuse by default
2016-08-12 10:05:16 -07:00
Michael Crosby
be045ee2da Merge pull request #25628 from cpuguy83/carry_21567_filter_vol_by_label
Carry 21567 filter vol by label
2016-08-12 09:43:45 -07:00
Justin Cormack
39ecc08f32 Do not create /dev/fuse by default
This device is not required by the OCI spec.

The rationale for this was linked to docker/docker#2393

So a non functional /dev/fuse was created, and actual fuse use still is
required to add the device explicitly. However even old versions of the JVM
on Ubuntu 12.04 no longer require the fuse package, and this is all not
needed.

See also https://github.com/opencontainers/runc/pull/983 although this
change alone stops the fuse device being created.

Tested and does not change actual ability to use fuse.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-08-12 12:33:42 +01:00
Anusha Ragunathan
4d009084de Fix deadlock on plugin shutdown.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-08-11 19:36:32 -07:00
Kai Qiang Wu(Kennan)
1a72934cd5 Add label filter support for volume
Since we added labels for volume, it is desired to have
filter support label for volume

Closes: #21416
Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
2016-08-11 13:08:04 -04:00
Yong Tang
b487497cd2 Idempotent service update --publish-add
This fix tries to address the issue raised in 25375 where
`service update --publish-add` returns an error if the exact
same value is repeated (idempotent).

This fix use a map to filter out repeated port configs so
that `--publish-add` does not error out.

An integration test has been added.

This fix fixes 25375.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-10 18:03:43 -07:00
Brian Goff
e34244842c Ignore socket rm errors on daemon suite teardown
Errors here are not important and not really related to set success/failure.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-08-10 15:18:35 -04:00
Alexander Morozov
64605d709f Merge pull request #23951 from allencloud/defer-os-file-close
add defer file.Close to avoid potential fd leak
2016-08-10 11:07:15 -07:00
Brian Goff
82dd2c3159 Make test suites dump daemon stack on test timeout
Use `OnTimeout` callback on test timeouts to trigger a stack dump for
running daemons. This will help analyze stuck tests.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-08-10 10:26:30 -04:00
allencloud
0ead624473 add defer file.Close to avoid potential fd leak
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-08-10 08:36:09 +08:00
Alexander Morozov
eb28dde01f Merge pull request #25518 from yuexiao-wang/add-debug-info
add more info for debugging
2016-08-09 11:56:09 -07:00
Sebastiaan van Stijn
8233e2b54d Merge pull request #25461 from coolljt0725/fix_update_mem
Fix update memory without memoryswap
2016-08-09 16:02:55 +02:00
yuexiao-wang
5882a9ea17 add more info for debugging
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-08-09 17:06:44 +08:00
Zhang Wei
da6609ccdc Fix typo
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-08-09 09:42:23 +08:00
Zhang Wei
6dd8e10d6e Wait container's removal via Events API
If AutoRemove is set, wait until client get `destroy` events, or get
`detach` events that implies container is detached but not stopped.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-08-08 22:46:53 +08:00
Zhang Wei
3c2886d8a4 Move --rm to daemon side
`--rm` is a client side flag which caused lots of problems:
1. if client lost connection to daemon, including client crash or be
killed, there's no way to clean garbage container.
2. if docker stop a `--rm` container, this container won't be
autoremoved.
3. if docker daemon restart, container is also left over.
4. bug: `docker run --rm busybox fakecmd` will exit without cleanup.

In a word, client side `--rm` flag isn't sufficient for garbage
collection. Move the `--rm` flag to daemon will be more reasonable.

What this commit do is:
1. implement a `--rm` on daemon side, adding one flag `AutoRemove` into
HostConfig.
2. Allow `run --rm -d`, no conflicting `--rm` and `-d` any more,
auto-remove can work on detach mode.
3. `docker restart` a `--rm` container will succeed, the container won't
be autoremoved.

This commit will help a lot for daemon to do garbage collection for
temporary containers.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-08-08 22:46:53 +08:00
Sebastiaan van Stijn
2684459ed4 Merge pull request #23718 from yongtang/23498-entrypoint-unset
Allow unset `--entrypoint` in `docker run` or `docker create`
2016-08-08 14:38:01 +02:00
Lei Jitang
92394785fa Fix update memory without memoryswap
The memory should always be smaller than memoryswap,
we should error out with message that user know how
to do rather than just an invalid argument error if
user update the memory limit bigger than already set
memory swap.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-08-08 18:36:03 +08:00
yuexiao-wang
256310e962 close pipe after using pipe
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-08-08 15:16:01 +08:00
yuexiao-wang
427869fe94 modify func namt from TestUserAgentPassThroughOnPull to TestUserAgentPassThrough
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-08-08 11:40:20 +08:00
johnharris85
94e95e4711 Move restart-policy validation from client to daemon.
Signed-off-by: John Harris <john@johnharris.io>
2016-08-06 20:09:47 -07:00
Yong Tang
c8d3ee8093 Allow unset --entrypoint in docker run or docker create
This fix tries to address the issue raised in #23498 to allow unset
`--entrypoint` in `docker run` or `docker create`.

This fix checks the flag `--entrypoint` and, in case `--entrypoint=` (`""`)
is passed, unset the Entrypoint during the container run.

Additional integration tests have been created to cover changes in this fix.

This fix fixes #23498.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-05 16:35:20 -07:00
Tõnis Tiigi
4c528ae719 Merge pull request #25402 from lixiaobing10051267/masterChmod
Fatal info not identical with actual chmod intent
2016-08-05 08:42:30 -07:00
Vincent Demeester
1ccd9d3137 Merge pull request #23475 from vdemeester/add-format-flag-to-network-and-volume-ls
Add format flag to network and volume ls
2016-08-05 15:17:45 +02:00
Vincent Demeester
29fef34139 Merge pull request #25387 from yongtang/25374-ps-filter-order
Sort output of `docker ps --filter` with order by creation time
2016-08-05 14:47:10 +02:00
Vincent Demeester
85428a1a53 Merge pull request #25096 from vieux/docker_plugin_remove_force
Add --force to docker plugin remove
2016-08-05 14:45:05 +02:00
Vincent Demeester
f570fbb9ba Merge pull request #25401 from lixiaobing10051267/masterConfig
Docker api inspect assert HostConfig
2016-08-05 14:11:29 +02:00
Yong Tang
3f97133546 Sort output of docker ps --filter with order by creation time
This fix tries to address the issue raised in 25374 where the
output of `docker ps --filter` is in random order and
not deterministic.

This fix sorts the list of containers by creation time so that the
output is deterministic.

An integration test has been added.

This fix fixes 25374.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-08-04 19:27:50 -07:00
Victor Vieux
0016b331da Add --force to docker plugin remove
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-08-04 15:55:45 -07:00
Alexander Morozov
979d48bbf5 Merge pull request #23902 from dnephin/inspect-to-cobra
Convert inspect command to Cobra
2016-08-04 11:20:43 -07:00
Brian Goff
af51c9704c Merge pull request #25370 from thaJeztah/move-experimental-test
Move TestInspectNamedMountPoint integrationtest from experimental
2016-08-04 11:12:46 -04:00
lixiaobing10051267
86c72aa01f Docker api inspect Assert HostConfig
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
2016-08-04 23:01:16 +08:00
Vincent Demeester
a488ad1a09
Add volume --format flag to ls
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-08-04 14:59:55 +02:00
Vincent Demeester
a8aaafc4a3
Add network --format flag to ls
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-08-04 14:59:51 +02:00
lixiaobing10051267
bd0ec7ed55 Fatal info not identical with actual chmod intent
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
2016-08-04 20:14:15 +08:00
Michael Crosby
94b1bb82e1 Decrease sleep to 2 seconds
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-08-03 15:25:27 -07:00
Michael Crosby
cfde8e7855 Change number of pings to 1
This cuts the test time down from 6s to 2s

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-08-03 13:30:34 -07:00
Michael Crosby
2f3b7f08a0 Make network stats version test concurrent
This change makes the test run go down from 10s to 2s

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-08-03 13:24:55 -07:00
Michael Crosby
3ffa5f6149 Remove build 60 steps
This test is already covered in the individual graph driver tests and it
adds 15s to the test run without adding value.  The original idea was to
test max number of layers, this is fulfilled by the graph drivers.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-08-03 13:16:01 -07:00
Daniel Nephin
fab2a3dc82 Ignore 'not a swarm error' when inspecting a task.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-08-03 12:22:07 -04:00
Sebastiaan van Stijn
6f2e820502
Move TestInspectNamedMountPoint integrationtest from experimental
This feature is no longer experimental, and should
now work on Windows too

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-08-03 16:21:38 +02:00
Vincent Demeester
4a94a6513b Merge pull request #25341 from tonistiigi/fix-pending-tests
Fix swarm pending state tests
2016-08-03 16:12:43 +02:00
Sebastiaan van Stijn
10ae908bfa Merge pull request #25159 from diogomonica/adding-force-to-node-remove
Adding force to node rm
2016-08-02 22:49:15 +02:00
Tonis Tiigi
fa3b5964b9 Fix swarm pending state tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-08-02 11:39:05 -07:00
Alexander Morozov
c73b054ae3 Merge pull request #25300 from duglin/FixEnv
Don't allow empty env names
2016-08-02 09:45:28 -07:00
Qiang Huang
da5d66fb70 Fix TestUpdateKernelMemoryUninitialized on new kernel version
Fixes: #25073

Update kernel memory on running containers without initialized
is forbidden only on kernel version older than 4.6.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-08-02 13:17:20 +08:00
Diogo Monica
a327c231b5 Add --force to node removal
Signed-off-by: Diogo Monica <diogo.monica@gmail.com>
2016-08-01 18:55:58 -07:00
Aaron Lehmann
f35c4343f3 Merge pull request #24878 from dongluochen/swarmConstraintTest
Add integration test for constraints
2016-08-01 17:45:23 -06:00
Sebastiaan van Stijn
f23c3a1263 Merge pull request #25171 from cpuguy83/23545_test_sockets_in_separate_dir
Use temp dir for integration daemon sockets
2016-08-02 01:21:22 +02:00
Alexander Morozov
415c0f12d2 Merge pull request #24947 from dnephin/integration-remove-cmdwithargs
Remove CmdWithArgs from integration-cli
2016-08-01 14:56:08 -07:00
Tibor Vass
3c46c3481f Merge pull request #25187 from anusha-ragunathan/plugin-delete
Remove plugin root from filesystem.
2016-08-01 14:33:30 -07:00
Anusha Ragunathan
5690730a74 Remove plugin root from filesystem.
`docker plugin remove` didnt actually remove plugin from disk. Fix that.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-08-01 10:46:50 -07:00
Doug Davis
e72c0137af Don't allow empty env names
Closes: #25281

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-08-01 10:25:51 -07:00
Vincent Demeester
2b90eaa596 Merge pull request #25258 from yongtang/24547-remove-require-network-from-swarm-tests
Remove testRequires(c, Network) from swarm integration tests
2016-08-01 13:33:36 +02:00
Sebastiaan van Stijn
b38c25ad41 Merge pull request #25224 from michael-holzheu/PR-TestRunSeccompUnconfinedCloneUserns-check
TestRunSeccompUnconfinedCloneUserns: Check for unprivileged_userns_clone
2016-07-31 17:03:36 +01:00
Yong Tang
85c9ef8a47 Remove testRequires(c, Network) from swarm integration tests
Since 24237 has been merged, it is not necessary to require network
for swarm integration tests (`integration-cli/docker_api_swarm_test.go`)
any more.

This fix removes testRequires(c, Network) from swarm integration
tests.

This fix could be verified by disable networking, and all related
tests pass.

This fix is related to 24547, 24490, 24237.

This fix fixes 24547.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-07-30 09:59:30 -07:00
Alexander Morozov
307b7b0d15 integration: drain node before stop in TestApiSwarmForceNewCluster
It's too long to wait for reschedule.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-07-29 10:44:30 -07:00
Brian Goff
10fcd30a90 Merge pull request #24020 from yongtang/23973-rename-with-linked-container
Fix docker rename with linked containers
2016-07-29 12:24:35 -04:00
Michael Holzheu
87e4e3af68 TestRunSeccompUnconfinedCloneUserns: Check for unprivileged_userns_clone
On Ubuntu and Debian there is a sysctl which allows to block
clone(CLONE_NEWUSER) via "sysctl kernel.unprivileged_userns_clone=0"
for unprivileged users that do not have CAP_SYS_ADMIN.

See: https://lists.ubuntu.com/archives/kernel-team/2016-January/067926.html

The DockerSuite.TestRunSeccompUnconfinedCloneUserns testcase fails if
"kernel.unprivileged_userns_clone" is set to 0:

 docker_cli_run_unix_test.go:1040:
    c.Fatalf("expected clone userns with --security-opt seccomp=unconfined
              to succeed, got %s: %v", out, err)
 ... Error: expected clone userns with --security-opt seccomp=unconfined
              to succeed, got clone failed: Operation not permitted
 : exit status 1

So add a check and skip the testcase if kernel.unprivileged_userns_clone is 0.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
2016-07-29 12:16:03 -04:00
Vincent Demeester
3d42bf5f12 Merge pull request #23759 from AkihiroSuda/cobraexec
Migrate exec command to cobra
2016-07-29 07:41:02 +02:00
Akihiro Suda
9d9dff3d0d Migrate exec command to cobra
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-07-29 02:10:36 +00:00
Daniel Nephin
c0d2f7b338 Remove unnecessary CmdWithArgs
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-07-28 20:14:14 -04:00
Daniel Nephin
0ec20a3c01 Remove hack from test name.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-07-28 20:12:36 -04:00
Kenfe-Mickael Laventure
ff62681d59 Add live-restore state to daemon reload event
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-07-28 17:10:40 -07:00
Kenfe-Mickael Laventure
189aaf8aea Add live-restore state to docker info output
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-07-28 17:10:40 -07:00
Alexander Morozov
ca43efb40e Merge pull request #24502 from allencloud/change-comparison-log-in-container-config
update comparison log in container config
2016-07-28 16:51:11 -07:00
Michael Crosby
262063531a Merge pull request #25077 from cpuguy83/fix_TestApiSwarmRestartCluster
Fix race in `TestApiSwarmRestartCluster`
2016-07-28 10:15:31 -07:00
Brian Goff
4804eb700c Use temp dir for integration daemon sockets
Instead of using the bundles dir, which may be mounted in and ultimately
break if using b2d/d4mac/d4win. This makes it much easier to collect
test daemon logs and more natural for use d4mac/d4win users to run tests.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-07-28 12:53:56 -04:00
Sebastiaan van Stijn
8a8a63aa32 Merge pull request #25137 from justincormack/32bit-seccomp-test
Add a test that the default seccomp profile allows execution of 32 bit binaries
2016-07-28 17:01:04 +02:00
Sebastiaan van Stijn
1a7d339d36 Merge pull request #24816 from stevvooe/service-ps-over-tasks
cli: `docker service|node|stack ps` instead of tasks
2016-07-27 23:13:28 +02:00
Michael Crosby
297745b1cd Merge pull request #24760 from anusha-ragunathan/plugin-events
Make daemon events listen for plugin lifecycle events.
2016-07-27 13:36:49 -07:00
Stephen J Day
0aa4e1e689
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>
2016-07-27 11:06:42 -07:00
Justin Cormack
93bbc76ee5 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>
2016-07-27 18:42:34 +01:00
Sebastiaan van Stijn
2c947a4b00 Merge pull request #25067 from lixiaobing10051267/masterBreak
Add break after found = true
2016-07-27 14:44:13 +02:00
Sebastiaan van Stijn
e07ff10f70 Merge pull request #25104 from cpuguy83/fix_TestApiSwarmRaftQuorum
fix race in TestApiSwarmRaftQuorum
2016-07-27 12:50:09 +02:00
Vincent Demeester
ef63637b99 Merge pull request #25107 from stevvooe/cleanup-leader-election-test
integration-cli: cleanup leader election tests
2016-07-27 12:47:33 +02:00
Brian Goff
5d65ba4ca7 Merge pull request #25085 from aaronlehmann/restart-delay-integration-tests
Specify a lower restart delay for swarm integration tests
2016-07-26 22:18:28 -04:00
Stephen J Day
946e23776b
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>
2016-07-26 19:12:27 -07:00
Brian Goff
4a856d7a87 fix race in TestApiSwarmRaftQuorum
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-07-26 21:32:56 -04:00
Aaron Lehmann
c93c649258 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>
2016-07-26 12:12:43 -07:00
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
Brian Goff
fdcde8bb65 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>
2016-07-26 14:37:18 -04:00
Anusha Ragunathan
42abccb841 Make daemon events listen for plugin lifecycle events.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-07-26 10:51:47 -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
lixiaobing10051267
8928677ea2 Add break after found = true
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
2016-07-26 23:28:44 +08: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
Yong Tang
35418c1455 Add hint of progress to the output of docker build
This fix tries to address the issue raised in 24912 where docker
build only consists of the current step without overall total steps.

This fix adds the overall total steps so that end user could follow
the progress of the docker build.

An additonal test has been added to cover the changes.

This fix fixes 24912.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-07-24 08:13:58 -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
Dong Chen
1b1a7f29e5 Add integration test for constraints.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2016-07-21 18:08:49 -07:00