Commit Graph

35115 Commits

Author SHA1 Message Date
e46ae6ff6c Add test case for --label with --target
Add a new test case `TestBuildLabelWithTargets` to cover the Docker builder
with both `--label` and `--target` options.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: f7add4262b69294aa8035c4794236193ce4bc68e
Component: engine
2018-05-17 09:41:06 +08:00
0b32e0ce4f Add 'LABEL' command from '--label' to the last stage
This PR is tring to fix issue #36996.

Currently for multi-stage build, if `--target` specified, the `--label` option
will be ignored. The root cause is the last stage build will remove the `LABEL`
command(s) node created from the `--label` option. In order to address this issue,
we can create `LABEL` command(s) and add it/tem to the last stage.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 9c238ebd55e4105ad7f7edc04231ea61bb278ae8
Component: engine
2018-05-17 09:40:19 +08:00
72379c4a70 Merge pull request #37076 from arm64b/TestExecInteractiveStdinClose
Fix flaky test case of `TestExecInteractiveStdinClose`
Upstream-commit: b7b6b6929c6436145bd12e6fef7efb7d01fa170b
Component: engine
2018-05-16 09:51:28 +02:00
cd4f86fbb3 Merge pull request #37064 from tonistiigi/jsonmessage-aux
jsonmessage: pass message to aux callback
Upstream-commit: ab3cdd2b1bc1f6c2410a1ca28d0034eb6edcd1ef
Component: engine
2018-05-15 20:50:19 -10:00
635742da67 Merge pull request #37003 from AntaresS/fix-integration-cli-for-e2e
Fix integration tests and integration cli to run on older versions
Upstream-commit: a41051a9e43fe5b9caaee61210df8498fe876d97
Component: engine
2018-05-15 21:10:37 -07:00
42dc03897a Fix flaky test case of TestExecInteractiveStdinClose
This issue has been reported by issue #36877.

The purpose of this test case is for the regression test of #12546,
so we only need to make sure the essential of the testing is still
in the way to check that while not disturbed by some testing noises,
which is exactly what this PR want to do.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 96abf9f59ebd350cc9a70034b4d30279e6ae04e4
Component: engine
2018-05-16 10:01:44 +08:00
a24b673f22 fix and skip some tests based on API version
Signed-off-by: Anda Xu <anda.xu@docker.com>

Co-authored-by: Anda Xu <anda.xu@docker.com>
Co-authored-by: Tibor Vass <tibor@docker.com>
Upstream-commit: e440831802a500b28ecf16c2627a294dc31dfeb9
Component: engine
2018-05-15 16:05:04 -07:00
24dab0a4ea Merge pull request #36971 from emanb29/6478-documentHostIP
Describe IP field of Port definition
Upstream-commit: 85a8252c47538ac90c30090574b6e9f1795bb6b7
Component: engine
2018-05-15 11:48:44 -07:00
d8a9cf51bb Merge pull request #37070 from vdemeester/fix-master
Fix logging test type
Upstream-commit: c0d39a1819f4a51fd98ce0f203e0894a540d5a0c
Component: engine
2018-05-15 17:52:35 +02:00
c4764c184a Fix logging test type
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 25494e4c74f31551ef06e6e2df4e1119cd83250e
Component: engine
2018-05-15 15:04:46 +02:00
6c90b56fe9 Merge pull request #37051 from wagoodman/patch-1
image spec v1 formatting fix
Upstream-commit: 04864cb3cb526ddeee70dc6e17a6c7802ef91a0b
Component: engine
2018-05-15 14:00:53 +02:00
131639fdf7 Merge pull request #37028 from cpuguy83/log_plugin_broken_pipe
Fix logging plugin crash unrecoverable
Upstream-commit: 6821ffd1a11f188d6b1c3e8da01885768e027586
Component: engine
2018-05-15 13:57:01 +02:00
9ebdda8c43 Merge pull request #37033 from cpuguy83/some_container_network_cleanups
Some container/network cleanups
Upstream-commit: 6f68db8c7a94489b5e66bb828f748d0baa2e5c22
Component: engine
2018-05-15 13:23:41 +02:00
8373fcb573 Describe IP field of Port definition
Signed-off-by: Ethan Bell <ebgamer29@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 13e0b2651082878f8f17669df3f97ab252a9e095
Component: engine
2018-05-15 12:09:42 +02:00
14395e1de7 Merge pull request #37062 from cpuguy83/fix_logs_daemon_race
Fix race conditions in logs API
Upstream-commit: 07dc3aa685ffd500ada1c41f8a9b7eaf74cf09eb
Component: engine
2018-05-15 11:59:40 +02:00
f2fea2ebf4 Merge pull request #37063 from cpuguy83/fix_log_rotation_issue
Fix some issues in logfile reader and rotation
Upstream-commit: 26da99e326bf7cbfad820395f5379bba7a66c4a5
Component: engine
2018-05-15 11:46:29 +02:00
e35dd65158 Merge pull request #37044 from yongtang/03112018-TestDockerNetworkConnectAlias-name
Avoid unique name usage in TestDockerNetworkConnectAlias
Upstream-commit: 829dcefa9d090f5101947ee14074d1f37e44468b
Component: engine
2018-05-15 11:46:11 +02:00
4347082deb Merge pull request #37060 from cpuguy83/fix_swagger_gen
Fix swagger volume type generation
Upstream-commit: bcd86fc2acd3ef22a7fc6c662c7ae8a67b0bb4f4
Component: engine
2018-05-15 11:46:02 +02:00
3a0e583232 jsonmessage: pass message to aux callback
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: f784907eae4f2e8bd4d9dea3d45c790c92689f3d
Component: engine
2018-05-14 15:48:25 -07:00
d1d5dd5da5 Merge pull request #37030 from adshmh/refactor-service-create-integration-tests-use-swarm-create-service
Refactor service create integration tests to use swarm CreateService
Upstream-commit: 6de3be1366cda7b24f02dfae7f9abd036b9c7094
Component: engine
2018-05-14 14:07:22 -07:00
9488201604 Fix logging plugin crash unrecoverable
In cases where a logging plugin has crashed when the daemon tries to
copy the container stdio to the logging plugin it returns a broken pipe
error and any log entries that occurr while the plugin is down are lost.

Fix this by opening read+write in the daemon so logs are not lost while
the plugin is down.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e7479e3ab8128f9e84cc640f0bed4e77b268a6e9
Component: engine
2018-05-14 16:51:56 -04:00
b600301f4e Fix some issues in logfile reader and rotation
- Check errors.Cause(err) when comparing errors
- Fix bug where oldest log file is not actually removed. This in
particular causes issues when compression is enabled. On rotate it just
overwrites the data in the log file corrupting it.
- Use O_TRUNC to open new gzip files to ensure we don't corrupt log
files as happens without the above fix.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e87e9e6ad6ba501cc42a2ef47ac18c88a68f258f
Component: engine
2018-05-14 15:52:18 -04:00
5e354ed533 Fix race conditions in logs API
Closing the log driver was in a defer meanwhile logs are
collected asyncronously, so the log driver was being closed before reads
were actually finished.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 2c252a48c252749d41079cf8c450d00a5c18296e
Component: engine
2018-05-14 15:48:32 -04:00
1cb0dc30a7 Fix swagger volume type generation
This was broken by bf6a790f00ab96bb8857e3c73502909ee5e36217

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b16b125bb4326e2eec9948fd54ca8c5d83eba36a
Component: engine
2018-05-14 13:46:20 -04:00
74db940ed7 Avoid unique name usage in TestDockerNetworkConnectAlias
In TestDockerNetworkConnectAlias the network and container
names used are unique which are not preferred. This
fix address the issue by appending t.Name() so that
names are randomized.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: e7b5f4500dc77ec55e5ef202065fbc92218ce394
Component: engine
2018-05-14 16:59:13 +00:00
de8a0bba09 Merge pull request #37034 from cpuguy83/moar_metrics
Add metrics for log failures/partials
Upstream-commit: ab0dccf80174fa5eef4583a0235b0bf57bdff8df
Component: engine
2018-05-14 18:05:30 +02:00
70cd643c8a Merge pull request #37040 from thaJeztah/error_on_unsupported_options
overlay: do not ignore invalid storage-driver options
Upstream-commit: a79d04ae55196f73d67eeb8a40cfbeb67fed95e9
Component: engine
2018-05-14 15:37:33 +02:00
7fb4806d90 Merge pull request #36991 from kolyshkin/slice-in-place
daemon.setMounts(): copy slice in place
Upstream-commit: 31aca4bef4d976ae4e7fb559da52745a3a295100
Component: engine
2018-05-14 13:49:47 +02:00
e72e7fdac6 Merge pull request #37045 from abhi/inspect
Fixing network inspect for swarm
Upstream-commit: 8baea3a1bb9a10e4148e320d8933b0a73b7e0b07
Component: engine
2018-05-14 12:51:12 +02:00
0e7e154e05 Merge pull request #37052 from thaJeztah/fix-missing-name-in-message
Fix missing plugin name in message
Upstream-commit: 8c66c01cd4d2b222d915b9a7123ab8562359283c
Component: engine
2018-05-14 10:39:39 +02:00
49316401a9 Fix missing plugin name in message
This message was missing the name of the plugin, resulting in

    plugin_test.go:92: timeout hit after 30s: plugin %!q(MISSING) exists

On failing tests.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b526964584d213074de7c5573a3373a58699c181
Component: engine
2018-05-13 22:26:36 +02:00
5ecbe96813 image spec formatting fix
Embedded new lines aren't interpreted correctly in markdown renderers (they are treated as preformatted text instead). I removed the embedded newlines in the docker image spec.

Signed-off-by: Alex Goodman <wagoodman@gmail.com>
Upstream-commit: 4fb59c20a4fb54f944fe170d0ff1d00eb4a24d6f
Component: engine
2018-05-13 13:30:53 -04:00
4ca879c241 Fixing network inspect for swarm
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
Upstream-commit: a059d6f4f5eb5fdb319b6f715a9bb50eb5d6173d
Component: engine
2018-05-13 07:31:14 -07:00
122abc3569 Merge pull request #37049 from yongtang/05122018-version-history
Fix incorrect link in version-history.md
Upstream-commit: 996eb78fb895ba1cf7ea5773ee36a8651498eb26
Component: engine
2018-05-13 16:30:58 +02:00
371327f900 Fix incorrect link in version-history.md
In version-history.md, the link for `Docker Engine API v1.37`
was pointed to `v1.36`.

This fix fixes the incorrect link.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 6d66743ae3da148adbd29fb7e0c0433e93fec12b
Component: engine
2018-05-13 13:22:39 +00:00
8082d1152a Merge pull request #37047 from yongtang/05122018-changelog
Re-order CHANGELOG.md to pass `make validate` test
Upstream-commit: df7c058198a7f4566d46ab732f5987bd33e90a93
Component: engine
2018-05-13 14:11:56 +02:00
2d3321ec44 Re-order CHANGELOG.md to pass make validate test
This fix re-orders the CHANGELOG so that `make validate` test
could pass. The validation requires that the date in the changelog
is always ordered.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 333693c37c8a2c14458d2a088829b9a2a3570eed
Component: engine
2018-05-13 00:27:51 +00:00
f5a67d027e Merge pull request #36289 from thaJeztah/backport-17.03.2-changelog
[backport] Add 17.03.2 CHANGELOG
Upstream-commit: 38162e96552bd30e510e355cd44d801f53bac5ae
Component: engine
2018-05-11 21:28:50 +02:00
3d482c77f6 Merge pull request #37041 from thaJeztah/remove_unused_function_in_test
overlay2: remove unused cdMountFrom() helper function
Upstream-commit: d0a516e2567a67fed3ff3f23ff6c220f1707ad4b
Component: engine
2018-05-11 13:56:56 -04:00
0178ff5bea Merge pull request #37031 from kolyshkin/getmnt
Fix daemon.getSourceMount() for /
Upstream-commit: 379845ec20ae651831dcfb0587b95c38a1631a53
Component: engine
2018-05-11 16:39:57 +02:00
b80e078a6d Merge pull request #36815 from allencloud/simplify-ode
refactor: simplify code to make function getExecConfig  more readable
Upstream-commit: 64336838878281549d87b34b19cf2e4b3756e724
Component: engine
2018-05-11 10:06:33 -04:00
0d708bdf61 overlay2: remove unused cdMountFrom() helper function
This function was added in 23e5c94cfb26eb72c097892712d3dbaa93ee9bc0 but never used

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8a8ec00c1fece033b20548b7a5ec2f3a1f340834
Component: engine
2018-05-11 13:51:50 +02:00
5da69b8b39 overlay: do not ignore invalid storage-driver options
The overlay storage driver currently does not support any option, but was silently
ignoring any option that was passed.

This patch verifies that no options are passed, and if they are passed will produce
an error.

Before this change:

    dockerd --storage-driver=overlay --storage-opt dm.thinp_percent=95
    INFO[2018-05-11T11:40:40.996597152Z] libcontainerd: started new docker-containerd process  pid=256
    ....
    INFO[2018-05-11T11:40:41.135392535Z] Daemon has completed initialization
    INFO[2018-05-11T11:40:41.141035093Z] API listen on /var/run/docker.sock

After this change:

    dockerd --storage-driver=overlay --storage-opt dm.thinp_percent=95
    INFO[2018-05-11T11:39:21.632610319Z] libcontainerd: started new docker-containerd process  pid=233
    ....
    Error starting daemon: error initializing graphdriver: overlay: unknown option dm.thinp_percent

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 30f15d2bdc551870464d1cd024a92341cf1ae4aa
Component: engine
2018-05-11 13:40:46 +02:00
52ce230729 Add metrics for log failures/partials
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 673dd28e7e2fb6e40e4c56823900fdb152b9c53c
Component: engine
2018-05-10 17:22:37 -04:00
645a5ebf1b Use mount package to unmount container stuff
Really these mounts shouldn't be in the container pacakge.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d6558ad6a4552fc745e893f93ae190710d1a36bc
Component: engine
2018-05-10 17:16:02 -04:00
c6a8d2ea17 Move network operations out of container package
These network operations really don't have anything to do with the
container but rather are setting up the networking.

Ideally these wouldn't get shoved into the daemon package, but doing
something else (e.g. extract a network service into a new package) but
there's a lot more work to do in that regard.
In reality, this probably simplifies some of that work as it moves all
the network operations to the same place.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: cc8f358c23d307d19b06cd5e7d039d8fad01a947
Component: engine
2018-05-10 17:16:00 -04:00
53eaee8346 daemon.getSourceMount(): fix for / mount point
A recent optimization in getSourceMount() made it return an error
in case when the found mount point is "/". This prevented bind-mounted
volumes from working in such cases.

A (rather trivial but adeqate) unit test case is added.

Fixes: 871c957242 ("getSourceMount(): simplify")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: d8fd6137a1f6d95a2bcdfeb6e1dfa6b816790c5e
Component: engine
2018-05-10 12:53:37 -07:00
a5b8cafc29 Merge pull request #37029 from thaJeztah/fix-fluentd-partial
Fix fluentd partial detection
Upstream-commit: f4ebcb42ac527b24ab54525d5824478fcd2960c0
Component: engine
2018-05-10 12:51:02 -04:00
39cf7e12b3 refactor integration tests under integration/service/create_test.go to use swarm.CreateService
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: e9a687146a1e2721e19d858927283c35f8c2da97
Component: engine
2018-05-10 05:45:49 -04:00
d10b7a563e Fix fluentd partial detection
The Partial property of the Logger message
was replaced by PLogMetaData, causing the build to fail.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: daaef83cd24f6eb335b77e9d8d692235eff1b201
Component: engine
2018-05-10 01:55:27 +02:00