Commit Graph

4645 Commits

Author SHA1 Message Date
440d8b67e7 Merge pull request #33006 from dperny/service-logs-fix-hanging-logs-removed-containers-no-wait
Fix an issue with service logs hanging
Upstream-commit: 7ca86796c94c7ae0c62680ac664f97ab5f35ebec
Component: engine
2017-05-05 15:16:13 -07:00
d0052ddc0d fix expected output in tests
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: f47a61c42957c0a98944a0723b3807aa4d07ed8e
Component: engine
2017-05-05 12:14:30 -07:00
a8b3ac7249 Remove cmd/docker and other directories in cli/ in accordance with the new Moby project scope
Starting with this commit, integration tests should no longer rely on
the docker cli, they should be API tests instead. For the existing tests
the scripts will use a frozen version of the docker cli with a
DOCKER_API_VERSION frozen to 1.30, which should ensure that the CI remains
green at all times.

To help contributors develop and test manually with a modified docker
cli, this commit also adds a DOCKER_CLI_PATH environment variable to the
Makefile. This allows to set the path of a custom cli that will be
available inside the development container and used to run the
integration tests.

Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 32915b1d0a315598edb737785d0357b5a1b8aa11
Component: engine
2017-05-05 12:14:29 -07:00
bd17f42bef Add docker build --iidfile=FILE
This is synonymous with `docker run --cidfile=FILE` and writes the digest of
the newly built image to the named file. This is intended to be used by build
systems which want to avoid tagging (perhaps because they are in CI or
otherwise want to avoid fixed names which can clash) by enabling e.g. Makefile
constructs like:

    image.id: Dockerfile
    	docker build --iidfile=image.id .

    do-some-more-stuff: image.id
    	do-stuff-with <image.id

Currently the only way to achieve this is to use `docker build -q` and capture
the stdout, but at the expense of losing the build output.

In non-silent mode (without `-q`) with API >= v1.29 the caller will now see a
`JSONMessage` with the `Aux` field containing a `types.BuildResult` in the
output stream for each image/layer produced during the build, with the final
one being the end product.  Having all of the intermediate images might be
interesting in some cases.

In silent mode (with `-q`) there is no change, on success the only output will
be the resulting image digest as it was previosuly.

There was no wrapper to just output an Aux section without enclosing it in a
Progress, so add one here.

Added some tests to integration cli tests.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
Upstream-commit: 5894bc1abf8186802d360d20739b57bfffed51df
Component: engine
2017-05-05 16:35:54 +01:00
06646a47aa Fix an issue with service logs hanging
Fixed an issue where service logs would hang if the container backing a
task was deleted by not waiting for containers to be ready if we're not
following logs.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 80c3ec027d9fd4f7ea2080adc08fc741f8909b2e
Component: engine
2017-05-04 12:13:14 -07:00
d3da06632a Fix run with entrypoint in base image
Update a test to use a base image with entrypoint to that the linux build
has at least one test that behaves like all the windows tests.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: d9371ee80764d0eecf7b8a562121f0a6234167a3
Component: engine
2017-05-03 10:59:38 -04:00
8e846811d4 Remove ContainerUpdateCmdOnBuild, it does nothing.
Set a blank entrypoint to preserve the old behaviour.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 97f860716497f6f75236b72e4af90e01afad832c
Component: engine
2017-05-03 10:59:38 -04:00
dbcc3f98b6 Cleanup all the mutate + defer revert of b.runConfig in the builder
Instead of mutating and reverting, just create a copy and pass the copy
around.

Add a unit test for builder dispatcher.run

Fix two test failures

Fix image history by adding a CreatedBy to commit options. Previously the
createdBy field was being created by modifying a reference to the runConfig that
was held from when the container was created.

Fix a test that expected a trailing slash. Previously the runConfig was being
modified by container create. Now that we're creating a copy of runConfig
instead of sharing a reference the runConfig retains the trailing slash.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9f738cc574d50d0a2accdf6f6deb30405c24a80c
Component: engine
2017-05-01 18:36:53 -04:00
5d06c101d8 Fix cache miss when builtin build args are used.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 721e1736ae31914902d2c2196aed5f92e1a0982d
Component: engine
2017-04-28 12:49:50 -04:00
8a2cc25685 Merge pull request #32828 from cyli/external-ca-cert
Add the `CACert` parameter to the `ExternalCA` object
Upstream-commit: 25058d9b0c1414a0c7fa1aef5dd1766aaf2e1c30
Component: engine
2017-04-28 10:30:57 -04:00
9f6af10310 Merge pull request #32763 from dave-tucker/fix-32744
builder: Make builtin arg pruning work with > 1 arg
Upstream-commit: 9f0ebea33579b1c6cec8ae445ac3b21655aa3bcd
Component: engine
2017-04-28 10:24:13 -04:00
b5c88cd04e Merge pull request #32504 from dongluochen/healthcheck_duration
do not allow duration less than 1 ms in healthcheck parameters
Upstream-commit: a7519152d9be7a0dd6941d529ea4b83cf4b7f1d4
Component: engine
2017-04-27 23:54:00 -04:00
1824504fe7 Ensure unmount before removing local volume.
When there is an error unmounting a local volume, it is still possible
to call `Remove()` on the volume causing removal of the mounted
resources which is generally not desirable.

This ensures that resources are unmounted before attempting removal.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: db3576f8a08ca70287bd3fdf9b21e162537f9d3a
Component: engine
2017-04-27 16:41:03 -04:00
0fd96c2554 Merge pull request #32717 from fcrisciani/data_path
Data path traffic separation option in swarm mode
Upstream-commit: 0307fe1a0bcdc02583a24add41eb783c117bad8c
Component: engine
2017-04-27 13:00:55 -04:00
3b753edcdd Merge pull request #31984 from tonistiigi/remote-context
builder: Refactor remote context
Upstream-commit: ae0f8c7ba16362e869894e0121cf3052069d7fe4
Component: engine
2017-04-27 11:50:18 -04:00
e7900cc574 Merge pull request #31557 from ripcurld0/add_stack_ls
Add the format option to the docker stack ls command
Upstream-commit: 6559abaf477352dc03725a70c85d0ea9c8d5974e
Component: engine
2017-04-26 19:13:33 -07:00
17438d5f4c Inroduce SWARM --data-path-addr flag
This new flag will allow the configuration of an interface that
can be used for data path traffic to be isolated from control
plane traffic. This flag is simply percolated down to libnetwork
and will be used by all the global scope drivers (today overlay)

Negative test added for invalid flag arguments

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: 8dc8cd4719f165c01c98e7d3ce1d6cea6a8f60b8
Component: engine
2017-04-26 15:33:15 -07:00
bffd287a59 Add the CACert parameter to the ExternalCA object in order to match
swarmkit's API type.  Make sure this parameter gets propagated to
swarmkit, and also add an extra option to the CLI when providing
external CAs to parse the CA cert from a file.

Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: b0401a71f7479a52b2670346e0d1e97cb68089a4
Component: engine
2017-04-26 10:45:12 -07:00
59446e4411 Merge pull request #32824 from aaronlehmann/raftquorum-test-bug
Fix incorrect assumption in TestAPISwarmRaftQuorum
Upstream-commit: 4480e0417eb01caf29ae285880ec51a0180faf7f
Component: engine
2017-04-26 15:14:50 +02:00
619e402989 builder: Make builtin arg pruning work with > 1 arg
The previous implementation would error out with "Unexpected EOF" which
was caused by an underlying "array index out-of-bounds" error.
The root cause was deleting items from the same array that was being
iterated over. The iteration was unaware that the array size had
changed, resulting in an error.

The new implementation builds a new array instead of mutating a copy of
the old one.

Fixes: #32744

Signed-off-by: Dave Tucker <dt@docker.com>
Upstream-commit: 1076ab58ec92637a1a157d8dfbb7625d7bba6c40
Component: engine
2017-04-26 10:24:58 +01:00
580f2ecac8 Merge pull request #32540 from cpuguy83/add_logdrivers_to_info
Add logdrivers to /info
Upstream-commit: e8abe0a69d0d6838412a63d7170b9b92877ec3a2
Component: engine
2017-04-25 23:25:30 -05:00
aadacb3d07 Refactor remote context parsing
Redefine a better interface for remote context dependency.

Separate Dockerfile build instruction from remote context.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: d1faf3df27207af111daf4bd0191478c374dbc55
Component: engine
2017-04-25 14:35:31 -07:00
e245f3021a Fix incorrect assumption in TestAPISwarmRaftQuorum
This test shuts down two out of three managers and then asserts that the
swarm has a leader. A swarm that lost quorum won't necessarily have a
leader, and in this case only has one because the old leader is still
around. Soon SwarmKit will be changed so the leader gives up leadership
when quorum is lost. This will avoid confusing situations, like
read-only APIs succeeding, while ones that write to Raft hang.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: c27603238c5493909ec9b657b342b67b23e615e3
Component: engine
2017-04-25 12:10:12 -07:00
76d9eb02b7 Add format to docker stack ls
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 205ec49de9c4f4abb8023d1ad36fdbc92e7ec294
Component: engine
2017-04-25 16:45:30 +03:00
7e9b6e3ca4 Change builder.dispatchers to use a dispatchRequest object
This change starts the process of splitting up the Builder into logical
components. Remove builder.flags and move it to the new dispatchRequest
object.

Use runConfig from dispatchRequest instead of from the builder.

More progress removing things from the Builder struct.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e59327aaac338bd350746e0e6479489f21a0a1fa
Component: engine
2017-04-24 14:21:19 -04:00
87a3307749 Merge pull request #32740 from vdemeester/integration-trusted-cmd-cli
Use `cli` for trusted related command
Upstream-commit: 83ee902ecc3790c33c1e2d87334074436056bb49
Component: engine
2017-04-22 14:51:12 -07:00
f5ac07a8d7 [integration] Move fakegit to its own package in cli
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: a582d9dc42abd96bd88197939e082a1ea3c938a7
Component: engine
2017-04-19 15:52:03 +02:00
987b06e286 Use cli for trusted relate command
This also removed some skipped test (that are skipped for a long while).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b0ba39d4312ff20b11fc777092cc0c3e5ddeb19f
Component: engine
2017-04-19 14:04:39 +02:00
70222af7e7 Merge pull request #32647 from vdemeester/integration-runSleepingContainer-using-cli
[integration] make runSleepingContainer use cli package
Upstream-commit: 3482b45e60eee8086d0c1bcee8b7298dc90bb6d6
Component: engine
2017-04-18 08:35:55 +02:00
7a295107af Merge pull request #32626 from aaronlehmann/vendor-swarmkit-61a92e8
Vendor swarmkit 61a92e8
Upstream-commit: cd4c089b9e026317ea85e816b1323cf6465b662b
Component: engine
2017-04-17 23:24:43 -05:00
b1bedaaeee [integration] make runSleepingContainer use cli package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: a899aa6796cd671d0e49e7f11edeb0553f11b356
Component: engine
2017-04-16 23:39:30 +02:00
10ab51232c integration-cli: Have TestSwarmJoinPromoteLocked wait for the role to change in the certificate
Since the certificate may be renewed multiple times, this check is
necessary.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 2b5ef9bfef0eed60356e2af3230b3b5bd782db2b
Component: engine
2017-04-16 12:42:21 -07:00
da6ca5cfc4 Merge pull request #32636 from aaronlehmann/example-dot-com
Avoid using "example.com" in integration test
Upstream-commit: a35a65b78a4e71ac014150c9f70dc488139235b7
Component: engine
2017-04-15 17:19:27 +02:00
e27499c21b Merge pull request #32546 from vdemeester/integration-clean-utils-take1
[test-integration] more clean on `docker_utils_test.go`, wait* functions
Upstream-commit: 6e577ea1c0d7ee1661da63e11e7a41e43459d8f0
Component: engine
2017-04-15 17:17:56 +02:00
e65e307753 Avoid using "example.com" in integration test
This test appears to trigger HTTP requests to "example.com", which may
explain why it is not behaving consistently. This changes it to use an
internal HTTP server to avoid unexpected behavior caused by firewalls or
proxies.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: b483e4f09c128c2fabf82f787c0cf737c17c9c10
Component: engine
2017-04-14 16:01:56 -07:00
cb7f296afd Introduce cli.Wait* fuctions
These replace `wait*` functions from `docker_utils_test.go` and work
more or less like other `cli` functions.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: db35c2a5a8d93cfeac9e75a3add60ae7c64a5856
Component: engine
2017-04-14 19:27:33 +02:00
0b7785856b Merge pull request #32328 from duglin/fixEnvVars
Minor tweaks to quotes in env vars
Upstream-commit: df3c4254072d110ecfcefeda94279c25e6a9f334
Component: engine
2017-04-13 10:41:28 -04:00
9761c85b2e Add tests to ensure we can add an external CA to the cluster without
error.

Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: 9b96b2d276cb719e764fb9a63c8c5f58c2f983b4
Component: engine
2017-04-12 16:55:48 -07:00
7cbfe4a756 Merge pull request #32463 from FengtuWang/fix_TestExecWithUserAfterLiveRestore2
fix TestExecWithUserAfterLiveRestore
Upstream-commit: bc4560e512b7a35340247af04f32bb6f8469f0e3
Component: engine
2017-04-12 16:52:35 -07:00
2f0c087a4c set 1ms as container duration minimum value
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: d8b6a35d0272d9bb121dda7d0bc53d0e53d8bd22
Component: engine
2017-04-12 15:45:29 -07:00
e1a50e229d Minor tweaks to quotes in env vars
Addresses part of #32140, in particular:
- this will make it so that double backslashes in double-quoted
strings will result in a single backslash. While in single quotes it remains
a double backslash.
- missing closing " and ' will now generate an error

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 2fb7c3c4f0b2fe15e279729a87c465df4fa70879
Component: engine
2017-04-12 12:20:14 -07:00
203ab34184 Merge pull request #32532 from dnephin/refactor-some-builder-parts
[builder] cleanup env dispatcher and Builder.build()
Upstream-commit: d2ab40e5b99bc2ab0abfea146544a20ce6081942
Component: engine
2017-04-12 11:11:06 -07:00
866adfbbee Merge pull request #28923 from erikh/fix-copy
Fix copy API (`docker cp`, etc) uid/gid handling
Upstream-commit: d40a17ffc2f6592396a3dfc0f5ebe396c2107536
Component: engine
2017-04-12 08:21:17 -07:00
4de7d79620 Merge pull request #29807 from thaJeztah/update-frozen-images
Update frozen images in Dockerfiles
Upstream-commit: 330ddf8eb8f8a551677bdfc757fcefdb0cdaec3f
Component: engine
2017-04-12 15:37:40 +02:00
1386ad9dee daemon/archive.go: Fix copy routines to preserve UID.
This changes the long-standing bug of copy operations not preserving the
UID/GID information after the files arrive to the container.

Signed-off-by: Erik Hollensbe <github@hollensbe.org>
Upstream-commit: 8a7ff5ff746a77e0be601c11540562341b2228c1
Component: engine
2017-04-12 10:33:19 +00:00
c9b5a51747 Clean some function in docker_utils_test.go
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 10e171cd9463ca0bfda4556b3eb04d9f89d1bbbf
Component: engine
2017-04-12 11:22:32 +02:00
7b2c24fd0f Merge pull request #32473 from vdemeester/integration-cli-package-take3
[test-integration] Move FakeContext to `integration-cli/cli/build/fakecontext` package…
Upstream-commit: 2a17d048de7bf5a0152789617c83a318fac508e7
Component: engine
2017-04-12 10:24:49 +02:00
62eff90f69 Add logdrivers to /info
This is required for swarmkit to be able to filter based on log driver.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 17abacb8946ed89496fcbf07a0288fafe24cb7b0
Component: engine
2017-04-11 18:07:15 -04:00
6fb208126e Cleanup in dispatcher.env
Remove commented code blocks
Remove some duplication in comparing and restructuring env

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c7fad9b750f8f143a22cc5a85a1dc26573025414
Component: engine
2017-04-11 14:44:28 -04:00
5f5b71f0ea Move FakeContext to integration-cli/cli/build/context package…
… and continue emptying `docker_utils_test.go` from build related function.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 56fb4653e8b867802d2a33121f933d164a4e6325
Component: engine
2017-04-11 18:25:49 +02:00