Commit Graph

4264 Commits

Author SHA1 Message Date
e6fc7a5576 Merge pull request #29599 from anusha-ragunathan/refcount
Enforce zero plugin refcount during disable, not remove.
Upstream-commit: d1dfc1a5ef95dc5621a07915f9786199442043c7
Component: engine
2016-12-22 15:38:54 -08:00
9eac558235 Enforce zero plugin refcount during disable.
When plugins have a positive refcount, they were not allowed to be
removed. However, plugins could still be disabled when volumes
referenced it and containers using them were running.

This change fixes that by enforcing plugin refcount during disable.
A "force" disable option is also added to ignore reference refcounting.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 8cb2229cd18c53bdbf36301f26db565a50027d6a
Component: engine
2016-12-22 13:26:53 -08:00
8c06810847 Merge pull request #29483 from vdemeester/extract-and-refactor-requirement
[test-integration] Refactor and extract TestRequire functionality
Upstream-commit: f847a3b7ceb00e81617e5219e1dc5c08777f6481
Component: engine
2016-12-22 10:24:51 +01:00
95815b8282 Merge pull request #29536 from vdemeester/integration-privateRegistryURL-const
[test-integration] Make privateRegistryURL (and dockerd) constant
Upstream-commit: 9b5484e8c7c6688e654a553c326d7a8761c4faf1
Component: engine
2016-12-22 10:23:35 +01:00
d278ea531e Merge pull request #29605 from cpuguy83/fix_container_list
Refactor cleanup of paused test containers
Upstream-commit: 6b94be3521290a791a641df2528def86925ba6ff
Component: engine
2016-12-22 10:22:58 +01:00
2a01e88f4e Refactor and extract TestRequire functionality
This will help when extracting suites in their own package.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 930a9869f6cb13bcdd44def2d445cb4505f2dd50
Component: engine
2016-12-21 22:39:33 +01:00
2d06f72bfb Make privateRegistryURL (and dockerd) constant
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: be88dd10324d8ecaa13170703c6e250b1c69fe73
Component: engine
2016-12-21 22:34:55 +01:00
4313743ab7 Merge pull request #29212 from yongtang/29185-docker-inspect
Fix `docker plugin inspect <unkown object>` issue on Windows
Upstream-commit: e91604c0d2d15cacd06e911cab360291a79e5f37
Component: engine
2016-12-21 15:47:17 -05:00
60c04ae8d4 Merge pull request #28714 from thaJeztah/move-logdriver-check-to-daemon
move check for supported drivers to daemon
Upstream-commit: 267d6935c5dcb806d24df8dd78d3d053773f8c19
Component: engine
2016-12-21 13:47:30 -05:00
44fa4f8ae7 duplicated the
Signed-off-by: Jie Luo <luo612@zju.edu.cn>

typo

Signed-off-by: Jie Luo <luo612@zju.edu.cn>

fix some typos

Signed-off-by: Jie Luo <luo612@zju.edu.cn>
Upstream-commit: ea2dd4b5d0b41552d047814d9e39ddaa3662ab41
Component: engine
2016-12-21 20:16:19 +08:00
dd179255a2 Fix docker plugin inspect <unkown object> issue on Windows
This fix is a follow up for comment:
https://github.com/docker/docker/pull/29186/files#r91277345

While #29186 addresses the issue of `docker inspect <unknown object>`
on Windows, it actually makes `docker plugin inspect <unknown object>`
out `object not found` on Windows as well. This is actually misleading
as plugin is not supported on Windows.

This fix reverted the change in #29186 while at the same time,
checks `not supported` in `docker inspect <unknown object>` so that
- `docker plugin inspect <unknown object>` returns `not supported` on Windows
- `docker inspect <unknown object>` returns `not found` on Windows

This fix is related to #29186 and #29185.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0b3c10ac4ddfe3655bac080440a8553269f2307f
Component: engine
2016-12-20 21:05:10 -08:00
4fb828cd66 Refactor cleanup of paused test containers
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 788c20668d8c965336f5d174cab4747187d53940
Component: engine
2016-12-20 16:26:55 -05:00
67834a4b9f Merge pull request #29470 from cyli/ask-for-unlock-key-only-if-locked
Check if a swarm is locked before asking a user to enter their unlock key
Upstream-commit: 0d5a715931c514dd9fdc77927105bdf049411b2b
Component: engine
2016-12-20 13:21:47 -08:00
e877ead08e Merge pull request #29550 from LK4D4/fix_commit
commit: do not change container labels on commit
Upstream-commit: dc8a6d91fb154c96a34ea5e850b25f5c2e88fe19
Component: engine
2016-12-20 09:25:09 -05:00
5ad6259537 Merge pull request #29546 from cpuguy83/29505_fix_overay2_check_plugin
Ensure test graphdriver plugin runs on test host
Upstream-commit: 288e55c09b252e02b5201e7d2f2bf45a323d8105
Component: engine
2016-12-19 16:16:42 -08:00
cafaf16a79 Ensure test graphdriver plugin runs on test host
Sets a kernel requirement for for `TestGraphdriverPlugin` since the
graphdriver being used is overlay2.. and also makes sure to skip the
kernel check in the actual graphdriver since we may be able to detect
kernels with backported support for overlay2 style mounts a bit more
freely in the test code.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e4ebc92edc85d2f46cf41c4ad9514ba0fbafed06
Component: engine
2016-12-19 16:05:22 -05:00
fde61754e9 commit: do not change container labels on commit
Fix #29547

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: ca6c6f0765aeccdb2730d03c05bd965906df8cd4
Component: engine
2016-12-19 09:56:20 -08:00
4486744b4b Merge pull request #26576 from allencloud/change-cluster-response-status-code
update response status code for cluster request
Upstream-commit: a58b5830b175860e71174c93c6f3ec1cefcd5e0d
Component: engine
2016-12-19 18:31:45 +01:00
c539597e62 Merge pull request #29539 from vdemeester/integration-remove-workingdir
[test-integration] global variable workingDirectory is not needed…
Upstream-commit: d477a24ec54caee49d41e64b46d92ace6af48ffc
Component: engine
2016-12-19 15:18:02 +01:00
e43da16101 remove client-side for supported logging drivers
The `docker logs` command performed a
client-side check if the container's
logging driver was supported.

Now that we allow the client to connect
to both "older" and "newer" daemon versions,
this check is best done daemon-side.

This patch remove the check on the client
side, and leaves validation to the daemon,
which should be the source of truth.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 05dc9846e1266e6a3629c26851acb633a380dd17
Component: engine
2016-12-19 14:30:01 +01:00
c3b264f4f3 Global variable workingDirectory is not needed…
… and given where it was used, it should be quicker to create an empty
folder instead of passing potentially a big context with unrelated file.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 3dd25b97902e064f43d56632d3a72768e36eecc5
Component: engine
2016-12-19 13:25:11 +01:00
0a2ba8aaae Merge pull request #29378 from aaronlehmann/swarm-plugins
Support v2 plugins in swarm mode
Upstream-commit: eb59c6d587ab5d3a49f044b4399046c0979bd1af
Component: engine
2016-12-19 11:07:06 +01:00
dc9d0b15f7 Merge pull request #29373 from vdemeester/remove-daemon-fmt-flood
Remove some fmt.Printf from integration-cli/daemon…
Upstream-commit: 48f7388e92f1b395728641059711c01662baf6da
Component: engine
2016-12-19 10:59:25 +01:00
a00daba226 Merge pull request #29441 from coolljt0725/fix_update_restart_policy
Fix docker update clear restart policy of monitor
Upstream-commit: 0f68ecd3f72ab336ffb6117ca9e9add9499309cf
Component: engine
2016-12-19 10:30:04 +01:00
4a0adf4beb update response status code for cluster request
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 29d4a7f512e3702ee4a2871dd84e3b24dd26477d
Component: engine
2016-12-19 10:21:10 +08:00
2b846c8a06 Merge pull request #28629 from yongtang/28581-secret-create-input
Add `--file` flag for `docker secret create` command
Upstream-commit: 4436a5946d1cc20efb3af5a3d0c56894c02f1a29
Component: engine
2016-12-18 03:04:10 +01:00
8616ae37b9 Merge pull request #29423 from unclejack/api_cli_integ_return
return directly without ifs in remaining packages
Upstream-commit: 21210419447281863f239805ab19248733041a52
Component: engine
2016-12-17 21:30:47 +01:00
4b72b6dab3 Fix update clear the restart policy of monitor
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 737b5b1781da9d7f286bb2425720add0ff69e3e3
Component: engine
2016-12-16 20:57:05 -05:00
d791b713a3 Before asking a user for the unlock key when they run docker swarm unlock, actually
check to see if the node is part of a swarm, and if so, if it is unlocked first.
If neither of these are true, abort the command.

Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: a6a0880a22e2b135d8a20a46b9ba34c7a9cf2f10
Component: engine
2016-12-16 17:16:55 -08:00
dd03359697 Add integration test for volume plugins on swarm
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 45990d6e6144daaaf53b09325e7576f0cbec74f3
Component: engine
2016-12-16 10:45:47 -08:00
6f94fb07b2 Fix volume Create to check against canonical driver name
Previously, it was comparing against the driver name passed in by the
caller. This could lead to subtle issues when using plugins, like
"plugin" vs. "plugin:latest".

Also, remove "conflict:" prefix to improve the error message.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 53d447c5d5c85d5595d5170411189c88a135a789
Component: engine
2016-12-16 10:45:46 -08:00
343586bbdc Fix volume plugin refecounting on daemon restart
Ensures all known volumes (known b/c they are persisted to disk) have
their volume drivers refcounted properly.

In testing this, I found an issue with `--live-restore` (required since
currently the provided volume plugin doesn't keep state on restart)
where restorted plugins did not have a plugin client loaded causing a
panic when trying to use the plugin.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 6ef1060cd0acb847e06db890abb335faa837a9e2
Component: engine
2016-12-16 10:14:06 -05:00
847dc629c8 Merge pull request #27938 from AkihiroSuda/ovlnw-27866
api: allow NW name that is the prefix of a swarm NW ID
Upstream-commit: 92e63977d9ed258c905ea5d073f9e04f631471f4
Component: engine
2016-12-16 10:40:46 +01:00
b70f98ab3e Make graphdriver plugin use plugin BasePath
Also enables `PropagatedMount` for graphdrivers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 500210475f6d841b2eacb42fb495e90108db2733
Component: engine
2016-12-15 16:22:13 -05:00
1f59facb6e api: allow creating a network of which name is the prefix of the ID of a swarm network
Previously, it doesn't allow creating such a network:

e.g.

    $ docker network inspect -f '{{.Id}}' ingress
    84xh9knigj6zyt00u31e26nj3
    $ docker network create 84
    Error response from daemon: network with name 84 already exists

Fix #27866

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: edfbc3b8767ab2e89e73ba3142d2ddad295001e9
Component: engine
2016-12-15 15:09:06 +00:00
7c00bda66d Merge pull request #29365 from yongtang/29342-exec-user-after-restart
Fix `docker exec -u` issue after docker daemon restart
Upstream-commit: a60be6bfe38d70608bb389a14e3eb2357454099e
Component: engine
2016-12-15 09:16:17 +01:00
d363742779 return directly without ifs in remaining packages
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 2c187a24e0003f2f0ab90b85876e668f2b6210d4
Component: engine
2016-12-14 23:28:27 +02:00
c5bc1e412f integration-cli: Add integration tests for swarm services + content trust
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 62cd3b39f901d14f984f1176ef0844918c145d21
Component: engine
2016-12-14 10:50:23 -08:00
e2664ec347 Merge pull request #28943 from vdemeester/publish-long-short-syntax
Remove --port and update --publish for services to support syntaxes
Upstream-commit: 2fe62f2395b966af7f38e442a91c75d042bb3b65
Component: engine
2016-12-14 17:55:48 +01:00
820bc000c3 Remove some fmt.Printf from integration-cli/daemon…
… to flood a little bit less the integration cli output. Now use any
testing framework that has a LogF function.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: cf2ea7613899477caf69145e2bd15aa6e731d5c4
Component: engine
2016-12-14 10:52:51 +01:00
4bd3e0fe3d Fix docker exec -u issue after docker daemon restart
This fix tries to address the issue raised in 29342 where
`docker exec -u` after docker daemon restart returns an error:
```
unable to find user test: no matching entries in passwd file
```

The reason was that `container.BaseFS` is not present after restart.

This fix adds the `daemon.Mount` during the restore to bring up the
`container.BaseFS`.

An integration test has been added to cover the changes.

This fix fixes 29342.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7feb2a17e4b9d1a5305a8a44004e916b79cbdd97
Component: engine
2016-12-13 22:36:30 -08:00
269a50e61f Merge pull request #29198 from allencloud/return-no-swarm-when-unlock-normal-node
return node is not a swarm when unlock a normal node
Upstream-commit: 96f7fedc1e9145f8fd6e8bb2f895fd22e95e6352
Component: engine
2016-12-13 18:59:06 -08:00
2aa298ba4e Fix issues with plugin and --live-restore
Fixes an issue when starting the daemon with live-restore
where previously it was not set, plugins are not running.

Fixes an issue when starting the daemon with live-restore, the plugin
client (for interacting with the plugins HTTP interface) is not set,
causing a panic when the plugin is called.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: cb6633175c0de0a7ae155c4d378cd2379681554b
Component: engine
2016-12-13 16:11:59 -05:00
25c6df8b2c Merge pull request #29349 from vdemeester/try-to-fix-win2lin
Fix failures on Win2lin
Upstream-commit: 39473dad5425d734fdc73df0a678c6edc3d4054b
Component: engine
2016-12-13 08:35:25 -08:00
c3c5d1b1fc Add --file flag for docker secret create command
This fix tries to address the issue raised in 28581 and 28927
where it is not possible to create a secret from a file (only
through STDIN).

This fix add a flag `--file` to `docker secret create` so that
it is possible to create a secret from a file with:
```
docker secret create --file secret.in secret.name
```

or
```
echo TEST | docker secret create --file - secret.name
```

Related docs has been updated.

An integration test has been added to cover the changes.

This fix fixes 28581.
This fix is related to 28927.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c6f0b7f448fac4d037d00f944a7908c60c04dff2
Component: engine
2016-12-13 07:35:45 -08:00
6ccaba610c Merge pull request #29000 from yongtang/24352-swarm-update-no-flags
Show usage when `docker swarm update` has no flags
Upstream-commit: cda04547c09c418dc0d5f99266757eeeb522f7bd
Component: engine
2016-12-13 16:07:02 +01:00
caf5d45bd8 Merge pull request #29335 from tophj-ibm/skip-plugin-test
[integration-cli] skip plugin tests on non-x86
Upstream-commit: c2b7480604f6692ae0ef8a9b1763cd8e60f12fb5
Component: engine
2016-12-13 14:54:41 +01:00
9c84f95c6e Show usage when docker swarm update has no flags
This fix tries to address the issue raised in 24352. Previously,
when `docker swarm update` has no flags, the output is
```
Swarm updated.
```
even though nothing was updated. This could be misleading for
users.

This fix tries to address the issue by adding a `PreRunE` function
in the command so that in case no flag is provided (`cmd.Flags().NFlag() == 0`),
the usage will be outputed instead.

An integration has been added to cover the changes.

This fix fixes 24352.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 5aa5a1cb008963ee6a99011b8f7cd1f489e2bc6a
Component: engine
2016-12-13 05:05:04 -08:00
cc3da24d75 Fixing win2lin builds by adding a testRequires to DockerDaemonSuite
The success of the win2lin CI before was really "by chance" on the
DockerDaemonSuite : the DockerDaemonSuite was panicking when starting
the daemon on the first non-skipped test.The suite panicked but as
the error returned from `StartWithBusybox` was nil, the test kept
going and was OK because the client had all the correct environment
variables set up to discuss with the remote daemon.

Then, as the suite panicked, no more test attached on the
DockerDaemonSuite ran (that's why on win2lin, `DockerDaemonSuite` was
only composed by 5 tests !). The really bad thing is, we didn't get
any report of the panic on the suite (go-check hiding something
somewhere).

As DockerDaemonSuite needs to run test on the same host as it's
running, this adds a `SameHostDaemon` requirement to the Suite.

This changes also make sure `TestRestartContainerWithRestartPolicy`
does left weirdies behind it.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: e857785df4b53df551ad25d132bc0274923f2e53
Component: engine
2016-12-13 12:04:53 +01:00
0bc3e1033e return not a swarm when unlock
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 0270645c13647456834d86082470734e944fdd37
Component: engine
2016-12-13 10:38:45 +08:00