Commit Graph

4283 Commits

Author SHA1 Message Date
b8997fee88 Merge pull request #29222 from yongtang/28789-plugin-inspect-follow-up
Allow ID-based `docker plugin enable/disable/rm/set`
Upstream-commit: 00cdb97f0dea4d41fac8df4813888bb8b945f0d0
Component: engine
2016-12-29 13:40:40 +01:00
daae214603 Merge pull request #29762 from vdemeester/integration-mini-clean
Small cleanup in `integration-cli/docker_utils.go` 👼
Upstream-commit: 79f1c9c81d43da1c5746552a0d05980ed5e6447c
Component: engine
2016-12-29 09:29:53 +01:00
5732c11db2 Merge pull request #29371 from vdemeester/clean-integration-utils
[test-integration] Clean utils.go from most of its content
Upstream-commit: 021710fcdf61308657b8a25bbf23019535dcdd81
Component: engine
2016-12-29 09:28:46 +01:00
b4cbe892e8 Merge pull request #29679 from yongtang/29667-docker-build-workdir-cmd
Fix image's `CMD` after `WORKDIR` in Dockerfile
Upstream-commit: a2b12b5e82d50dad6c4a109501260f2307cf1d75
Component: engine
2016-12-28 20:26:59 -05:00
ee3cf2ce35 Tests to allow ID-based docker plugin enable/disable/rm/set
This fix is a follow up based on comment:

and a follow up to:
https://github.com/docker/docker/pull/29222#issuecomment-268908937

As #28789 has been merged in, it is possible for `docker plugin inspect`
to search based on Name or ID Prefix. However, ID-based
`docker plugin enable/disable/rm/set` are still not possible.

This fix addes test for  `docker plugin enable/disable/rm/set` to search based on:
- Full ID
- Full Name
- Partial ID (prefix)

The actual fix is done in  #29487.

This fix is a follow up of #28789 and  #29487.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c80e74e8cc28e9b6197e68321f2402c30de3e895
Component: engine
2016-12-28 14:10:43 -08:00
3e1dc2e4b8 Small cleanup in integration-cli/docker_utils.go 👼
- Move *one-shot* (one use) function where it is actually used (easier
  to know what's going on).
- Remove `pullImageIfNotExist` function as it might be an artifact
  from way back. We don't need it as we already have frozen/loaded
  image of busybox.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b2320d121ca735a3879b40d493018b2e3a1a52da
Component: engine
2016-12-28 23:00:32 +01:00
2f9b83d720 Clean integration-cli/utils.go from most of its content
Most of the code is now on pkg/integration.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: def13fa23c812d367e3c61d9c39bdcee66929c17
Component: engine
2016-12-28 19:05:48 +01:00
9d3a22d754 Merge pull request #29313 from vdemeester/move-cli-config
Move package cliconfig to cli/config
Upstream-commit: 4f657ff55cc91e9196ae980ddf692f763dced271
Component: engine
2016-12-28 09:05:51 -08:00
98526f223f Merge pull request #29668 from dmcgowan/plugins-dct
Support Docker Content Trust for plugins
Upstream-commit: a412c1b7a03e24ba733809924c680f395fad2655
Component: engine
2016-12-28 10:43:32 -05:00
17e3d2d6b6 Support for docker content trust for plugins
Add integration test for docker content trust

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 14e8bba4f5d39e7a540bee44c133a1e73db48f84
Component: engine
2016-12-27 12:51:00 -08:00
4579c9a13e Merge pull request #29714 from vdemeester/small-requirement-fix
Display only the name of the requirement…
Upstream-commit: e7d4269a5048d4e472aabaeee309b2d786c24a11
Component: engine
2016-12-27 13:21:43 +01:00
4fcf2cd7b7 Fix image's CMD after WORKDIR in Dockerfile
This fix tries to fix 29667 where image's `CMD` is modified
after `WORKDIR` in Dockerfile.

The value of `b.runConfig.Cmd` was modified in the processing
of `WORKDIR`, in order to fix 28902. However, the same
`b.runConfig.Cmd` is passed to `commit()`.

This fix restored the `b.runConfig.Cmd` before `commit()`
the image for `WORKDIR`.

A test has been added.

This fix fixes 29667.

This fix is related to 28902, 28909, 28514.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 083602384737635af9a89b75a6ca6d27f7515dc6
Component: engine
2016-12-26 20:43:29 -08:00
0ff4595d80 Display only the name of the requirement…
… relative to the integration-cli package

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 952c8aef3f221ee266627c26b9d8e4c0d936258f
Component: engine
2016-12-26 21:29:17 +01:00
58405ddf68 Merge pull request #29681 from tonistiigi/fix-invalid-inspect
Fix inspect object by invalid reference
Upstream-commit: 11eb9b0d268910bfa51d7669f652f7c49fe350cd
Component: engine
2016-12-26 13:09:32 +01:00
72d129024d Move package cliconfig to cli/config
I felt it made more sence 👼

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: ce964a607ad7395af7b74a0ba1efc5ab3cb15790
Component: engine
2016-12-25 20:31:52 +01:00
f56b7023bb Merge pull request #28623 from cpuguy83/update_graphdriver_docs
Ensure graphdriver only loads with experimental flag
Upstream-commit: d3e3a97cb2b3d86587ae52e3d8247dc2ba4d2c4e
Component: engine
2016-12-24 11:59:24 +01:00
396314b106 Fix inspect object by invalid reference
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 3cd39aaeab37102e4b12decc0c36042e477e2fa6
Component: engine
2016-12-23 22:57:30 -08:00
478844dff8 Implement content addressability for plugins
Move plugins to shared distribution stack with images.

Create immutable plugin config that matches schema2 requirements.

Ensure data being pushed is same as pulled/created.

Store distribution artifacts in a blobstore.

Run init layer setup for every plugin start.

Fix breakouts from unsafe file accesses.

Add support for `docker plugin install --alias`

Uses normalized references for default names to avoid collisions when using default hosts/tags.

Some refactoring of the plugin manager to support the change, like removing the singleton manager and adding manager config struct.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 3d86b0c79b16334ce5836c0315e4c310b84c2e17
Component: engine
2016-12-23 13:29:58 -08:00
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
38849b2667 Moves graphdriver plugn docs out of experimental
Also updates some of the structures being sent so plugins are getting
all the new options.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 677fa03654886ee776ff478c30681d5376cfc196
Component: engine
2016-12-22 15:30:25 -05: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