Commit Graph

4301 Commits

Author SHA1 Message Date
0a6e02b356 Generate ImageHistory from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b462c93edb44790ca309e3721950cb23be5d7d62
Component: engine
2017-01-03 11:47:44 -05:00
eb7043f1ff Merge pull request #25234 from yongtang/25228-service-ps-multiple-ID
Support multiple service IDs on "docker service ps"
Upstream-commit: 18265591c2ae16b2fc831e9922fb27542f97fcf6
Component: engine
2017-01-03 12:40:24 +01:00
cc2e0536c6 Merge pull request #29827 from vdemeester/integration-fixes-for-userns
Updates some integration tests to fix userns builds
Upstream-commit: de709ebfd891ca44db35353f800d674a8e09a18e
Component: engine
2017-01-03 11:47:39 +01:00
fabb4a866d Merge pull request #29828 from vdemeester/integration-deleteContainer-ignore-notfound
Do not fail in `TearDown` if container not found when removing
Upstream-commit: 275d68ab39c0e880f26910bfda562d8a63e9d766
Component: engine
2017-01-03 11:35:07 +01:00
a520da946c Merge pull request #29773 from forever043/fix_TestDaemonStartWithoutColors
test: Fix "--raw-logs=true" option test in TestDaemonStartWithoutColors
Upstream-commit: 2fd995bc999702bba49a802f7f054f657e1041fb
Component: engine
2017-01-03 09:29:19 +01:00
7cbb50d925 Do not fail in TearDown if container not found when removing
If the container is not found when removing, it means it's already not
there anymore, so it's safe to ignore. This should reduce a bit some
`TearDown` flakyness..

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 636d6ee57c85df086823e998077d83dc0bb94035
Component: engine
2017-01-02 22:14:24 +01:00
c01c194858 Updates some integration tests to fix userns builds
- `TestRunMountReadOnlyDevShm` and `TestRunHostnameInHostMode` needs
  `NotUserNamespace` requirement as these are known limitation of
  userns.
- `TestBuildWorkdirCmd` should use a preload image (`busybox`) instead
  of one that require network access.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: bc19388fb239b1aa761d323405a7d6a6362845f4
Component: engine
2017-01-02 19:13:26 +01:00
9966a465fe Merge pull request #29799 from vdemeester/integration-registry-package
[test-integration] Add a registry package with registry v1/v2 code
Upstream-commit: ed689c48b08f393fbb652681b9b3e859380ae5e3
Component: engine
2017-01-02 15:37:09 +01:00
ee40f7aac0 Add a registry package with registry v1/v2 code
This extract what was in registry_test.go and
registry_mock_test.go. This also move `RegistryHosting`
requirement to `registry.Hosting`

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 4300e5e8818571a55e00d9987bec3ad6ca92dc6f
Component: engine
2017-01-02 11:03:53 +01:00
2758f0996d Remove pkg/integration and move it to testutil or integration-cli
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 33968e6c7df164fff0a882c50ae7f4f7e6190e4b
Component: engine
2016-12-30 18:26:34 +01:00
31c2689d03 test: Fix "--raw-logs=true" option test in TestDaemonStartWithoutColors
Because "tty" is closed in s.d.Stop() for "--raw-logs=false" test,
we need to open another pair of pty before test "--raw-logs=true"
option.

This patch fix #29772.

Signed-off-by: Jiuyue Ma <majiuyue@huawei.com>
Upstream-commit: c9e0d923ae6d2b5558378183b79d0a85ccf16020
Component: engine
2016-12-30 17:26:01 +08:00
a767ec924e Merge pull request #29721 from coolljt0725/follow_29365
Follow up #29365, fix fail to remove container after restart
Upstream-commit: 36ed7d58bb19e46445c81b6a00a7b75a6280e654
Component: engine
2016-12-30 00:13:13 +01:00
78bec80aa1 Merge pull request #29661 from vdemeester/integration-cli-test-environment
[integration-test] Introduce an environment package
Upstream-commit: a247bf0e99cd782a3c4e87cf70b36bf84f8e780b
Component: engine
2016-12-29 22:12:42 +01:00
771c21fdd2 Merge pull request #29769 from duglin/FixWinTest
Fix flaky windows TestRestartRunningContainer test
Upstream-commit: 11b11e1559565aba0e662c8548fd54ebd3a98476
Component: engine
2016-12-29 15:48:43 -05:00
6f964785d6 Fix flaky windows TestRestartRunningContainer test
I was seeing this for windowsRS1 testing:
17:20:36 ----------------------------------------------------------------------
17:20:36 FAIL: docker_cli_restart_test.go:31: DockerSuite.TestRestartRunningContainer
17:20:36
17:20:36 docker_cli_restart_test.go:39:
17:20:36     c.Assert(out, checker.Equals, "foobar\n")
17:20:36 ... obtained string = ""
17:20:36 ... expected string = "foobar\n"
17:20:36
17:20:59
17:20:59 ----------------------------------------------------------------------

and I think its because there's a delay between the time the container is
started and the 'echo' is actually run. This gives it up to 10 seconds
to do the 'echo' before giving up.

/cc @jhowardmsft

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: bae22d167cd29016541a6d4f93d38f2608d8e51f
Component: engine
2016-12-29 08:13:43 -08:00
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
0f363a44c6 Introduce a environment package in integration-cli
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 433e2e8a1eb84ad7bb39b5206b2fdf6ac9da7b27
Component: engine
2016-12-29 11:00:50 +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
2ac27c5a50 Follow up #29365, fix fail to remove container after restart
Call daemon.Mount will increase the refcount of mounted path,
for those previous running containers, `Mount` call will make
the refcount to 2. see
https://github.com/docker/docker/blob/v1.13.0-rc4/daemon/graphdriver/counter.go#L38
```
	if !m.check {
		m.check = true
		if c.checker.IsMounted(path) {
			m.count++
		}
	}
	m.count++

```
graphdrive could restore on reboot after #22541, call
daemon.Mount to resore the graphdriver is not necessary.

And call `daemon.Mount` on restorting will mount all the containers
mounted layer even if it was stop.

This fix call Mount and then Unmount to get `BaseFs`

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 77c725eac2820b3d5b4252f5c25bbf305657d72a
Component: engine
2016-12-28 20:08:03 -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
74f57538fd Support multiple service IDs on "docker service ps"
This fix tries to address issue raised in 25228 to support
multiple service IDs on `docker service ps`.

Multiple IDs are allowed with `docker service ps ...`, and
related documentation has been updated.

A test has been added to cover the changes.

This fix fixes 25228.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 70942352d56779b6c428efa1c2d4cb8a45c1dfa1
Component: engine
2016-12-22 11:33:47 -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