Commit Graph

34775 Commits

Author SHA1 Message Date
a2e4c2ffca LCOW: Write saved manifest.json in Unix paths
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 0a49de4eb551510cf4aafa7d212ec2bb8041f642
Component: engine
2018-03-14 11:56:00 -07:00
c113de75ae LCOW: Graphdriver DiffGetter implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 6b4f989bc2c19be58e10731b9b0504b5f94607bf
Component: engine
2018-03-14 11:55:06 -07:00
d2852cf7ac LCOW: Make sure OS is copied for docker save
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d5c781323d5534a01e42cf8fd8cf773c6f1cdff2
Component: engine
2018-03-14 11:46:46 -07:00
47c7cacdf3 LCOW: Check OS in takeLayerReference
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: d8dbba14fd6a1be91e88082d4d4ba9aafd8c880a
Component: engine
2018-03-14 11:46:35 -07:00
6d58bd7ffc Merge pull request #36571 from kolyshkin/t-win-fail
integration-cli/TestSlowStdinClosing: increase timeout
Upstream-commit: 592a15b7a9a52529429cb81cee0c14983cb1cd95
Component: engine
2018-03-14 12:06:32 +01:00
04f51ce3f0 Merge pull request #36577 from cpuguy83/info_tweaks
Minor optimizations
Upstream-commit: 9e1c4f9906176ee120398d1568e8ff395382d675
Component: engine
2018-03-13 16:48:45 -04:00
951f082fa9 Merge pull request #36538 from ctelfer/ingress-fix
Fix automatic removal of ingress sandbox when last service leaves
Upstream-commit: 514fb6cf859f5d40e4100920b0da1410e51f23bd
Component: engine
2018-03-13 20:56:03 +01:00
2c6fe9c524 Change containerd monitor ticker to sleep
With the ticker this could end up just doing back-to-back checks, which
isn't really what we want here.
Instead use a sleep to ensure we actually sleep for the desired
interval.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 04a0d6b863ed50cfffa79936cf9cdab7a3a9e7df
Component: engine
2018-03-13 13:20:19 -04:00
d15385dab8 Add Len() to image store for info endpoint
In info, we only need the number of images, but `CountImages` was
getting the whole map of images and then grabbing the length from that.
This causes a lot of unnecessary CPU usage and memory allocations, which
increases with O(n) on the number of images.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f6a7763b6f3256bed9a7352021745189d0ca8dc9
Component: engine
2018-03-13 11:58:05 -04:00
59feac96fd Merge pull request #36569 from kolyshkin/t-etc-hosts
TestLinksEtcHostsContentMatch: use container.Exec()
Upstream-commit: fb95dc7eac3ae177d61f7bd67aea5ddeb94454b8
Component: engine
2018-03-13 15:12:59 +01:00
2dcdb5d404 Merge pull request #36567 from kolyshkin/t-parallel
integration/TestContainerShmNoLeak: use --iptables=false
Upstream-commit: 4a65cd4d6d845e895c7c8061080210d74ae5a19b
Component: engine
2018-03-13 08:36:20 -04:00
496c3cdf9d integration-cli/TestSlowStdinClosing: increase timeout
I noticed this test failed on Windows:

> 17:46:24 docker_cli_run_test.go:4361:
> 17:46:24 c.Fatal("running container timed out") // cleanup in teardown

I also noticed that in general tests are running slower on Windows,
for example TestStartAttachSilent (which runs a container with
`busybox echo test` and then starts it again) took 29.763s.
This means a simple container start can easily take 15s, which
explains the above failure.

Double the timeout from 15s to 30s.

Fixes: 4e262f6387 ("Fix race on sending stdin close event")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 5043639645123f2728c81c9a55fea525475ec324
Component: engine
2018-03-12 20:35:28 -07:00
2052fc8774 TestLinksEtcHostsContentMatch: use container.Exec()
I am not quite sure why but this test is sometimes failing like this:

> 15:21:41 --- FAIL: TestLinksEtcHostsContentMatch (0.53s)
> 15:21:41 	assertions.go:226:
>
> 	Error Trace:	links_linux_test.go:46
> 15:21:41
> 	Error:      	Not equal:
> 15:21:41
> 	            	expected: "127.0.0.1\tlocalhost\n::1\tlocalhost
> ip6-localhost
> ip6-loopback\nfe00::0\tip6-localnet\nff00::0\tip6-mcastprefix\nff02::1\tip6-allnodes\nff02::2\tip6-allrouters\n172.17.0.2\tf53feb6df161\n"
> 15:21:41
> 	            	received: ""

To eliminate some possible failures (like ignoring stderr from `cat` or
its exit code), let's use container.Exec() to read a file from a container.

Fixes: e6bd20edcbf ("Migrate some integration-cli test to api tests")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: ad2f88d8ccbd9dd0a8d9c4f96ece3956f60489df
Component: engine
2018-03-12 18:15:16 -07:00
6623004cd4 integration/TestContainerShmNoLeak: use --iptables=false
As mentioned in commit 9e31938, test cases that use t.Parallel()
and start a docker daemon might step on each other toes as they
try to configure iptables during startup, resulting in flaky tests.

To avoid this, --iptables=false should be used while starting daemon.

Fixes: eaa5192856c1 ("Make container resource mounts unbindable")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: c125e10a0486623ba3badebf974ea6e582373151
Component: engine
2018-03-12 14:49:15 -07:00
48cfa9f758 Delete the load balancer endpoint in Ingress nets
Ingress networks will no longer automatically remove their
load-balancing endpoint (and sandbox) automatically when the network is
otherwise upopulated.   This is to prevent automatic removal of the
ingress networks when all the containers leave them.  Therefore
explicit removal of an ingress network also requires explicit removal
of its load-balancing endpoint.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
Upstream-commit: 3da4ebf355d3494d1403b2878a1ae6958b2724e9
Component: engine
2018-03-12 15:19:08 -04:00
06f61ef263 Update vendoring for libnetwork PR #2097
This PR prevents automatic removal of the load balancing sandbox
endpoint when the endpoint is the last one in the network but
the network is marked as ingress.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
Upstream-commit: bebad150c9c3bc6eb63758c10ef24b9298ecf6e2
Component: engine
2018-03-12 15:19:08 -04:00
7b6b17fc7d Add test for ingress removal on service removal
The commit https://github.com/moby/moby/pull/35422 had the result of
accidentally causing the removal of the ingress network when the
last member of a service left the network.  This did not appear
in swarm instances because the swarm manager would still maintain
and return cluster state about the network even though it had
removed its sandbox and endpoint.  This test verifies that after a
service gets added and removed that the ingress sandbox remains
in a functional state.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
Upstream-commit: 805b6a7f749a6c7cbb237e21ee7260d536621808
Component: engine
2018-03-12 15:19:02 -04:00
09262890a9 Merge pull request #36523 from yolken-stripe/36521-configurable-logfile-perms
Make LogFile perms configurable
Upstream-commit: 241c904e6f5fff020890a7641558e83a209c0bbd
Component: engine
2018-03-12 15:07:23 +01:00
4afacfb791 Merge pull request #36489 from thaJeztah/fix-errdef-is
Change return for errdefs.getImplementer()
Upstream-commit: c74cd60473479bc4b857a1b97e4116fd5f0bfdb0
Component: engine
2018-03-12 10:04:41 -04:00
3179450003 Merge pull request #36546 from arm64b/multi-arch-support4Dockerfiles
Unify arch-specific Dockerfiles into multi-arch one
Upstream-commit: 1790ce52e96fd66621b5d8eb2e203203874a7921
Component: engine
2018-03-12 12:36:58 +01:00
d24c1e8528 Remove arch-suffix detection of Dockerfile
Since now we have only one Dockerfile, so the arch-specific suffix
of the Dockerfile is not needed anymore.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 8eb7ed673b687ae17e2c7df5dd40f8081c299bc2
Component: engine
2018-03-12 02:05:37 +00:00
e19b73b949 Arch-specific Dockerfile removal
Removing all the existing arch-specific Dockerfiles since we already
have a new multi-arch supported one as the replacement.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 162f9aee476bd204c2b0146c0128949182e8bd5e
Component: engine
2018-03-12 02:05:37 +00:00
56843d4319 Multiarch support for Dockerfile
This PR consolidates the existing arch-specific Dockerfiles into only
one file `Dockefile` to ease the code maintenance effort.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: f1701a741d77a92d28138944193e23aabfc74abe
Component: engine
2018-03-12 02:05:01 +00:00
de73b08b59 Merge pull request #36550 from dnephin/fix-diff-tests
Remove unnecessary diff tests
Upstream-commit: a575b0b1384b2ba89b79cbd7e770fbeb616758b3
Component: engine
2018-03-11 11:26:50 +09:00
02493cad47 Merge pull request #36526 from kolyshkin/ipc-ro
daemon/setMounts(): do not make /dev/shm ro
Upstream-commit: cda90892aaa03aab59848a79a701fd09b663c3cc
Component: engine
2018-03-10 10:30:22 -08:00
ef5c3d2c0a Merge pull request #36504 from dmcgowan/layer-store-remove-metastore-interface
layer: remove metadata store interface
Upstream-commit: b9cc5cba6964b565e8b2cf1ff50c3e946a924fc8
Component: engine
2018-03-10 12:22:08 +01:00
e11a0c3a06 Merge pull request #36519 from stevvooe/resilient-cpu-sampling
daemon/stats: more resilient cpu sampling
Upstream-commit: 623b1a5c3c7d6b4d6d5943b64bd9ae6a7813786e
Component: engine
2018-03-09 14:34:45 -08:00
1eac9f0c3c Remove unnecessary diff tests
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 038f3add5191240058c7a4154556553c5493ea44
Component: engine
2018-03-09 12:32:50 -05:00
0d25ace2cb Merge pull request #36539 from tophj-ibm/skip-oom-tests-ppc64le
[integration] skip ppc64le oom tests temporarily
Upstream-commit: c8f9e14b500b1b2e23e79c52ded0aee05579d9bc
Component: engine
2018-03-09 09:53:00 +01:00
e31b1923c7 Merge pull request #36506 from kolyshkin/pkg-mount-slice
pkg/mount: use sort.Slice
Upstream-commit: a21d5bf669571ffc7ad31b8df3c0a632dc207b78
Component: engine
2018-03-09 09:46:53 +01:00
671826c75d [integration] skip ppc64le oom tests for now
These tests were enabled by changing a config option on the ci
machines, instead of from a patch, so let me disable them
for now on ppc64le and open up another patch to enable them, where I can find
out what the issues are with them.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 620ddc78a1437feaa42f40853ef586d268991620
Component: engine
2018-03-08 17:51:37 -06:00
11d01cef44 daemon/setMounts(): do not make /dev/shm ro
It has been pointed out that if --read-only flag is given, /dev/shm
also becomes read-only in case of --ipc private.

This happens because in this case the mount comes from OCI spec
(since commit 7120976d74195), and is a regression caused by that
commit.

The meaning of --read-only flag is to only have a "main" container
filesystem read-only, not the auxiliary stuff (that includes /dev/shm,
other mounts and volumes, --tmpfs, /proc, /dev and so on).

So, let's make sure /dev/shm that comes from OCI spec is not made
read-only.

Fixes: 7120976d74195 ("Implement none, private, and shareable ipc modes")

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: cad74056c09f6276b0f4a996a1511553177cd3d7
Component: engine
2018-03-08 14:04:03 -08:00
d36dd1e792 daemon/oci_linux_test: add TestIpcPrivateVsReadonly
The test case checks that in case of IpcMode: private and
ReadonlyRootfs: true (as in "docker run --ipc private --read-only")
the resulting /dev/shm mount is NOT made read-only.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 33dd562e3acff71ee18a2543d14fcbecf9bf0e62
Component: engine
2018-03-08 14:04:03 -08:00
d56f856549 Merge pull request #36518 from seemethere/fix_static_builds
Build containerd, runc, and proxy statically
Upstream-commit: 0c01629e17752749b32422e327d47764ce23baac
Component: engine
2018-03-08 13:59:34 +01:00
7856345e7b Merge pull request #36505 from kolyshkin/pkg-mount-tests
pkg/mount unit tests: skip some test under non-root
Upstream-commit: 4a1d35c546c4a5df3353f5984d86671f702a315a
Component: engine
2018-03-08 17:27:31 +09:00
882fe67e01 Make logfile perms configurable
Signed-off-by: Benjamin Yolken <yolken@stripe.com>
Upstream-commit: d0c1287a8d3aa0391b4e8bfbe867ec8f0e639a51
Component: engine
2018-03-07 15:18:51 -08:00
3398cf7be9 buildmod => buildmode
There was a typo with the buildmode flag for containerd

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 5e4885b9afb1de30133627ce751af2c0e7b72a4e
Component: engine
2018-03-07 21:36:23 +00:00
b6d64a77d2 Build containerd, runc, and proxy statically
These were originally static binaries in the first place, this changes
them back to that.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 63c7bb24637fdbfd905096ecc75b435ecefd31e9
Component: engine
2018-03-07 21:29:10 +00:00
aa0ca25049 daemon/stats: more resilient cpu sampling
To avoid noise in sampling CPU usage metrics, we now sample the system
usage closer to the actual response from the underlying runtime. Because
the response from the runtime may be delayed, this makes the sampling
more resilient in loaded conditions. In addition to this, we also
replace the tick with a sleep to avoid situations where ticks can backup
under loaded conditions.

The trade off here is slightly more load reading the system CPU usage
for each container. There may be an optimization required for large
amounts of containers but the cost is on the order of 15 ms per 1000
containers. If this becomes a problem, we can time slot the sampling,
but the complexity may not be worth it unless we can test further.

Unfortunately, there aren't really any good tests for this condition.
Triggering this behavior is highly system dependent. As a matter of
course, we should qualify the fix with the users that are affected.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: fd0e24b7189374e0fe7c55b6d26ee916d3ee1655
Component: engine
2018-03-07 13:20:21 -08:00
1158d96fc9 Merge pull request #36307 from kolyshkin/dm-misc
devmapper cleanup improvements
Upstream-commit: bc7424b4434443b036604277bfcdee3fa34a268a
Component: engine
2018-03-07 12:57:21 -08:00
2c2dcf7989 Merge pull request #36451 from Microsoft/jjh/ubr
Windows: Report Version and UBR
Upstream-commit: 8cf8fe9cf80a07d4e68829f619ea2c71fbb5af0c
Component: engine
2018-03-07 06:27:01 -08:00
9e6eb16d6f Merge pull request #36502 from thaJeztah/remove-duplicate-test
Remove duplicate TestServiceUpdatePort
Upstream-commit: f3a3778808dae0da82f2acf300875b5da931c000
Component: engine
2018-03-06 15:18:30 -08:00
c617524866 pkg/mount: use sort.Slice
Sorting by mount point length can be implemented in a more
straightforward fashion since Go 1.8 introduced sort.Slice()
with an ability to provide a less() function in place.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: a00310b54c0cdcafb402aeea92feca865da9fdf3
Component: engine
2018-03-06 12:46:58 -08:00
db90a864e8 pkg/mount unit tests: skip some test under non-root
This makes `go test .` to pass if run as non-root user, skipping
those tests that require superuser privileges (for `mount`).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 4aae77602a7540b4f977572f3fbdc0891ac57cab
Component: engine
2018-03-06 12:37:27 -08:00
18ad0fab61 Merge pull request #36494 from stevvooe/remove-unnecessary-types-file
daemon/stats: remove obnoxious types file
Upstream-commit: 4db41f1a69fc38337baaee9edb763a3672fa047c
Component: engine
2018-03-06 11:52:56 -08:00
b6580d6c65 Remove metadata store interface
Layer metadata storage has not been implemented outside of the layer
store and will be deprecated by containerd metadata storage. To prepare
for this and freeze the current metadata storage, remove the exported
interface and make it internal to the layer store.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 0aebcbc32dc6a7b35982a2bfc44335562cbb68ec
Component: engine
2018-03-06 10:42:00 -08:00
f51e800a06 Remove duplicate TestServiceUpdatePort
The TestAPIServiceUpdatePort test performs exactly
the same steps.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 36e1646e4f010ea033643c6df3d9c3dccc166ed2
Component: engine
2018-03-06 16:17:13 +01:00
0aaffbe844 Merge pull request #36417 from NobodyOnSE/patch-2
Whitelist statx syscall
Upstream-commit: f0694e968fe600efdf24ab0d3a1b0e887267aea2
Component: engine
2018-03-06 14:33:56 +01:00
062463b48b Merge pull request #36316 from selansen/36247
Fix to address regression caused by PR 30897
Upstream-commit: 0b0af855ae28698f8e3dc97cdc2a46e714ce6b6a
Component: engine
2018-03-06 13:40:29 +01:00
46b936e807 Merge pull request #36493 from cpuguy83/add_plugin_timeout_test
Adds a unit test for plugin request timeout
Upstream-commit: 390b74cb6376e70f9376b96a8a82557124e67a9b
Component: engine
2018-03-06 12:45:17 +01:00