Commit Graph

32243 Commits

Author SHA1 Message Date
7ee813acf5 Update and use FindNetwork on Windows.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: b249ccb1151a3c2c7e442b6c1a769821afb28fe4
Component: engine
2018-01-07 03:32:37 +00:00
df9a679f90 Update FindUniqueNetwork to address network name duplications
This fix is part of the effort to address 30242 where
issue arise because of the fact that multiple networks
may share the same name (within or across local/swarm scopes).

The focus of this fix is to allow creation of service
when a network in local scope has the same name as the
service network.

An integration test has been added.

This fix fixes 30242.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: cafed80cd019a8b40025eaa5e5b37459362607fb
Component: engine
2018-01-06 01:55:28 +00:00
9c4ef1072a Merge pull request #35509 from cpuguy83/splunk_dont_readall
Splunk: limit the reader size on error responses
Upstream-commit: 39faf2a3a83c4abad8ed8030a9b942bbb2978359
Component: engine
2018-01-05 12:34:35 -08:00
233f49e086 Merge pull request #35570 from zemanlx/feature/journald-with-SYSLOG_IDENTIFIER
Add journald tag as SYSLOG_IDENTIFIER
Upstream-commit: d80c13a54114de602c8b75030e3ec9c2cde9575b
Component: engine
2018-01-05 20:56:55 +01:00
3887b15050 Merge pull request #35925 from Microsoft/jjh/builder-default-rw-size-bump
Windows: Bump RW layer size
Upstream-commit: fff423289965260c0ca83024059aa30999792c4a
Component: engine
2018-01-04 22:54:38 -08:00
e76ddf0d7b Merge pull request #35737 from tonistiigi/fix-git-submodules
gitutils: fix checking out submodules
Upstream-commit: 50ce54645094a5d337e5d841c037663e9f4e3170
Component: engine
2018-01-05 10:41:04 +08:00
ad4db68af2 Merge pull request #35753 from kolyshkin/netgo
install-containerd-static: use netgo buildtag
Upstream-commit: 51ccedda52413eef2cd4ba8e3948c84501210f3d
Component: engine
2018-01-05 09:05:46 +08:00
1fbbb4c59b Merge pull request #35924 from Microsoft/32838-partial-fix
Vendor Microsoft/hcsshim @ v0.6.8
Upstream-commit: 4459775eeaa0a3239866fe091014eb1e707bdc2c
Component: engine
2018-01-04 17:49:17 +01:00
fb52c2003b Windows: Bump RW layer size
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: deb335d04fd47e96fdb7b342dece513174b574bd
Component: engine
2018-01-03 15:59:06 -08:00
fa87c342b2 Vendor Microsoft/hcsshim @ v0.6.8
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 172a442c27ed35778662980809824fdf15a722a6
Component: engine
2018-01-03 10:19:05 -08:00
6f3ae5f1f6 Merge pull request #35772 from arm64b/multi-arch-manifest-support
Download support of images with multi-arch manifest
Upstream-commit: fda904911d87a2b36e6fdcc048726bb6b593d944
Component: engine
2018-01-03 19:03:33 +01:00
707c5a8bd6 Merge pull request #35694 from boucher/checkpoint-dir-fix
Don't append the container id to custom directory checkpoints.
Upstream-commit: f72b180ae1f638b878edfbae1b7030f454bb5624
Component: engine
2018-01-03 11:22:21 -05:00
01e7ddaec8 Merge pull request #35822 from keyolk/35709-fix-docker-build-overlayfs-whiteout
skip container ID remapping, if the file is overlayfs whiteout.
Upstream-commit: 99c22b0034605d283d9ddcfc72b1f450d130c976
Component: engine
2018-01-03 22:21:00 +08:00
2bb414da6f skip container ID remapping, if the file is overlayfs whiteout.
Signed-off-by: Chanhun Jeong <chanhun.jeong@navercorp.com>
Upstream-commit: b013c1541d3b58f736bc79269aa88d3bfacda6ea
Component: engine
2018-01-03 17:06:59 +09:00
49ff2398e6 Merge pull request #35840 from kolyshkin/misc-test
Misc test improvements
Upstream-commit: c345c53859a7197deb4722ad4ca5c4a45fab7074
Component: engine
2018-01-02 09:14:20 -05:00
3b99478053 Merge pull request #35895 from javabrett/docs-contributing-moby-docker-paths
Fixed in-container paths in dev doc: moby/moby -> docker/docker.
Upstream-commit: 30c9cb1ead17e861ad666a25116da64e89dc8594
Component: engine
2018-01-02 13:30:19 +01:00
8e9edf70c7 Cleanup and sort .mailmap
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 63c86ad2eade7d0d5128100a6eb1d5cac245adbc
Component: engine
2018-01-02 12:48:14 +01:00
5b7cd70f03 Update mailmap and authors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2df19b7c11349b961455b1c75b655a5f017dd7a4
Component: engine
2018-01-02 12:47:47 +01:00
6635d18f37 Merge pull request #35896 from thaJeztah/fix-namespace-filtering
Fix event filter filtering on "or"
Upstream-commit: 431d3d6756f69a84d23ef45186082be1ed93c151
Component: engine
2018-01-02 12:04:32 +08:00
fa250e5c10 Merge pull request #35833 from thaJeztah/fix-mount-creation-on-start
Re-validate Mounts on container start
Upstream-commit: 9d9992b314933b9d93d3ac117b3f8146b9295277
Component: engine
2018-01-02 12:01:58 +08:00
cfc9623c01 Fixed typo DEREPCATED -> DEPRECATED.
Signed-off-by: Brett Randall <javabrett@gmail.com>
Upstream-commit: 3b80d5789959b790e8f45c984414cc4d2552417b
Component: engine
2017-12-29 06:39:09 -05:00
4b57d7f1d3 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>
Upstream-commit: 295bb09184fe473933498bb0efb59b8acb124f55
Component: engine
2017-12-29 02:47:56 +01:00
31e8b1c077 Fixed in-container paths in dev doc: moby/moby -> docker/docker.
Further to 355cf9483c1b8ede5ae3ed50add4de2a69d62645 which caught some
of these.  This should fix the remainder in the contributing docs.

Signed-off-by: Brett Randall <javabrett@gmail.com>
Upstream-commit: e96b33665e58f73a16923b89a9bcc6fe6fcdb6c6
Component: engine
2017-12-28 20:22:02 -05:00
f1638ade2e Merge pull request #35674 from kolyshkin/zfs-rmdir
zfs: fix ebusy on umount etc
Upstream-commit: daded8da9178ec097e59a6b0b2bf12754b5472d8
Component: engine
2017-12-28 15:35:19 -08:00
8befd2d809 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>
Upstream-commit: f0cab0e28512de5eecc0412212425cc74d62af71
Component: engine
2017-12-28 13:08:41 -08:00
2a34102708 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>
Upstream-commit: 3676bd8569f4df28a4f850cd4814e3558d8c03f6
Component: engine
2017-12-28 13:08:41 -08:00
dd0cbe7272 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>
Upstream-commit: f5e01452d2c2a07bab48b4e05306ef9446770c4a
Component: engine
2017-12-28 13:08:41 -08:00
e25f9d0953 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>
Upstream-commit: 519c06607ca7e8a544afddbd61ad57afe63a98b4
Component: engine
2017-12-28 13:08:41 -08:00
c88231e80c Merge pull request #35791 from corbin-coleman/libnetwork_vendoring
[AUTOMATED] libnetwork Vendoring
Upstream-commit: 4a804016ab8b9fd55a45cff9687a1de12dee5eb7
Component: engine
2017-12-26 00:17:26 -06:00
0a947da27f Merge pull request #35827 from kolyshkin/vfs-quota
Fix VFS vs quota regression
Upstream-commit: 3e1df952b7d693ac3961f492310852bdf3106240
Component: engine
2017-12-22 12:32:03 -06:00
7c289486a2 Merge pull request #35844 from thaJeztah/remove-test-events-limit
Remove TestEventsLimit(), and minor cleanups
Upstream-commit: c753095bf331b5b8904cd58a2072c93a9b815141
Component: engine
2017-12-22 09:23:19 +01:00
751e6f56a0 Merge pull request #35672 from tonistiigi/onbuild-test
Add testcase for onbuild command in multi stage build
Upstream-commit: b0cffdb10a2fbcec744588caddf3d0ddfc143967
Component: engine
2017-12-22 09:22:51 +01:00
ee811e7a56 Merge pull request #35851 from tonistiigi/test-names
integration-cli: clarify multi-stage tests names
Upstream-commit: 89140ac28cc413d0e961016b78addccdca4d3607
Component: engine
2017-12-22 00:25:17 +01:00
b8be0fb3b8 Merge pull request #35582 from asottile/use_base_containers_config
Fix environ substitutions in `docker commit --change ...`
Upstream-commit: a5de79b435735f8027ffc98072a33a83fc8dea28
Component: engine
2017-12-20 21:01:53 -08:00
aa8a79c526 Merge pull request #35845 from ndeloof/FIX35843
fix #35843 regression on health check workingdir
Upstream-commit: c36d6f5ab10d0dd4e5216fa3b8e2613de38c3ba2
Component: engine
2017-12-21 10:55:15 +09:00
02056dd212 Merge pull request #35838 from marcusmartins/marcus_swarmkit
Vendor docker/swarmkit to 713d79d
Upstream-commit: 9646d07d753b9d92678c625b6f43ed76a71fe83e
Component: engine
2017-12-20 23:47:10 +01:00
c61589a0f0 Add testcase for onbuild command in multi stage build
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: fe4ed9d78f496df5cac1eb914877f213f3f1c12c
Component: engine
2017-12-20 11:56:41 -08:00
d109b596b8 integration-cli: clarify multi-stage tests names
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: e90b7c06b4b08ca2935359667cfac4f05e33819b
Component: engine
2017-12-20 11:55:27 -08:00
2af5d43021 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>
Upstream-commit: 0785836c4b440a8d4a5dfdb8df82e50f9f4d23a1
Component: engine
2017-12-20 11:03:38 -08:00
e0ed436e6c Add integration test for healthcheck workdir
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5be2f2be243a52eb1b051c981bac5442b6e85606
Component: engine
2017-12-20 18:48:36 +01:00
2a820c0f5f fix #35843 regression on health check workingdir
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Upstream-commit: 852a943c773382df09cdda4f29f9e93807523178
Component: engine
2017-12-20 14:04:51 +01:00
88269f42ba 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>
Upstream-commit: b7d204ef6b1b2d6a3bafb42f844cdc146976e68f
Component: engine
2017-12-20 12:49:51 +01:00
e5199a0f6e Fix GoDoc to match actual events-limit
Commit 59d45c384a2de7bca73296ce1471646db14cb0c8 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>
Upstream-commit: fb3935022dbc160fc1531fa43f0ca2db69184800
Component: engine
2017-12-20 12:41:51 +01:00
3b758ede4d 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 ddae20c032058a0fd42c34c2e9750ee8f62) 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
8d056423f8c433927089bd7eb6bc97abbc1ed502, 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>
Upstream-commit: b7ad3e7ea10e285226a0a5b1665e8205b3264128
Component: engine
2017-12-20 12:40:05 +01:00
847487f5da Merge pull request #35778 from estesp/moby-governance
Add Moby TSC references/governance details
Upstream-commit: 267847712e720d624f78ef5364f474ff6635b725
Component: engine
2017-12-20 10:50:47 +01:00
6b042c3e6d install-containerd-static: use netgo buildtag
When compiling containerd binaries statically, linker rightfully
complains:

 + make BUILDTAGS=static_build 'EXTRA_FLAGS=-buildmode pie' 'EXTRA_LDFLAGS=-extldflags "-fno-PIC -static"'
 🇩 bin/ctr
 # github.com/containerd/containerd/cmd/ctr
 /tmp/go-link-343047789/000000.o: In function `_cgo_b0c710f30cfd_C2func_getaddrinfo':
 /tmp/go-build/net/_obj/cgo-gcc-prolog:46: warning: Using 'getaddrinfo'
 in statically linked applications requires at runtime the shared
 libraries from the glibc version used for linking

The same error appears for ctr, containerd, and containerd-stress
binaries.

The fix is to use Go's own DNS resolver functions, rather than
glibc's getaddrinfo() -- this option is turned on by `netgo` build tag.

See https://golang.org/pkg/net/ (look for "Name Resolution") for more
details.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 7368ef96c89fd4f6879addf5214c4a09889a05be
Component: engine
2017-12-19 18:25:02 -08:00
50de5d926a Merge pull request #35812 from stevvooe/follow-conventions
daemon, plugin: follow containerd namespace conventions
Upstream-commit: 745278d24280614145819838b763c3a2d5349b7e
Component: engine
2017-12-19 15:55:39 -08:00
f0d368cb33 vfs gd: ignore quota setup errors
This is a fix to regression in vfs graph driver introduced by
commit 7a1618ced359a3ac92 ("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>
Upstream-commit: 1e8a087850aa9f96c5000a3ad90757d2e9c0499f
Component: engine
2017-12-19 13:55:04 -08:00
3f7322c602 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>
Upstream-commit: af73d31e60fd5c26d58bb8275785e628c3febdc0
Component: engine
2017-12-19 13:23:21 -08:00
760baaebbb Merge pull request #35805 from cpuguy83/fix_kill_containers_on_restart
Ensure containers are stopped on daemon startup
Upstream-commit: c3a9f5d00f48a1487ab005693e23bbaba04a0523
Component: engine
2017-12-19 12:19:47 -08:00