Commit Graph

32859 Commits

Author SHA1 Message Date
7fc438fe9a TestPostContainerAttach: minor improvements
When this test fails, the error looks like this:

> FAIL: docker_api_attach_test.go:98: DockerSuite.TestPostContainersAttach
> docker_api_attach_test.go:211:
>     c.Assert(actualStdout.Bytes(), checker.DeepEquals, []byte("hello\nsuccess"), check.Commentf("Attach didn't return the expected data from stdout"))
> ... obtained []uint8 = []byte{0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73}
> ... expected []uint8 = []byte{0x68, 0x65, 0x6c, 0x6c, 0x6f, 0xa, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73}
> ... Attach didn't return the expected data from stdout

Let's use strings for comparisons to make the output more readable.

While at it,
- get the container's stderr as well, and make sure it's empty;
- check that stdcopy.StdCopy() did not return an error, except for
  the timeout which is expected;
- move/remove comments, simplify var names.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: ecc54889c9a233d558b578dfd48eb5d84506a62a
Component: engine
2018-05-03 10:15:48 -07:00
95b93fdfcd Merge pull request #36692 from katakonst/unique_names_container_rename_Test
Use unique names for container/rename_test.go
Upstream-commit: 7cfd3f4229c82ba61fa13a8818b8ecf58a2dcdbf
Component: engine
2018-03-26 11:29:01 +01:00
8590eff8c7 Merge pull request #36694 from thaJeztah/update-ripcurld-handle
Update curators list
Upstream-commit: e5eb527ebd773ed3e40fcb0d2b74a37ab807d777
Component: engine
2018-03-26 11:13:58 +01:00
2f8d388ea0 Merge pull request #36646 from anusha-ragunathan/err_return
Add missing error return for plugin creation.
Upstream-commit: 6b3f66c4188b573534a6887668b9fb213cc489e9
Component: engine
2018-03-26 18:34:47 +09:00
744fc0b049 Update curators list
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c85ee9828cb718f2ef83ee3876cef46b9eb3b82c
Component: engine
2018-03-26 10:39:52 +02:00
d1631a824d Use unique names for container/rename_test.go
Signed-off-by: Catalin Pirvu <pirvu.catalin94@gmail.com>
Upstream-commit: 90b514922bb6405bc06428702b1a55bb248bdac3
Component: engine
2018-03-25 21:16:32 +03:00
e3d080dac1 Add missing error return for plugin creation.
Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
Upstream-commit: 89a882e2f1706e567a8514209701892b40da7a62
Component: engine
2018-03-23 12:07:43 -07:00
6b1f053c14 Merge pull request #36672 from anshulpundir/election
Increase raft ElectionTick to 10xHeartbeatTick
Upstream-commit: 5f17312653c3e4dc5474f86692b09f06262a1ebd
Component: engine
2018-03-23 19:57:24 +01:00
160d042de0 Merge pull request #35149 from AkihiroSuda/image-v1
image/spec: add historical information about v1 spec
Upstream-commit: 2e3056128cc839b5fdee8edeb651f4ecc244db78
Component: engine
2018-03-23 16:47:16 +01:00
38f9066976 Merge pull request #36676 from arm64b/enable-criu-on-non-arm64-v2
Enable CRIU on non-amd64 architectures (v2)
Upstream-commit: 52d3dceac548e70ad9cebc4c755adc2c0774dc11
Component: engine
2018-03-23 13:05:45 +01:00
dd8e748718 Merge pull request #36509 from xujihui1985/master
fix(distribution): digest cache should not be moved if it was an auth
Upstream-commit: c3b3be529693316412111e81860ba293a3668f0f
Component: engine
2018-03-23 11:17:43 +01:00
2bc1fa895f Remove the uname -m in Dockerfile
Using `dpkg --print-architecture` instead of the `uname -m` to abstract
the architecture value from the container images, which the build process
is running inside, to match exactly the behavior specified by the following
Docker file while not 'passthru' to the host.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 803a756941f5e4b68429a3642d52585c8ea6dbaa
Component: engine
2018-03-23 08:56:35 +00:00
985dd23e4a Enable CRIU on non-amd64 architectures
Since the recent release of CRIU has already supported other
arches such as AArch64, ppc64le, and s390x, so we can enable
it now.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 7fd54a7a48f9f1bb2b28144e38c886d1fe813a04
Component: engine
2018-03-23 05:52:35 +00:00
5656978b1e Merge pull request #36662 from adshmh/use-unique-resource-names-for-container-inspect-ps-stop-integration-tests
Use unique names for test resources of container/inspect, container/ps, container/stop tests
Upstream-commit: 57c504799d979caa706142e6f5dc4be4a5b1e3e2
Component: engine
2018-03-23 12:16:53 +09:00
de2245153e Increase raft ElectionTick to 10xHeartbeatTick
Signed-off-by: Anshul Pundir <anshul.pundir@docker.com>
Upstream-commit: 6abee2008b314a65553202b15d9a333d171e3433
Component: engine
2018-03-22 15:04:10 -07:00
f358bd4b47 daemon: use context error rather than inventing new one
Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: d84da75f01e0a0d20fbddb8b051a325e3b21eded
Component: engine
2018-03-22 09:38:59 -07:00
10376dc96a Merge pull request #36663 from tonistiigi/hijackconn-fix
client: fix hijackedconn reading from buffer
Upstream-commit: 69091990c72f3a3a6143fe6417a769e7a1a1ff1a
Component: engine
2018-03-22 17:10:06 +01:00
1f699969f9 Merge pull request #36587 from justincormack/unpriv-caps
If container will run as non root user, drop permitted, effective caps early
Upstream-commit: b67c1e078c7eeb20199dce301e95fa8999c98109
Component: engine
2018-03-22 14:51:29 +01:00
34dd223936 Merge pull request #36647 from adshmh/use-unique-names-for-container-nat-test-containers
use unique names for test containers of container/nat integration tests 
Upstream-commit: 00c59ed77e186b6f9056bb8e0a2700767b4be383
Component: engine
2018-03-22 14:03:36 +01:00
3db81e37ca Merge pull request #36172 from kolyshkin/systemd-memlimit
Test for systemd cgroupdriver memory setting
Upstream-commit: e2bede01e4a6a6f84e33e2a6debf2cfed5938828
Component: engine
2018-03-22 13:36:43 +01:00
2748b681fe Merge pull request #36653 from thaJeztah/refactor-windows-service-code
Split daemon service code to _windows file
Upstream-commit: 3baa5889592894a9d39938aa8fdf08e879cb8a25
Component: engine
2018-03-22 21:14:17 +09:00
4ad54eacb8 client: fix hijackedconn reading from buffer
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: f094a05e260d8748f0fd2018a8a908b4189e454d
Component: engine
2018-03-21 15:29:44 -07:00
809b43730d use unique names for resources used by integration tests container/inspect_test, container/ps_test, container/stop_test
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 78e4be91332e2237c0fa14eb3ba0fb5b915c3256
Component: engine
2018-03-21 17:47:49 -04:00
f95a3e7bb8 Fix for Flaky test TestServiceWithPredefinedNetwork
TestServiceWithPredefinedNetwork test case was failing
	at times. To fix the issue, added new API to check
	for services after we clean up all services. Tested
	multiple times and this sould fix flaky issue.

Signed-off-by: selansen <elango.siva@docker.com>
Upstream-commit: dabffd806c98ab13dbc25e57bee21c5291b9a50c
Component: engine
2018-03-21 11:49:23 -04:00
bc6cc53700 Split daemon service code to _windows file
This moves some of the code that was conditionally
executed on Windows to a separate, windows-only file.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: cd3e84c6b38e74d03ab31db804bc9b49dcab8243
Component: engine
2018-03-21 12:57:53 +01:00
5509cd2416 Merge pull request #36594 from vdemeester/e2e-more-run
integration/*: make e2e run without failure
Upstream-commit: 4460472f4ee419794bb416d131c92dc296b5c625
Component: engine
2018-03-21 08:54:39 +01:00
81ade09fe5 Merge pull request #36515 from vdemeester/migrate-trusted-suite
Remove DockerTrustSuite to docker/cli e2e tests
Upstream-commit: 8aa694c91ac727351ebb1deaacad62149e984fd6
Component: engine
2018-03-21 08:50:59 +01:00
3d5d533860 container/nat integration tests use unique names for test containers
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: b4d1547af6b91baa2ffcb8a391c35d9bc5cdc48f
Component: engine
2018-03-20 17:11:03 -04:00
1c15bdeddb Merge pull request #36466 from thaJeztah/fix-exec-apparmor
Fix AppArmor not being applied to Exec processes
Upstream-commit: 0c1006f1abc1af7aa6b9847754370d054dfa6c68
Component: engine
2018-03-19 15:12:41 -07:00
3d783d5dbf If container will run as non root user, drop permitted, effective caps early
As soon as the initial executable in the container is executed as a non root user,
permitted and effective capabilities are dropped. Drop them earlier than this, so
that they are dropped before executing the file. The main effect of this is that
if `CAP_DAC_OVERRIDE` is set (the default) the user will not be able to execute
files they do not have permission to execute, which previously they could.

The old behaviour was somewhat surprising and the new one is definitely correct,
but it is not in any meaningful way exploitable, and I do not think it is
necessary to backport this fix. It is unlikely to have any negative effects as
almost all executables have world execute permission anyway.

Use the bounding set not the effective set as the canonical set of capabilities, as
effective will now vary.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 15ff09395c001bcb0f284461abbc404a1d8bab4d
Component: engine
2018-03-19 14:45:27 -07:00
24ded82e63 Merge pull request #36633 from adshmh/add-missing-setup-test-call-to-TestNetworkLoopbackNat
Add the missing call to setupTest to TestNetworkLoopbackNat test
Upstream-commit: 60e2dc26864370a315dbbb8e3325fe5cc78ba5d5
Component: engine
2018-03-19 20:45:22 +01:00
c9d18328ef Merge pull request #29932 from miaoyq/container-log-add-archive
add support for compressibility of log file
Upstream-commit: c4e93da8a6fcd206e3fbfb07b821b5743f90f437
Component: engine
2018-03-19 15:20:17 -04:00
6bad7e6180 Test for systemd cgroupdriver memory setting
This is a test case for issue https://github.com/moby/moby/issues/35123,
making sure we can set container's memory limit when using
`native.cgroupdriver=systemd`.

[v2: skip if no systemd present]
[v3: add --iptables=false to avoid flaky tests with t.Parallel()]
[v4: rebase after PR#36507 merge]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 4ca5c5361059e29ed31074ca5b96f8b2030b5f99
Component: engine
2018-03-19 10:33:03 -07:00
ef1461a872 Add the missing call to setupTest to TestNetworkLoopbackNat test function, to avoid leaving behind test containers
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: a0052b8f190f38bcdd24e4bf794c3ad6d2fd1b41
Component: engine
2018-03-19 10:56:13 -04:00
27bd98bb9a Merge pull request #36617 from Microsoft/jjh/kernel-registry
Windows: Move kernel_windows to use golang registry functions
Upstream-commit: 7270b01e5dd1fca3fd7fed0d6fb9d2769ec5f4ba
Component: engine
2018-03-19 11:47:17 +01:00
d36e75fc44 integration/*: make e2e run without failure
… mainly by skipping if daemon is remote.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6016e79d2552b21643f4bfd093ce76d8ef956d79
Component: engine
2018-03-19 09:47:17 +01:00
aac739f262 Migrate DockerTrustSuite to docker/cli e2e tests
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 5433ceb12ead305d8c85e8e27c4b4d842ef88ae0
Component: engine
2018-03-19 09:26:35 +01:00
559e0317a4 Merge pull request #36507 from dnephin/use-gty-assert
Replace testify/assert with gotestyourself/assert
Upstream-commit: 7bda5be956eb1123d597b3c497d938c4d6df3327
Component: engine
2018-03-19 09:08:06 +01:00
dd2d0c4792 fix(distribution): digest cache should not be moved if it was an auth
error

local digest cache will be removed when error occured on push image
but it should not be removed if it is an auth error while on auth was
provided

https://github.com/moby/moby/issues/36309
Signed-off-by: 慕陶 <jihui.xjh@alibaba-inc.com>
Upstream-commit: 8b387b165ab2eaab3f9fdac25caa186d05d236a0
Component: engine
2018-03-17 17:29:01 +08:00
5c48fab022 Merge pull request #36609 from thaJeztah/fix-stats-loop
Fix stats collector spinning CPU if no stats are collected
Upstream-commit: 72ba7f593fa4dbb628cf5ee83cd7daf955934cf5
Component: engine
2018-03-16 10:35:10 -07:00
ad67257ea2 Windows: Move kernel_windows to use golang registry functions
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 29f93c4bc7bb2fbbaaa8c3f809e858ce1f12a0f2
Component: engine
2018-03-16 09:47:45 -07:00
047c647903 Update testing doc
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 58de6277821698a2f97d1a0c83664ab34ff2e8d8
Component: engine
2018-03-16 11:03:47 -04:00
0fdeea8152 Cleanup pkg/jsonmessage progress tests
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 7d8815ea705e85a73248b5d9e468f9dc65277bb8
Component: engine
2018-03-16 11:03:47 -04:00
0331f04e35 Post migration assertion fixes
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c9e52bd0da0461e605a3678b85702f83081504a7
Component: engine
2018-03-16 11:03:46 -04:00
60daf5fa97 Automated migration using
gty-migrate-from-testify --ignore-build-tags

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6be0f709830113966f295401327b027ec2f0bbca
Component: engine
2018-03-16 11:03:43 -04:00
1c9c9f9e72 Cleanup some assertions
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: ef01dea8935932486f03a37069720987e805dce6
Component: engine
2018-03-16 10:54:54 -04:00
59efca5b6e Update vendor
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 073963e3b770efbdf8bd4b4f92d46b2c62eaf434
Component: engine
2018-03-16 10:54:54 -04:00
8366463034 Merge pull request #36606 from kolyshkin/t-36561
integration/TestExportContainerAfterDaemonRestart: add
Upstream-commit: 823de22db611d5079fcc92788a89897daba6f389
Component: engine
2018-03-16 12:07:46 +01:00
da9945b5a8 Merge pull request #36584 from cpuguy83/volume_store_tests
Add some tests to the volume store
Upstream-commit: bbf568e41c15b609b14a07806cc028972aa7dcd2
Component: engine
2018-03-16 09:12:55 +01:00
f89e535fb8 Windows: Fix Hyper-V containers regression from 36586
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 0f5fe3f9cf17457761dab28473ece5a7c94f4a0c
Component: engine
2018-03-15 15:36:36 -07:00