Commit Graph

3719 Commits

Author SHA1 Message Date
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
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
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
1b140377f0 add --format flag to docker info
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: dc38c9a04705f0a9ad3e007f7869cfb6a8a3a8b8
Component: engine
2016-08-16 04:03:52 +00:00
07a4c41b9a Merge pull request #25482 from yuexiao-wang/close_pipe
Close pipe after using pipe
Upstream-commit: 90be7a591de1f30332827a003edc39065fb8e4a7
Component: engine
2016-08-15 13:02:59 -07:00
9a71475504 Clear raft state file after every test
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 34f779dbc34fc391a86398521ad5c7ec84a0382d
Component: engine
2016-08-12 17:30:37 -07:00
b6188d5df3 Merge pull request #25660 from justincormack/no-fuse-dev
Do not create /dev/fuse by default
Upstream-commit: b08a1c3fe48472d7b688429e10695eb9132d2577
Component: engine
2016-08-12 10:05:16 -07:00
c49627f859 Merge pull request #25628 from cpuguy83/carry_21567_filter_vol_by_label
Carry 21567 filter vol by label
Upstream-commit: be045ee2da7c2c83e859d86cb496e86ec6de8566
Component: engine
2016-08-12 09:43:45 -07:00
e6beba2d43 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>
Upstream-commit: 39ecc08f327451e4fc30f15a6fb3bd4c979acc73
Component: engine
2016-08-12 12:33:42 +01:00
cdfc3ebd94 Fix deadlock on plugin shutdown.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 4d009084de8cad94a180130eb57efa2a98df6d98
Component: engine
2016-08-11 19:36:32 -07:00
29b14d83fb 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>
Upstream-commit: 1a72934cd5cb369f75e7bd5714eb579a053b95a9
Component: engine
2016-08-11 13:08:04 -04:00
932aa61090 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>
Upstream-commit: b487497cd2d7586fd7e10affdcc514ca6b7884f6
Component: engine
2016-08-10 18:03:43 -07:00
f2ff00f808 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>
Upstream-commit: e34244842ca968ff96769d1b5eab52fecddee80d
Component: engine
2016-08-10 15:18:35 -04:00
cb1c855c27 Merge pull request #23951 from allencloud/defer-os-file-close
add defer file.Close to avoid potential fd leak
Upstream-commit: 64605d709f9bf5677d513d6ed78d63fffadc697d
Component: engine
2016-08-10 11:07:15 -07:00
1c05db53d1 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>
Upstream-commit: 82dd2c3159993fd32f4a8f27b92699a6287c215a
Component: engine
2016-08-10 10:26:30 -04:00
1c502571ef add defer file.Close to avoid potential fd leak
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 0ead624473b6bddc232b46bc7c76ab4f9c743ff5
Component: engine
2016-08-10 08:36:09 +08:00
b9457de055 Merge pull request #25518 from yuexiao-wang/add-debug-info
add more info for debugging
Upstream-commit: eb28dde01f165849bf372e18200e83042c76f26c
Component: engine
2016-08-09 11:56:09 -07:00
bc307a89de Merge pull request #25461 from coolljt0725/fix_update_mem
Fix update memory without memoryswap
Upstream-commit: 8233e2b54d8c88d9c5845cbd30d54e7d5d8cb852
Component: engine
2016-08-09 16:02:55 +02:00
1a12027160 add more info for debugging
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 5882a9ea171b4cade430da8428beec180d0af952
Component: engine
2016-08-09 17:06:44 +08:00
31e42c852b Fix typo
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: da6609ccdca80c587410b0b13606842412e329bd
Component: engine
2016-08-09 09:42:23 +08:00
34a323258f 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>
Upstream-commit: 6dd8e10d6ed7a7371c5c1824ad58c4403a7b3bfd
Component: engine
2016-08-08 22:46:53 +08:00
b27f1b6d73 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>
Upstream-commit: 3c2886d8a45d8e79b00ab413d91f1af871b58d0a
Component: engine
2016-08-08 22:46:53 +08:00
63356b5588 Merge pull request #23718 from yongtang/23498-entrypoint-unset
Allow unset `--entrypoint` in `docker run` or `docker create`
Upstream-commit: 2684459ed433125257ffde5e95666ff785f26ec2
Component: engine
2016-08-08 14:38:01 +02:00
2dac8a0018 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>
Upstream-commit: 92394785fa3e55b19402fc762c030d28b36b6cfc
Component: engine
2016-08-08 18:36:03 +08:00