Граф коммитов

34178 Коммитов

Автор SHA1 Сообщение Дата
Yong Tang f509a54bdd Add test case for `docker ps -f health=starting`
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-01-07 05:10:36 +00:00
Yong Tang 97b16aecf9 Fix issue of filter in `docker ps` where `health=starting` returns nothing
This fix tries to address the issue raised in 35920 where the filter
of `docker ps` with  `health=starting` always returns nothing.

The issue was that in container view, the human readable string (`HealthString()` => `Health.String()`)
of health status was used. In case of starting it is `"health: starting"`.
However, the filter still uses `starting` so no match returned.

This fix fixes the issue by using `container.Health.Status()` instead so that it matches
the string (`starting`) passed by filter.

This fix fixes 35920.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2018-01-05 05:16:09 +00:00
Sebastiaan van Stijn 4459775eea
Merge pull request #35924 from Microsoft/32838-partial-fix
Vendor Microsoft/hcsshim @ v0.6.8
2018-01-04 17:49:17 +01:00
John Howard 172a442c27 Vendor Microsoft/hcsshim @ v0.6.8
Signed-off-by: John Howard <jhoward@microsoft.com>
2018-01-03 10:19:05 -08:00
Sebastiaan van Stijn fda904911d
Merge pull request #35772 from arm64b/multi-arch-manifest-support
Download support of images with multi-arch manifest
2018-01-03 19:03:33 +01:00
Brian Goff f72b180ae1
Merge pull request #35694 from boucher/checkpoint-dir-fix
Don't append the container id to custom directory checkpoints.
2018-01-03 11:22:21 -05:00
Yong Tang 99c22b0034
Merge pull request #35822 from keyolk/35709-fix-docker-build-overlayfs-whiteout
skip container ID remapping, if the file is overlayfs whiteout.
2018-01-03 22:21:00 +08:00
Chanhun Jeong b013c1541d skip container ID remapping, if the file is overlayfs whiteout.
Signed-off-by: Chanhun Jeong <chanhun.jeong@navercorp.com>
2018-01-03 17:06:59 +09:00
Brian Goff c345c53859
Merge pull request #35840 from kolyshkin/misc-test
Misc test improvements
2018-01-02 09:14:20 -05:00
Sebastiaan van Stijn 30c9cb1ead
Merge pull request #35895 from javabrett/docs-contributing-moby-docker-paths
Fixed in-container paths in dev doc: moby/moby -> docker/docker.
2018-01-02 13:30:19 +01:00
Sebastiaan van Stijn ff61d127fe
Merge pull request #35893 from thaJeztah/cleanup-mailmap
Cleanup mailmap, and update authors
2018-01-02 12:50:43 +01:00
Sebastiaan van Stijn 63c86ad2ea
Cleanup and sort .mailmap
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-01-02 12:48:14 +01:00
Sebastiaan van Stijn 2df19b7c11
Update mailmap and authors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-01-02 12:47:47 +01:00
Lei Jitang 431d3d6756
Merge pull request #35896 from thaJeztah/fix-namespace-filtering
Fix event filter filtering on "or"
2018-01-02 12:04:32 +08:00
Lei Jitang 9d9992b314
Merge pull request #35833 from thaJeztah/fix-mount-creation-on-start
Re-validate Mounts on container start
2018-01-02 12:01:58 +08:00
Sebastiaan van Stijn bb9c273648
Merge pull request #35899 from javabrett/fix-deprecated-typo
Fixed typo DEREPCATED -> DEPRECATED.
2017-12-29 15:34:11 +01:00
Brett Randall 3b80d57899 Fixed typo DEREPCATED -> DEPRECATED.
Signed-off-by: Brett Randall <javabrett@gmail.com>
2017-12-29 06:39:09 -05:00
Sebastiaan van Stijn 295bb09184
Fix event filter filtering on "or"
The event filter used two separate filter-conditions for
"namespace" and "topic". As a result, both events matching
"topic" and events matching "namespace" were subscribed to,
causing events to be handled both by the "plugin" client, and
"container" client.

This patch rewrites the filter to match only if both namespace
and topic match.

Thanks to Stephen Day for providing the correct filter :)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-12-29 02:47:56 +01:00
Brett Randall e96b33665e Fixed in-container paths in dev doc: moby/moby -> docker/docker.
Further to 355cf9483c which caught some
of these.  This should fix the remainder in the contributing docs.

Signed-off-by: Brett Randall <javabrett@gmail.com>
2017-12-28 20:22:02 -05:00
Tõnis Tiigi daded8da91
Merge pull request #35674 from kolyshkin/zfs-rmdir
zfs: fix ebusy on umount etc
2017-12-28 15:35:19 -08:00
Kir Kolyshkin f0cab0e285 TestImportExtremelyLargeImageWorks: optimize DevZero
According to https://github.com/golang/go/issues/5373, go recognizes
(and optimizes for) the following syntax:

```go
for i := range b {
	b[i] = 0
}
```

so let's use it. Limited testing shows ~7.5x speed increase,
compared to the previously used syntax.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-12-28 13:08:41 -08:00
Kir Kolyshkin 3676bd8569 TestBuildNotVerboseFailureRemote: fix false positive
I got the following test failure on power:

10:00:56
10:00:56
----------------------------------------------------------------------
10:00:56 FAIL: docker_cli_build_test.go:3521:
DockerSuite.TestBuildNotVerboseFailureRemote
10:00:56
10:00:56 docker_cli_build_test.go:3536:
10:00:56     c.Fatal(fmt.Errorf("Test[%s] expected that quiet stderr and
verbose stdout are equal; quiet [%v], verbose [%v]", name,
quietResult.Stderr(), result.Combined()))
10:00:56 ... Error: Test[quiet_build_wrong_remote] expected that quiet
stderr and verbose stdout are equal; quiet [
10:00:56 unable to prepare context: unable to download remote context
http://something.invalid: Get http://something.invalid: dial tcp: lookup
something.invalid on 172.29.128.11:53: no such host
10:00:56 ], verbose [unable to prepare context: unable to download
remote context http://something.invalid: Get http://something.invalid:
dial tcp: lookup something.invalid on 8.8.8.8:53: no such host
10:00:56 ]
10:00:56
10:00:56
10:00:56
----------------------------------------------------------------------

The reason is, either more than one name server is configured, or
nameserver was reconfigured in the middle of the test run. In any case,
different nameserver IP in an error messages should not be treated
as a failure, so let's strip those out.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-12-28 13:08:41 -08:00
Kir Kolyshkin f5e01452d2 integration-cli/TestCleanupMounts: fix/improve
`TestCleanupMountsAfterDaemonAndContainerKill` was supposedly written
when the container mounts were visible from the host. Currently they
all live in their own mount namespace and the only visible mount is
the tmpfs one for shareable /dev/shm inside the container (i.e.
/var/lib/docker/containers/<ID>/shm), which will no longer be there
in case of `--default-ipc-mode private` is used, and so the test will
fail. Add a check if any container mounts are visible from the host,
and skip the test if there are none, as there's nothing to check.

`TestCleanupMountsAfterDaemonCrash`: fix in a similar way, keeping
all the other checks it does, and skipping the "mounts gone" check
if there were no mounts visible from the host.

While at it, also fix the tests to use `d.Kill()` in order to not
leave behind a stale `docker.pid` files.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-12-28 13:08:41 -08:00
Kir Kolyshkin 519c06607c integration-cli/TestRunModeIpcContainer: remove
1. The functionality of this test is superceded by
   `TestAPIIpcModeShareableAndContainer` (see
   integration-cli/docker_api_ipcmode_test.go).

2. This test won't work with --default-ipc-mode private.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-12-28 13:08:41 -08:00
Yong Tang 4a804016ab
Merge pull request #35791 from corbin-coleman/libnetwork_vendoring
[AUTOMATED] libnetwork Vendoring
2017-12-26 00:17:26 -06:00
Yong Tang 3e1df952b7
Merge pull request #35827 from kolyshkin/vfs-quota
Fix VFS vs quota regression
2017-12-22 12:32:03 -06:00
Vincent Demeester c753095bf3
Merge pull request #35844 from thaJeztah/remove-test-events-limit
Remove TestEventsLimit(), and minor cleanups
2017-12-22 09:23:19 +01:00
Vincent Demeester b0cffdb10a
Merge pull request #35672 from tonistiigi/onbuild-test
Add testcase for onbuild command in multi stage build
2017-12-22 09:22:51 +01:00
Sebastiaan van Stijn 89140ac28c
Merge pull request #35851 from tonistiigi/test-names
integration-cli: clarify multi-stage tests names
2017-12-22 00:25:17 +01:00
Tõnis Tiigi a5de79b435
Merge pull request #35582 from asottile/use_base_containers_config
Fix environ substitutions in `docker commit --change ...`
2017-12-20 21:01:53 -08:00
Akihiro Suda c36d6f5ab1
Merge pull request #35845 from ndeloof/FIX35843
fix #35843 regression on health check workingdir
2017-12-21 10:55:15 +09:00
Sebastiaan van Stijn 9646d07d75
Merge pull request #35838 from marcusmartins/marcus_swarmkit
Vendor docker/swarmkit to 713d79d
2017-12-20 23:47:10 +01:00
Tonis Tiigi fe4ed9d78f Add testcase for onbuild command in multi stage build
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-20 11:56:41 -08:00
Tonis Tiigi e90b7c06b4 integration-cli: clarify multi-stage tests names
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-12-20 11:55:27 -08:00
Anthony Sottile 0785836c4b Fix environ substitutions in `docker commit --change ...`
The building machinery was being handed an uninitialized container
Config.  This changes it to use the target container's Config.

Resolves #30538

Signed-off-by: Anthony Sottile <asottile@umich.edu>
2017-12-20 11:03:38 -08:00
Sebastiaan van Stijn 5be2f2be24
Add integration test for healthcheck workdir
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-12-20 18:48:36 +01:00
Nicolas De Loof 852a943c77
fix #35843 regression on health check workingdir
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2017-12-20 14:04:51 +01:00
Sebastiaan van Stijn b7d204ef6b
Update TestLogEvents to not use deprecated Status field
The `Status` field was deprecated in favor of `Action`.

This patch updates the test to use the `Action` field,
but adds a check that both are set to the same value.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-12-20 12:49:51 +01:00
Sebastiaan van Stijn fb3935022d
Fix GoDoc to match actual events-limit
Commit 59d45c384a changed
the `eventsLimit` from 64 to 256, but did not update
the GoDoc accordingly.

This patch updates the GoDoc for `Subscribe` and `SubscribeTopic`
to match the actual limit.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-12-20 12:41:51 +01:00
Sebastiaan van Stijn b7ad3e7ea1
Remove TestEventsLimit()
This test was added a long time ago, and over the years has proven to be flaky,
and slow. To address those issues, it was modified to;

- cleanup containers afterwards
- take clock-skew into account
- improve performance by parallelizing the container runs
- _reduce_ parallelization to address platform issues on Windows (twice..)
- adjust the test to take new limits into account
- adjust the test to account for more events being generated by containers

The last change to this test (made in ddae20c032) actually
broke the test, as it's now testing that all events sent by containers
(`numContainers*eventPerContainer`) are received, but the number of events that
is generated (17 containers * 7 events = 119) is less than the limit (256 events).

The limit is already covered by the `TestLogEvents` unit-test, that was added in
8d056423f8, and tests that the number of events
is limited to `eventsLimit`.

This patch removes the test, because it's not needed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-12-20 12:40:05 +01:00
Vincent Demeester 267847712e
Merge pull request #35778 from estesp/moby-governance
Add Moby TSC references/governance details
2017-12-20 10:50:47 +01:00
Victor Vieux 745278d242
Merge pull request #35812 from stevvooe/follow-conventions
daemon, plugin: follow containerd namespace conventions
2017-12-19 15:55:39 -08:00
Kir Kolyshkin 1e8a087850 vfs gd: ignore quota setup errors
This is a fix to regression in vfs graph driver introduced by
commit 7a1618ced3 ("add quota support to VFS graphdriver").

On some filesystems, vfs fails to init with the following error:

> Error starting daemon: error initializing graphdriver: Failed to mknod
> /go/src/github.com/docker/docker/bundles/test-integration/d6bcf6de610e9/root/vfs/backingFsBlockDev:
> function not implemented

As quota is not essential for vfs, let's ignore (but log as a warning) any error
from quota init.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-12-19 13:55:04 -08:00
Marcus Martins af73d31e60
Vendor docker/swarmkit to 713d79d
Revendor swarmkit to 713d79dc8799b33465c58ed120b870c52eb5eb4f to include
https://github.com/docker/swarmkit/pull/2473.

Signed-off-by: Marcus Martins <marcus@docker.com>
2017-12-19 13:23:21 -08:00
Anusha Ragunathan c3a9f5d00f
Merge pull request #35805 from cpuguy83/fix_kill_containers_on_restart
Ensure containers are stopped on daemon startup
2017-12-19 12:19:47 -08:00
Sebastiaan van Stijn c8f7f4489e
Merge pull request #35726 from jahkeup/awslogs-batching
Fix awslogs batch size calculation
2017-12-19 20:44:33 +01:00
Daniel Nephin 602bce175b
Merge pull request #35808 from thaJeztah/prevent-panic-in-test
Prevent potential panic in TestLogsAPIUntil
2017-12-19 11:16:00 -05:00
Sebastiaan van Stijn 7cb96ba308
Re-validate Mounts on container start
Validation of Mounts was only performed on container _creation_, not on
container _start_. As a result, if the host-path no longer existed
when the container was started, a directory was created in the given
location.

This is the wrong behavior, because when using the `Mounts` API, host paths
should never be created, and an error should be produced instead.

This patch adds a validation step on container start, and produces an
error if the host path is not found.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-12-19 11:44:29 +01:00
Yong Tang c492e76d13
Merge pull request #35823 from thaJeztah/remove-dead-code
Remove dead code and redundant build tags
2017-12-18 18:05:05 -06:00
Brian Goff e69127bd5b Ensure containers are stopped on daemon startup
When the containerd 1.0 runtime changes were made, we inadvertantly
removed the functionality where any running containers are killed on
startup when not using live-restore.
This change restores that behavior.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-12-18 14:33:45 -05:00