1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

34169 commits

Author SHA1 Message Date
Liu Hua
8451d03d8e Devicemapper: ignore Nodata errors when delete thin device
if thin device is deteled and the metadata exists, you can not
delete related containers. This patch ignore Nodata errors for
thin device deletion

Signed-off-by: Liu Hua <sdu.liu@huawei.com>
2018-01-02 18:04:25 +00:00
Brian Goff
c345c53859
Merge pull request from kolyshkin/misc-test
Misc test improvements
2018-01-02 09:14:20 -05:00
Sebastiaan van Stijn
30c9cb1ead
Merge pull request 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 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 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 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 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 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 from corbin-coleman/libnetwork_vendoring
[AUTOMATED] libnetwork Vendoring
2017-12-26 00:17:26 -06:00
Yong Tang
3e1df952b7
Merge pull request from kolyshkin/vfs-quota
Fix VFS vs quota regression
2017-12-22 12:32:03 -06:00
Vincent Demeester
c753095bf3
Merge pull request 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 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 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 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 from ndeloof/FIX35843
fix  regression on health check workingdir
2017-12-21 10:55:15 +09:00
Sebastiaan van Stijn
9646d07d75
Merge pull request 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 

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 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 from estesp/moby-governance
Add Moby TSC references/governance details
2017-12-20 10:50:47 +01:00
Victor Vieux
745278d242
Merge pull request 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 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 from jahkeup/awslogs-batching
Fix awslogs batch size calculation
2017-12-19 20:44:33 +01:00
Daniel Nephin
602bce175b
Merge pull request 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 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
Kir Kolyshkin
2dd39b7841 projectquota: treat ENOSYS as quota unsupported
If mknod() returns ENOSYS, it most probably means quota is not supported
here, so return the appropriate error.

This is a conservative* 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

Reported-by: Brian Goff <cpuguy83@gmail.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-12-18 10:32:36 -08:00
Sebastiaan van Stijn
6ed1163c98
Remove redundant build-tags
Files that are suffixed with `_linux.go` or `_windows.go` are
already only built on Linux / Windows, so these build-tags
were redundant.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-12-18 17:41:53 +01:00
Sebastiaan van Stijn
1589cc0a85
Remove Solaris files
Solaris is no longer being worked on, so these files
are now just dead code.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-12-18 17:22:25 +01:00
Sebastiaan van Stijn
16fe5a1289
Remove unused experimental code
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-12-18 17:07:48 +01:00
Yong Tang
26bc976ac9
Merge pull request from abhi/vendor
Vendoring swarmkit a6519e28ff2a558f5d32b2dab9fcb0882879b398
2017-12-16 10:40:29 -06:00
Sebastiaan van Stijn
52656da950
Merge pull request from cpuguy83/fix_container_zombies
Fix race conditions in libcontainerd process handling
2017-12-16 01:16:50 -08:00
Sebastiaan van Stijn
0862014431
Merge pull request from estesp/fix-overlay2-untarinuserns
Fix overlay2 storage driver inside a user namespace
2017-12-15 23:25:15 -08:00