Commit Graph

3740 Commits

Author SHA1 Message Date
edf9053174 Merge pull request #25317 from yongtang/25304-docker-service-create-group
Support `--group` in `docker service create`
Upstream-commit: d09c04a667fc2895650b0c2bb25e28fb226e3f31
Component: engine
2016-08-29 10:27:31 -04:00
97464f18e4 Merge pull request #25990 from vieux/plugin_inspect
add -f to plugin inspect
Upstream-commit: bf0077c138a1cf64a42828014c44f8e2b2001703
Component: engine
2016-08-28 17:03:40 +02:00
63926fbdf3 Merge pull request #26055 from mavenugo/ndn
Support container disconnect for non-existing network
Upstream-commit: 9ea28ea8944744d9dc8f50bdc1733868fda6ce7f
Component: engine
2016-08-28 01:48:02 +00:00
bdcdcdfff5 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>
Upstream-commit: b31969ee365f582eb71a7962af9638d79380cd54
Component: engine
2016-08-27 11:54:05 -07:00
8bee71dfee 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>
Upstream-commit: 05a3f2666ee34c2dfa04663bbdda3c7763b001d8
Component: engine
2016-08-26 16:48:52 -07:00
67ccfbdecc Merge pull request #25424 from vieux/enabled
replace active by enabled for consistency in plugins
Upstream-commit: ed0dff8f16716b4f6debfc191124e98750dd05bb
Component: engine
2016-08-26 15:22:41 -07:00
24f71df076 Merge pull request #25861 from WeiZhang555/wait-remove-for-start
Using waitExitOrRemoved for `docker start`
Upstream-commit: bdadcfc1bbb04950c4835cfa4d75f0e480555a2f
Component: engine
2016-08-26 13:36:56 -07:00
d5c2d4c2f5 Merge pull request #23830 from ardnaxelarak/23345_remove_name_from_volume_create
remove --name flag from volume create
Upstream-commit: 5168c93419547338b11f5d24d24a2a025ea64524
Component: engine
2016-08-26 21:52:07 +02:00
71cbf188b7 Merge pull request #23614 from icecrime/inspect_services
Allow `docker inspect` on all types
Upstream-commit: 6e85b81df2f0a2485b74409813eaa77a2b366685
Component: engine
2016-08-26 18:45:23 +00:00
0fa4cceabc Merge pull request #25177 from cpuguy83/fix_TestDaemonDiscoveryBackendConfigReload
TestDaemonDiscoveryBackendConfigReload behavior
Upstream-commit: 175f6eb55f61b5caf915db9bd6786a2f2d9103da
Component: engine
2016-08-26 10:54:48 -07:00
aa95624624 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>
Upstream-commit: 20f99a8634accf54a923982f8c9a3b6719933f74
Component: engine
2016-08-26 11:02:04 -04:00
e357d485dd add -f to plugin inspect
Signed-off-by: Victor Vieux <vieux@docker.com>

Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 63a19edcb18b1bc650cc1d6eed78c2c3b376be62
Component: engine
2016-08-25 22:40:05 -07:00
6068b202c6 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>
Upstream-commit: c7045eb93523df76feb9f3e00540e69471a1855e
Component: engine
2016-08-25 22:11:23 -07:00
e44f33953e replace active by enabled for consistency in plugins
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: cf4e268115911e9e4a4da94dc00b2dc370f86a47
Component: engine
2016-08-25 20:42:49 -07:00
83ee5a765b Refactor docker inspect to work on all types
Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
Upstream-commit: 3db9f7afce03b1926fd6ba22483ebf0d76d2a1da
Component: engine
2016-08-25 16:29:08 -07:00
346f8a271b Add option to specify name without --name in volume create
Signed-off-by: Kara Alexandra <kalexandra@us.ibm.com>
Upstream-commit: ba3f0bf0e7d4f94eb94023278adcfad4ca8fe9d7
Component: engine
2016-08-25 14:20:06 -07:00
de17e6a998 Merge pull request #25354 from dnephin/remove-mflag-from-dockerd
Convert docker and dockerd commands to spf13/cobra
Upstream-commit: 25587906d122c4fce0eb1fbd3dfb805914455f59
Component: engine
2016-08-25 17:19:19 -04:00
4cad859c7a Merge pull request #25978 from justincormack/no-no-gccgo
Remove gccgo support
Upstream-commit: 8d99dfbc69a18cbf1e604b845df76fdedcf2e853
Component: engine
2016-08-25 12:12:29 -07:00
8ad0a6fe8f 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>
Upstream-commit: 6e7405ebd4df360bc84f651c977ece31283eb3ee
Component: engine
2016-08-25 13:09:36 -04:00
87a50d0cba Merge pull request #25816 from anusha-ragunathan/vol-plugin-list
Make `docker volume list` lookup plugins installed using new model.
Upstream-commit: 0c6926070f775987de19e34e6f8da95cae156195
Component: engine
2016-08-25 19:02:25 +02:00
b2a5cc3911 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>
Upstream-commit: b8464c1c9baf6714242cbd9b834344eff2ebfba8
Component: engine
2016-08-26 00:16:49 +08:00
84a36bbfd3 Merge pull request #24073 from johnharris85/move-restart-policy-check-to-daemon
Move restart-policy validation from client to daemon.
Upstream-commit: d13ad3ef7684bf330cec2eaa4a14048e3fbc2d94
Component: engine
2016-08-25 17:02:30 +02:00
3db3e5b8dc Merge pull request #25426 from dnephin/better-int-testing-cmd
Remove duplicate RunCommand functions used for integration-cli
Upstream-commit: b29558ed5d68712a40d840e289ada232f912659f
Component: engine
2016-08-24 11:34:24 -04:00
4d71bb6be2 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>
Upstream-commit: eda90f63446253f97d2011926555306f2417d208
Component: engine
2016-08-24 11:09:35 +01:00
f52ef9bb09 Merge pull request #25905 from yongtang/25000-docker-stats-NetworkDisabled
Fix issue in `docker stats` with `NetworkDisabled=true`
Upstream-commit: fe125adb0f12121836ec55ebae0723410a9ed790
Component: engine
2016-08-24 10:53:56 +01:00
1a72f2bb5c 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>
Upstream-commit: 9cb8fb6ea03fcd78010ce7dd33585d96cd73e38c
Component: engine
2016-08-23 21:08:23 -07:00
3a11a917d1 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>
Upstream-commit: 7bb9c5397e69866fcb1142cda430b842a710f751
Component: engine
2016-08-23 16:04:06 -07:00
0d4234bb46 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>
Upstream-commit: 243885808f5c69143679d094d964d333c47e69bf
Component: engine
2016-08-23 15:12:36 -04:00
eaa727c6e2 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>
Upstream-commit: d7022f2b46589cb9d860219e1d8278351ba147c3
Component: engine
2016-08-23 15:11:46 -04:00
2b0a71c4f1 Remove unnecessary json.Unmarshal wrapper.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: fb42e8477208badf0714a9d8ae20946a9b531dba
Component: engine
2016-08-23 15:11:46 -04:00
0a33808f15 Merge pull request #25939 from YuPengZTE/printf
It is better to add "\n" in printf
Upstream-commit: b97f985054b2eea3e9ee10cc8f10c5e61ded4f9b
Component: engine
2016-08-23 10:26:54 +02:00
4d10a59191 It is better to add "\n" in printf
Signed-off-by: YuPengZTE <yu.peng36@zte.com.cn>
Upstream-commit: 9b015bd4fd7716243564250ada0e3797c0f29fcb
Component: engine
2016-08-23 09:01:25 +08:00
32e409f5b7 Update executor changes from swarmkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 96a27cf0931974b602acfdd74dfcc5142500c7ba
Component: engine
2016-08-22 11:36:20 -07:00
e3afe81751 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
Upstream-commit: 09b929083d34836a78ce8ee79b22aea082712072
Component: engine
2016-08-19 22:09:57 +02:00
5f54e81cc1 Merge pull request #25665 from vdemeester/remove-deprecated-run-flag-from-commit
Remove -run flag from commit command.
Upstream-commit: ec8f20cbf2edba00e645175675e8dca7c03b1350
Component: engine
2016-08-19 15:19:23 +02:00
ac9a57031e 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>
Upstream-commit: 54ed156879352afb06ecb94fa7b6518a39eb5fd2
Component: engine
2016-08-19 13:14:03 +02:00
a603b90d7f 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>
Upstream-commit: 6c5c34d50d377d1c5318a255240fb2dc9c23cf92
Component: engine
2016-08-18 18:01:25 -07:00
db8cc1fdde Merge pull request #24978 from yongtang/24912-build-with-progress
Add hint of progress to the output of `docker build`
Upstream-commit: 282b0aff08030a2521adf7d64bdd333f0864b720
Component: engine
2016-08-18 16:10:48 -04:00
02f0dc9ea5 Merge pull request #25808 from justincormack/parallel-tests
Run seccomp tests in series not parallel
Upstream-commit: a1fece68211826386612ba16526543ba052a46dd
Component: engine
2016-08-17 14:50:24 -07:00
78f61f4f99 Make docker volume list lookup plugins installed using new model.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 59c45f7c0a5ba183f393e61e7ca7597809463410
Component: engine
2016-08-17 13:27:43 -07:00
f6d6194ce9 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>
Upstream-commit: 84ec04306caac458c237881b1869fb2b077fced4
Component: engine
2016-08-17 18:48:06 +01:00
d8621fcdfc Merge pull request #25783 from tonistiigi/fix-retry
Fix retry logic for out of sequence errors
Upstream-commit: 10a3a269a0c61bd63d6c694975bbe37aaf66672b
Component: engine
2016-08-17 09:56:06 +02:00
449509c833 Fix retry logic for out of sequence errors
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 157561e95ccaef883fe106a38741acb3d493879f
Component: engine
2016-08-16 18:57:01 -07:00
5bc44a5476 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>
Upstream-commit: 1a2038c54faedeb6d7adf6ddaf0e73f8ce4920d4
Component: engine
2016-08-17 01:19:07 +02:00
376bb6885c Merge pull request #25765 from tonistiigi/publish-add
Add retry checks to TestSwarmPublishAdd
Upstream-commit: 1225e3e6216b0388ed5f3985d7263efdb6e22043
Component: engine
2016-08-16 13:30:31 -07:00
918ec07087 Add retry checks to TestSwarmPublishAdd
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 7bd1c1195998c10c732ccfa67c568e634d58166e
Component: engine
2016-08-16 10:39:05 -07:00
a413b2d6cd Merge pull request #25701 from WeiZhang555/update-conflict-rm-restart
Forbid update restart policy of container with AutoRemove flag
Upstream-commit: 9a3e7d9e343938218aac8217c4b8ba4c21b841c4
Component: engine
2016-08-16 10:37:45 -07:00
cd9750292a Merge pull request #23808 from AkihiroSuda/formatinfo
add `--format` flag to `docker info`
Upstream-commit: 348f6529b71502b561aa493e250fd5be248da0d5
Component: engine
2016-08-16 12:04:26 +02:00
d1bde01a82 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>
Upstream-commit: 4754c64ab5b5bf5ae6f8a3040606296910e6cb19
Component: engine
2016-08-16 15:36:13 +08:00
a3a8b4ee81 Merge pull request #25143 from cpuguy83/update_go-check
Add stack dumps from the daemon(s) on test timeout
Upstream-commit: 3c6f4cd5a6c0de3d3700ad14bb8f177e8e1198fd
Component: engine
2016-08-15 22:09:20 -07:00