Commit graph

4858 commits

Author SHA1 Message Date
Brian Goff
5bbf5cc671 Set selinux label on local volumes from mounts API
When using a volume via the `Binds` API, a shared selinux label is
automatically set.
The `Mounts` API is not setting this, which makes volumes specified via
the mounts API useless when selinux is enabled.

This fix adopts the same selinux label for volumes on the mounts API as on
binds.
Note in the case of both the `Binds` API and the `Mounts` API, the
selinux label is only applied when the volume driver is the `local`
driver.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-09-19 10:46:38 -04:00
Vincent Demeester
7cd7cf9167 Merge pull request #34856 from dnephin/cleanup-version-tests
Replace old version tests
2017-09-19 10:34:50 +02:00
Yong Tang
b075cd2d78 Merge pull request #34495 from ripcurld0/registry_mirror_json
Exit if service config is loaded unsuccessfully on startup
2017-09-18 21:59:14 -07:00
Yong Tang
cfdac1245a Merge pull request #34550 from kolyshkin/libeudev
Update Dockerfiles to use Debian Stretch
2017-09-18 21:03:31 -07:00
Victor Vieux
a2ee40b98c Merge pull request #34674 from pradipd/windows_routingmesh
Enabling ILB/ELB on windows using per-node, per-network LB endpoint.
2017-09-18 15:56:17 -07:00
Pradip Dhara
9bed0883e7 Enabling ILB/ELB on windows using per-node, per-network LB endpoint.
Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
2017-09-18 20:27:56 +00:00
Vincent Demeester
9be245f438 Merge pull request #34805 from chris-crone/containerize-integration-tests
Containerize integration tests
2017-09-18 21:11:06 +02:00
Kir Kolyshkin
14f0a1888f integration-cli/docker_cli_logs_test.go: Wait()
To avoid a zombie apocalypse, use cmd.Wait() to properly finish
the processes we spawn by Start().

Found while investigating DockerSuite.TestLogsFollowSlowStdoutConsumer
failure on ARM (see
https://github.com/moby/moby/pull/34550#issuecomment-324937936).

[v2: don't expect no error from Wait() when process is killed]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-09-18 11:18:36 -07:00
Kir Kolyshkin
1bc93bff22 TestLogsFollowSlowStdoutConsumer: fix for slow ARM
We run our CI on Scaleway C1 machine, which is pretty slow,
including I/O. This test was failing on it, as it tried to
write 100000 lines of log very fast, and the loggerCloseTimeout
(defined and used in container/monitor.go) prevents the
daemon to finish writing it within this time frame,

Reducing the size to 150000 characters (75000 lines) should
help avoiding hitting it, without compromising the test case
itself.

Alternatively, we could have increased the timeout further. It was
originally set to 1s (commit b6a42673a) and later increased 10x
(commit c0391bf55). Please let me know if you want me to go that way.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-09-18 08:47:55 -07:00
Kir Kolyshkin
771256b305 TestRunSeccompProfileAllow32Bit: fix
Since the update to Debian Stretch, this test fails. The reason is dynamic
binary, which requires i386 ld.so for loading (and apparently it is no longer
installed by default):

> root@09d4b173c3dc:/go/src/github.com/docker/docker# file exit32-test
> exit32-test: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, BuildID[sha1]=a0d3d6cb59788453b983f65f8dc6ac52920147b6, stripped
> root@09d4b173c3dc:/go/src/github.com/docker/docker# ls -l /lib/ld-linux.so.2
> ls: cannot access '/lib/ld-linux.so.2': No such file or directory

To fix, just add -static.

Interestingly, ldd can'f figure it out.

> root@a324f8edfcaa:/go/src/github.com/docker/docker# ldd exit32-test
>	not a dynamic executable

Other tools (e.g. objdump) also show it's a dynamic binary.

While at it, remove the extra "id" argument (a copy-paste error I
guess).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-09-17 22:04:31 -07:00
Boaz Shuster
5258297dac Exit if service config is loaded unsuccessfully on startup
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2017-09-17 18:50:16 +03:00
Yong Tang
c5c0702a4d Merge pull request #34842 from dnephin/fix-integration-on-timeout
[integration-cli] Only attempt to find pid with local daemon
2017-09-16 06:48:18 -07:00
Daniel Nephin
813d2e082a Replace old version tests
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-09-15 12:56:09 -04:00
Christopher Crone
b7d8d2c4ab Various fixes
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2017-09-15 16:01:15 +02:00
Christopher Crone
eb396e8984 Remove erroneous Println
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2017-09-15 13:02:27 +02:00
Akash Gupta
7a7357dae1 LCOW: Implemented support for docker cp + build
This enables docker cp and ADD/COPY docker build support for LCOW.
Originally, the graphdriver.Get() interface returned a local path
to the container root filesystem. This does not work for LCOW, so
the Get() method now returns an interface that LCOW implements to
support copying to and from the container.

Signed-off-by: Akash Gupta <akagup@microsoft.com>
2017-09-14 12:07:52 -07:00
Yong Tang
2a54dc0804 Merge pull request #34332 from clnperez/logrus-revendor
revendor logrus and x/crypto
2017-09-14 11:29:05 -07:00
Christopher Crone
7dabed019a Fixes after dnephin review
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2017-09-14 19:27:09 +02:00
Christopher Crone
81f69a5931 Fix Windows build
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2017-09-14 19:27:09 +02:00
Christopher Crone
61b13ba0d1 Test requires SameHostDaemon
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2017-09-14 19:27:09 +02:00
Christopher Crone
85431566a8 Set client version instead of negotiating it
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2017-09-14 19:27:09 +02:00
Christopher Crone
42d812df0a Bring up DockerNetworkSuite
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2017-09-14 19:27:09 +02:00
Christopher Crone
6936ce3b65 Remove race and split TestAPINetworkInspect test
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2017-09-14 19:27:09 +02:00
Christopher Crone
86f9eb4a08 Fixes for dnephin review
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2017-09-14 19:27:09 +02:00
Christopher Crone
f089a1df39 Skip some tests for E2E
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2017-09-14 19:27:09 +02:00
Christopher Crone
b1fb41988d Check integration test requirements using daemon
When running against a remote daemon, we cannot use the local
filesystem to determine configuration.

Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2017-09-14 19:27:09 +02:00
Christopher Crone
0bdba0e91a Use TLS for tests if needed
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2017-09-14 19:27:09 +02:00
Christopher Crone
dc6ddfa841 Fix tests that depend on clean environment
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2017-09-14 19:27:09 +02:00
Christopher Crone
d622e81af5 Add E2E requirement for integration tests
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2017-09-14 19:27:09 +02:00
Christopher Crone
063c89c71f Protect entire environment when testing
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2017-09-14 19:27:09 +02:00
Christy Perez
008b217844 revendor logrus and x/crypto
this fixes the issue that was blocking a test from running on ppc64le.
the logrus revendor changes the color code used in that same test, so
that breaks the test for all platforms (updated in this pr)

Signed-off-by: Christy Perez <christy@linux.vnet.ibm.com>
2017-09-14 11:05:47 -05:00
Daniel Nephin
014cecda46 Only attempt to find pid with local daemon
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-09-14 12:05:18 -04:00
Vincent Demeester
3a081f53c1 Merge pull request #34837 from tophj-ibm/switch-hub-test-to-alpine
[integration-cli] fix p/z HubPullSuite tests
2017-09-14 18:02:13 +02:00
Christopher Jones
5739ba1b91
[integration-cli] fix p/z HubPullSuite tests
This test tries to pull all the tags in the busybox repo and looks to see
if there were more than two images pulled. This was failing on
p/z due to the recent change to manifest lists, where one of the busybox
tags didn't have a p/z manifest in it's manifest list.

This error seems fine to me, so I changed the test to see if pull fails,
it fails with the "manifest not found" error.

Also switched from busybox -> alpine, because it has significantly less tags,
and the images are close in size.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
2017-09-14 09:42:09 -04:00
Vincent Demeester
bb0e8ee51c Merge pull request #34784 from dnephin/fix-client-not-found
Cleanup client not found errors
2017-09-14 12:04:56 +02:00
Yong Tang
2ee8ef864f Merge pull request #34686 from mion00/templating-node-hostname-support
Add support for .Node.Hostname templating in swarm services
2017-09-13 21:06:11 -07:00
John Howard
b291f5a317 LCOW: Spot fix for multi-os image pulling
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-09-12 23:33:34 -07:00
Daniel Nephin
81bb9978ab Cleanup client not found errors.
And fix remove calls to return a notFound error

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-09-11 19:53:18 -04:00
Brian Goff
bf3a8bddeb Merge pull request #34761 from dnephin/fix-mount-create-api-test
Some cleanup of mount create API test
2017-09-07 17:09:19 -04:00
Yong Tang
d76f0d4e06 Merge pull request #34757 from dnephin/fix-test-run-environment
Fix TestRunEnvironment
2017-09-07 11:28:57 -07:00
Yong Tang
2dcb77b24c Merge pull request #34738 from wgliang/optimization1
Optimize some wrong usage and spelling
2017-09-07 09:45:14 -07:00
Vincent Demeester
72eb1d0a47 Merge pull request #34730 from simonferquel/fix-TestEventsOOMDisableTrue-flakkyness
Events CLI tests: fix flakyness of TestEventsOOMDisableTrue
2017-09-07 11:16:37 +02:00
wangguoliang
94cefa2145 Optimize some wrong usage and spelling
Signed-off-by: wgliang <liangcszzu@163.com>
2017-09-07 09:44:08 +08:00
Daniel Nephin
58b96aced8 Some cleanup of mount create API test
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-09-06 19:32:35 -04:00
Daniel Nephin
fff605c3b3 Fix a bad assumption
If the empty variable happens to be sorted to the end of the list then TrimSpace()
would remove it. Instead only strip the single trailing newline.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-09-06 17:32:56 -04:00
Victor Vieux
8e6567cb83 force inspect test format
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-09-05 08:31:44 -07:00
Simon Ferquel
adf75503db Avoid failing the test if container is already stopped
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
2017-09-05 17:19:57 +02:00
Carlo Mion
e2f09fa6dd Add support for .Node.Hostname templating in swarm services
Signed-off-by: Carlo Mion <mion00@gmail.com>
2017-09-02 10:06:16 +02:00
Daniel Nephin
6590ee0dfb Remove assertions that were testing CLI behaviour.
These tests will be moved to docker/cli

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-08-31 18:19:17 -04:00
Yong Tang
184cea5ff7 Merge pull request #34656 from dnephin/move-testenv-to-internal
Move integration-cli/environment to an internal package
2017-08-31 08:52:24 -07:00