Commit graph

4637 commits

Author SHA1 Message Date
Daniel Nephin
721e1736ae Fix cache miss when builtin build args are used.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-04-28 12:49:50 -04:00
Brian Goff
25058d9b0c Merge pull request #32828 from cyli/external-ca-cert
Add the `CACert` parameter to the `ExternalCA` object
2017-04-28 10:30:57 -04:00
Brian Goff
9f0ebea335 Merge pull request #32763 from dave-tucker/fix-32744
builder: Make builtin arg pruning work with > 1 arg
2017-04-28 10:24:13 -04:00
Brian Goff
a7519152d9 Merge pull request #32504 from dongluochen/healthcheck_duration
do not allow duration less than 1 ms in healthcheck parameters
2017-04-27 23:54:00 -04:00
Brian Goff
db3576f8a0 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>
2017-04-27 16:41:03 -04:00
Brian Goff
0307fe1a0b Merge pull request #32717 from fcrisciani/data_path
Data path traffic separation option in swarm mode
2017-04-27 13:00:55 -04:00
Brian Goff
ae0f8c7ba1 Merge pull request #31984 from tonistiigi/remote-context
builder: Refactor remote context
2017-04-27 11:50:18 -04:00
Sebastiaan van Stijn
6559abaf47 Merge pull request #31557 from ripcurld0/add_stack_ls
Add the format option to the docker stack ls command
2017-04-26 19:13:33 -07:00
Flavio Crisciani
8dc8cd4719
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>
2017-04-26 15:33:15 -07:00
Ying Li
b0401a71f7 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>
2017-04-26 10:45:12 -07:00
Vincent Demeester
4480e0417e Merge pull request #32824 from aaronlehmann/raftquorum-test-bug
Fix incorrect assumption in TestAPISwarmRaftQuorum
2017-04-26 15:14:50 +02:00
Dave Tucker
1076ab58ec 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>
2017-04-26 10:24:58 +01:00
Kenfe-Mickaël Laventure
e8abe0a69d Merge pull request #32540 from cpuguy83/add_logdrivers_to_info
Add logdrivers to /info
2017-04-25 23:25:30 -05:00
Tonis Tiigi
d1faf3df27 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>
2017-04-25 14:35:31 -07:00
Aaron Lehmann
c27603238c 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>
2017-04-25 12:10:12 -07:00
Boaz Shuster
205ec49de9 Add format to docker stack ls
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2017-04-25 16:45:30 +03:00
Daniel Nephin
e59327aaac 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>
2017-04-24 14:21:19 -04:00
Sebastiaan van Stijn
83ee902ecc Merge pull request #32740 from vdemeester/integration-trusted-cmd-cli
Use `cli` for trusted related command
2017-04-22 14:51:12 -07:00
Vincent Demeester
a582d9dc42
[integration] Move fakegit to its own package in cli
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-04-19 15:52:03 +02:00
Vincent Demeester
b0ba39d431
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>
2017-04-19 14:04:39 +02:00
Vincent Demeester
3482b45e60 Merge pull request #32647 from vdemeester/integration-runSleepingContainer-using-cli
[integration] make runSleepingContainer use cli package
2017-04-18 08:35:55 +02:00
Tõnis Tiigi
cd4c089b9e Merge pull request #32626 from aaronlehmann/vendor-swarmkit-61a92e8
Vendor swarmkit 61a92e8
2017-04-17 23:24:43 -05:00
Vincent Demeester
a899aa6796
[integration] make runSleepingContainer use cli package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-04-16 23:39:30 +02:00
Aaron Lehmann
2b5ef9bfef 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>
2017-04-16 12:42:21 -07:00
Vincent Demeester
a35a65b78a Merge pull request #32636 from aaronlehmann/example-dot-com
Avoid using "example.com" in integration test
2017-04-15 17:19:27 +02:00
Vincent Demeester
6e577ea1c0 Merge pull request #32546 from vdemeester/integration-clean-utils-take1
[test-integration] more clean on `docker_utils_test.go`, wait* functions
2017-04-15 17:17:56 +02:00
Aaron Lehmann
b483e4f09c 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>
2017-04-14 16:01:56 -07:00
Vincent Demeester
db35c2a5a8 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>
2017-04-14 19:27:33 +02:00
Daniel Nephin
df3c425407 Merge pull request #32328 from duglin/fixEnvVars
Minor tweaks to quotes in env vars
2017-04-13 10:41:28 -04:00
Ying Li
9b96b2d276 Add tests to ensure we can add an external CA to the cluster without
error.

Signed-off-by: Ying Li <ying.li@docker.com>
2017-04-12 16:55:48 -07:00
Victor Vieux
bc4560e512 Merge pull request #32463 from FengtuWang/fix_TestExecWithUserAfterLiveRestore2
fix TestExecWithUserAfterLiveRestore
2017-04-12 16:52:35 -07:00
Dong Chen
d8b6a35d02 set 1ms as container duration minimum value
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2017-04-12 15:45:29 -07:00
Doug Davis
2fb7c3c4f0 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>
2017-04-12 12:20:14 -07:00
Tõnis Tiigi
d2ab40e5b9 Merge pull request #32532 from dnephin/refactor-some-builder-parts
[builder] cleanup env dispatcher and Builder.build()
2017-04-12 11:11:06 -07:00
Anusha Ragunathan
d40a17ffc2 Merge pull request #28923 from erikh/fix-copy
Fix copy API (`docker cp`, etc) uid/gid handling
2017-04-12 08:21:17 -07:00
Vincent Demeester
330ddf8eb8 Merge pull request #29807 from thaJeztah/update-frozen-images
Update frozen images in Dockerfiles
2017-04-12 15:37:40 +02:00
Erik Hollensbe
8a7ff5ff74 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>
2017-04-12 10:33:19 +00:00
Vincent Demeester
10e171cd94 Clean some function in docker_utils_test.go
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-04-12 11:22:32 +02:00
Vincent Demeester
2a17d048de Merge pull request #32473 from vdemeester/integration-cli-package-take3
[test-integration] Move FakeContext to `integration-cli/cli/build/fakecontext` package…
2017-04-12 10:24:49 +02:00
Brian Goff
17abacb894 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>
2017-04-11 18:07:15 -04:00
Daniel Nephin
c7fad9b750 Cleanup in dispatcher.env
Remove commented code blocks
Remove some duplication in comparing and restructuring env

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-04-11 14:44:28 -04:00
Vincent Demeester
56fb4653e8
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>
2017-04-11 18:25:49 +02:00
Sebastiaan van Stijn
f30e94a495 Merge pull request #32505 from fcrisciani/conntrack_test
Conntrack flush support
2017-04-11 16:40:56 +02:00
Sebastiaan van Stijn
a258ef58d8 Merge pull request #32284 from aaronlehmann/fix-service-defaults
Improve default handling for "service create"
2017-04-11 13:06:53 +02:00
Flavio Crisciani
1c4286bcff
Adding test for docker/docker#8795
When a container was being destroyed was possible to have
flows in conntrack left behind on the host.
If a flow is present into the conntrack table, the packet
processing will skip the POSTROUTING table of iptables and
will use the information in conntrack to do the translation.
For this reason is possible that long lived flows created
towards a container that is destroyed, will actually affect
new flows incoming to the host, creating erroneous conditions
where traffic cannot reach new containers.
The fix takes care of cleaning them up when a container is
destroyed.

The test of this commit is actually reproducing the condition
where an UDP flow is established towards a container that is then
destroyed. The test verifies that the flow established is gone
after the container is destroyed.

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-04-10 21:31:35 -07:00
Victor Vieux
18ae574cab Merge pull request #32496 from tonistiigi/build-target
builder: add an option for specifying build target
2017-04-10 19:02:21 -07:00
Victor Vieux
17a3e4511d Merge pull request #32462 from dperny/service-logs-general-availability
Remove experimental from service logs
2017-04-10 18:30:20 -07:00
Tonis Tiigi
33e07f41ad builder: add an option for specifying build target
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-04-10 16:21:43 -07:00
Aaron Lehmann
1d274e9acf Change "service inspect" to show defaults in place of empty fields
This adds a new parameter insertDefaults to /services/{id}. When this is
set, an empty field (such as UpdateConfig) will be populated with
default values in the API response. Make "service inspect" use this, so
that empty fields do not result in missing information when inspecting a
service.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-04-10 13:41:16 -07:00
Drew Erny
306cfecc8c Remove experimental from service logs
Service logs API is now stable. Service logs now support all features,
except retrieving details provided to the log driver.

Signed-off-by: Drew Erny <drew.erny@docker.com>
2017-04-10 13:40:45 -07:00