Commit Graph

4611 Commits

Author SHA1 Message Date
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
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
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
993ce0e0d7 Merge pull request #32505 from fcrisciani/conntrack_test
Conntrack flush support
Upstream-commit: f30e94a495c6e18d15b577b804984635a38b9fd6
Component: engine
2017-04-11 16:40:56 +02:00
d2aa64e45c Merge pull request #32284 from aaronlehmann/fix-service-defaults
Improve default handling for "service create"
Upstream-commit: a258ef58d8a100467d5d948b026a884ebe58eaf4
Component: engine
2017-04-11 13:06:53 +02:00
529c0891e7 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>
Upstream-commit: 1c4286bcffcdc6668f84570a2754c78cccbbf7e1
Component: engine
2017-04-10 21:31:35 -07:00
0bf5e70579 Merge pull request #32496 from tonistiigi/build-target
builder: add an option for specifying build target
Upstream-commit: 18ae574cab9c4eb5183e419b1ca698dd76ed1194
Component: engine
2017-04-10 19:02:21 -07:00
108aa4253e Merge pull request #32462 from dperny/service-logs-general-availability
Remove experimental from service logs
Upstream-commit: 17a3e4511d8f20868a051f10dbedabdce7ea2f9c
Component: engine
2017-04-10 18:30:20 -07:00
a89a2c21c5 builder: add an option for specifying build target
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 33e07f41adc0ec96edad5f22bc2cfaec0d26ea58
Component: engine
2017-04-10 16:21:43 -07:00
3d267a0dc8 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>
Upstream-commit: 1d274e9acfe96b98be3ec956636ff4e5c70e98af
Component: engine
2017-04-10 13:41:16 -07:00
24a0a6b6bb 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>
Upstream-commit: 306cfecc8c146ea8addb44dd35296808b25916a2
Component: engine
2017-04-10 13:40:45 -07:00
2160e9bb7d Update frozen images in Dockerfiles
This updates the versions of the frozen images used to their current
version. The original reason for updating these images was to make sure
they are not affected by [CVE-2016-1252 / DSA-3733-1](https://lwn.net/Articles/709119/),
which is fixed in apt 1.0.9.8.4 and up.

Note that `CVE-2016-1252` won't affect our test-suite, because no packages
are installed during out tests. It is just "good practice" to keep these
images up to date.

The `debian:jessie`, and `buildpack-deps:jessie` in  `Dockerfile.s390x`,
and `Dockerfile.armhf` have not been updated in this patch, because
those images have not yet been updated to contain apt 1.0.9.8.4.

While working on this, the `busybox` and `hello-world` were also updated
to their latest version.

Also removes a reference to `hack/make/.ensure-frozen-images`, which
was removed in ff91276d1f5beab5582d9ca582ee01af13198333.

The new busybox image has one layer less than the original,
so updated `TestBuildSquashParent` to take that into account.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1ecd8ed5186a161c1c43ae7c99b1c81b97188619
Component: engine
2017-04-10 22:05:39 +02:00
ef02a743db Merge pull request #28403 from cpuguy83/logging_plugins
Implement plugins for logging drivers
Upstream-commit: 28334c1d829b9ea8ac7e10d45a6db37c3821d5db
Component: engine
2017-04-10 21:57:56 +02:00
15fc803536 Merge pull request #31236 from tonistiigi/docker-stdin
build: accept -f - to read Dockerfile from stdin
Upstream-commit: 778e32a2fadcf1ccb1819ad6534af5c477585300
Component: engine
2017-04-10 20:14:54 +02:00
e5dfac43c9 Merge pull request #31148 from yongtang/31032-NanoCPU-update
Add `--cpus` support for `docker update`
Upstream-commit: 5b1cae227171a299e41835a4806cd939b984c596
Component: engine
2017-04-10 20:02:15 +02:00
6d75b7a10d Merge pull request #30740 from yongtang/29999-prune-filter-label
Add `label` filter for `docker system prune`
Upstream-commit: 4460312ce1a53316e3c474ab951b85e737a902c5
Component: engine
2017-04-10 19:38:01 +02:00
43f24a2541 Merge pull request #31352 from dnephin/allow-arg-in-fromt
[dockerfile] Allow ARG in FROM
Upstream-commit: 4d9e32a08e8e2613601cbc5d36bd8c7ecf32a772
Component: engine
2017-04-10 13:23:40 -04:00
276ea6a456 Implement plugins for logging drivers
Logging plugins use the same HTTP interface as other plugins for basic
command operations meanwhile actual logging operations are handled (on
Unix) via a fifo.

The plugin interface looks like so:

```go
type loggingPlugin interface {
  StartLogging(fifoPath string, loggingContext Context) error
  StopLogging(fifoPath)
```

This means a plugin must implement `LoggingDriver.StartLogging` and
`LoggingDriver.StopLogging` endpoints and be able to consume the passed
in fifo.

Logs are sent via stream encoder to the fifo encoded with protobuf.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 27bd6842f8518780b99fdb42f8e7f84c17856d87
Component: engine
2017-04-10 13:17:20 -04:00
a5328df4bd Merge pull request #32084 from simonferquel/multi-stage-builds-windows
Multi stage builds cleanup for Windows
Upstream-commit: a48f4257f0af5259584b69ed32b1bd9152d0a74c
Component: engine
2017-04-10 17:36:36 +02:00
49adc43a40 Merge pull request #32285 from dmcgowan/revert-fix-for-flaky-misconfigured-token-test
Revert change to TestPushMisconfiguredTokenServiceResponseError
Upstream-commit: 61d3ddfe780b58b69b8af4f2bbb4312b7b0f71a1
Component: engine
2017-04-10 16:34:58 +02:00
73fce35ed0 Merge pull request #32062 from aaronlehmann/change-network-attachments
Support service network attachment changes
Upstream-commit: b0831acb09662431ecfed84677e7f5ed54635d52
Component: engine
2017-04-10 12:49:28 +02:00
3e6470e783 fix TestExecWithUserAfterLiveRestore
When container's status is running, shell command may have not
executed end. So if we use 'docker exec -u test' to execute
command, it may fail since user 'test' have not be added yet.

Signed-off-by: Fengtu Wang <wangfengtu@huawei.com>
Upstream-commit: c7c6167bcad5133dc94f7173cb40f3d974ef8a36
Component: engine
2017-04-10 14:40:29 +08:00
7de8729d6d Add test over ipv6 and container run in host network
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 010e5a228a633c6854ac28de62d5338c9206e80c
Component: engine
2017-04-07 16:58:20 -07:00
499e804f82 cli: Allow service's networks to be updated
Resolve networks IDs on the client side.

Avoid filling in deprecated Spec.Networks field.

Sort networks in the TaskSpec for update stability.

Add an integration test for changing service networks.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 0f2669a63834844fb0ef5c017f517d8c321ad3c7
Component: engine
2017-04-07 16:46:25 -07:00
ddc6479238 Merge pull request #32154 from dperny/refactor-logs
Refactor logs and support service logs with TTY 
Upstream-commit: 4a1a64c67768d6fbcf20a1b37ee58212b7e870c6
Component: engine
2017-04-07 18:06:50 -04:00
8c6400b4e4 Refactor BuildArgs
Add MetaArgs for ARG that occur before the first FROM
Integration test for these cases.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 239c53bf836174108dbae445a394a290f5fe2898
Component: engine
2017-04-07 17:57:47 -04:00
4c321e8e20 Test and fix forbidden path for COPY --from on Windows
Paths resolving to c:\ or c:\windows are forbidden

Replaced the obscure (and non-working) regex with a simple case
insensitive comparison to the black listed paths (we should forbid c:\,
c:\windows but not d:\)

Also, add a test ensuring paths are case insensitive on windows

Also, made sure existing multi-staged build tests pass on windows

Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: b0e75888738f6e427b545922a195837c00158749
Component: engine
2017-04-07 18:00:36 +02:00
334f054f13 refactor logs and support service logs /w tty
Refactor container logs system to make communicating log messages
internally much simpler. Move responsibility for marshalling log
messages into the REST server. Support TTY logs. Pave the way for fixing
the ambiguous bytestream format. Pave the way for fixing details.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 1044093bb0aa12eb8972361a93b9bc8c4ddd857b
Component: engine
2017-04-06 17:54:11 -07:00
9cc90bfd8d Add integration test for START_FIRST update order
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 6763641d6932468a0503516bb32e39202989aa52
Component: engine
2017-04-06 17:23:36 -07:00
ba4f1c70ab Add --cpus support for docker update
This fix tries to address the issue raised in 31032 where it was
not possible to specify `--cpus` for `docker update`.

This fix adds `--cpus` support for `docker update`. In case both
`--cpus` and `--cpu-period/--cpu-quota` have been specified,
an error will be returned.

Related docs has been updated.

Integration tests have been added.

This fix fixes 31032.

This fix is related to 27921, 27958.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 61022436926a8d0c92068e8116a2ad77f43eb6d6
Component: engine
2017-04-06 15:40:12 -07:00
4adfcf1302 Upadte archive.ReplaceFileTarWrapper() to not expect a sorted archive
Improve test coverage of ReplaceFileTarWrapper()

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 8cd6c30a489f7a0210526b0f94469c525ba8e0ee
Component: engine
2017-04-06 13:36:34 -04:00
83d9648a45 Add label filter for docker system prune
This fix tries to address the issue raised in 29999 where it was not
possible to mask these items (like important non-removable stuff)
from `docker system prune`.

This fix adds `label` and `label!` field for `--filter` in `system prune`,
so that it is possible to selectively prune items like:
```
$ docker container prune --filter label=foo

$ docker container prune --filter label!=bar
```

Additional unit tests and integration tests have been added.

This fix fixes 29999.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 702524732427ce028277f99f215e1fab297e6001
Component: engine
2017-04-06 09:11:25 -07:00
06ea8bf159 build: accept -f - to read Dockerfile from stdin
Heavily based on implementation by David Sheets

Signed-off-by: David Sheets <sheets@alum.mit.edu>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 3f6dc81e10b8b813fffaa9b4167a60c5a507fa38
Component: engine
2017-04-05 19:42:31 -04:00
dae880478e Revert retry count change
Allowing the retries to go up to 10 causes the test to always
hit the check against ensuring the retry wait went up to 15 seconds.
Additionally we have the max download attempts in the code set to
5. This change did not protect against using this test to expose
a problem in the underlying code. Remove checks for retry since
there may be additional requests before the upload.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 5ff82cffeeecfb452a9bc1f1ff5d4f5eb3c8e55b
Component: engine
2017-04-05 16:07:43 -07:00
ed86f7c60d Merge pull request #32251 from AkihiroSuda/run-mount
cli: add `--mount` to `docker run`
Upstream-commit: 945a119c8a52118ebee6c53f46e9846ea9e76c5e
Component: engine
2017-04-05 22:34:47 +02:00
3d4ee5930c Merge pull request #32268 from cpuguy83/volume_err_obfuscate
don't obfuscate error during volume create
Upstream-commit: b7c3b312c92c6a0f897379f583befa6b5ab9c4fe
Component: engine
2017-04-05 09:05:10 -04:00
6c1668c7bd cli: add --mount to docker run
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 77fe35b3b903831bd9cfb60a806d056195dc14b6
Component: engine
2017-04-05 04:52:08 +00:00