Commit graph

35117 commits

Author SHA1 Message Date
Vincent Demeester
6a9bcc51df
Merge pull request #37074 from skyc024/fix-typos
Fix typos
2018-05-17 16:00:26 +02:00
Vincent Demeester
d37f5c6bdf
Merge pull request #37071 from mat007/custom-request
Extend client API with custom HTTP requests
2018-05-17 11:09:49 +02:00
Vincent Demeester
b7b6b6929c
Merge pull request #37076 from arm64b/TestExecInteractiveStdinClose
Fix flaky test case of `TestExecInteractiveStdinClose`
2018-05-16 09:51:28 +02:00
chenyuzhu
5ac0d2f0b8 Fix typos
Signed-off-by: chenyuzhu <chenyuzhi@oschina.cn>
2018-05-16 15:31:12 +08:00
Tibor Vass
ab3cdd2b1b
Merge pull request #37064 from tonistiigi/jsonmessage-aux
jsonmessage: pass message to aux callback
2018-05-15 20:50:19 -10:00
Anusha Ragunathan
a41051a9e4
Merge pull request #37003 from AntaresS/fix-integration-cli-for-e2e
Fix integration tests and integration cli to run on older versions
2018-05-15 21:10:37 -07:00
Mathieu Champlon
5a84124739 Make client underlying HTTP client accessible
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
2018-05-16 05:24:11 +02:00
Dennis Chen
96abf9f59e 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>
2018-05-16 10:01:44 +08:00
Anda Xu
e440831802 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>
2018-05-15 16:05:04 -07:00
Anusha Ragunathan
85a8252c47
Merge pull request #36971 from emanb29/6478-documentHostIP
Describe IP field of Port definition
2018-05-15 11:48:44 -07:00
Vincent Demeester
c0d39a1819
Merge pull request #37070 from vdemeester/fix-master
Fix logging test type
2018-05-15 17:52:35 +02:00
Vincent Demeester
25494e4c74
Fix logging test type
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-05-15 15:04:46 +02:00
Sebastiaan van Stijn
04864cb3cb
Merge pull request #37051 from wagoodman/patch-1
image spec v1 formatting fix
2018-05-15 14:00:53 +02:00
Sebastiaan van Stijn
6821ffd1a1
Merge pull request #37028 from cpuguy83/log_plugin_broken_pipe
Fix logging plugin crash unrecoverable
2018-05-15 13:57:01 +02:00
Sebastiaan van Stijn
6f68db8c7a
Merge pull request #37033 from cpuguy83/some_container_network_cleanups
Some container/network cleanups
2018-05-15 13:23:41 +02:00
emanb29
13e0b26510
Describe IP field of Port definition
Signed-off-by: Ethan Bell <ebgamer29@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-05-15 12:09:42 +02:00
Sebastiaan van Stijn
07dc3aa685
Merge pull request #37062 from cpuguy83/fix_logs_daemon_race
Fix race conditions in logs API
2018-05-15 11:59:40 +02:00
Vincent Demeester
26da99e326
Merge pull request #37063 from cpuguy83/fix_log_rotation_issue
Fix some issues in logfile reader and rotation
2018-05-15 11:46:29 +02:00
Vincent Demeester
829dcefa9d
Merge pull request #37044 from yongtang/03112018-TestDockerNetworkConnectAlias-name
Avoid unique name usage in TestDockerNetworkConnectAlias
2018-05-15 11:46:11 +02:00
Vincent Demeester
bcd86fc2ac
Merge pull request #37060 from cpuguy83/fix_swagger_gen
Fix swagger volume type generation
2018-05-15 11:46:02 +02:00
Tonis Tiigi
f784907eae jsonmessage: pass message to aux callback
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-05-14 15:48:25 -07:00
Yong Tang
6de3be1366
Merge pull request #37030 from adshmh/refactor-service-create-integration-tests-use-swarm-create-service
Refactor service create integration tests to use swarm CreateService
2018-05-14 14:07:22 -07:00
Brian Goff
e7479e3ab8 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>
2018-05-14 16:51:56 -04:00
Brian Goff
e87e9e6ad6 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>
2018-05-14 15:52:18 -04:00
Brian Goff
2c252a48c2 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>
2018-05-14 15:48:32 -04:00
Brian Goff
b16b125bb4 Fix swagger volume type generation
This was broken by bf6a790f00

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2018-05-14 13:46:20 -04:00
Yong Tang
e7b5f4500d 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>
2018-05-14 16:59:13 +00:00
Vincent Demeester
ab0dccf801
Merge pull request #37034 from cpuguy83/moar_metrics
Add metrics for log failures/partials
2018-05-14 18:05:30 +02:00
Vincent Demeester
a79d04ae55
Merge pull request #37040 from thaJeztah/error_on_unsupported_options
overlay: do not ignore invalid storage-driver options
2018-05-14 15:37:33 +02:00
Sebastiaan van Stijn
31aca4bef4
Merge pull request #36991 from kolyshkin/slice-in-place
daemon.setMounts(): copy slice in place
2018-05-14 13:49:47 +02:00
Sebastiaan van Stijn
8baea3a1bb
Merge pull request #37045 from abhi/inspect
Fixing network inspect for swarm
2018-05-14 12:51:12 +02:00
Vincent Demeester
8c66c01cd4
Merge pull request #37052 from thaJeztah/fix-missing-name-in-message
Fix missing plugin name in message
2018-05-14 10:39:39 +02:00
Sebastiaan van Stijn
b526964584
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>
2018-05-13 22:26:36 +02:00
Alex Goodman
4fb59c20a4
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>
2018-05-13 13:30:53 -04:00
Abhinandan Prativadi
a059d6f4f5 Fixing network inspect for swarm
Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
2018-05-13 07:31:14 -07:00
Sebastiaan van Stijn
996eb78fb8
Merge pull request #37049 from yongtang/05122018-version-history
Fix incorrect link in version-history.md
2018-05-13 16:30:58 +02:00
Yong Tang
6d66743ae3 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>
2018-05-13 13:22:39 +00:00
Sebastiaan van Stijn
df7c058198
Merge pull request #37047 from yongtang/05122018-changelog
Re-order CHANGELOG.md to pass `make validate` test
2018-05-13 14:11:56 +02:00
Yong Tang
333693c37c 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>
2018-05-13 00:27:51 +00:00
Sebastiaan van Stijn
38162e9655
Merge pull request #36289 from thaJeztah/backport-17.03.2-changelog
[backport] Add 17.03.2 CHANGELOG
2018-05-11 21:28:50 +02:00
Brian Goff
d0a516e256
Merge pull request #37041 from thaJeztah/remove_unused_function_in_test
overlay2: remove unused cdMountFrom() helper function
2018-05-11 13:56:56 -04:00
Sebastiaan van Stijn
379845ec20
Merge pull request #37031 from kolyshkin/getmnt
Fix daemon.getSourceMount() for /
2018-05-11 16:39:57 +02:00
Brian Goff
6433683887
Merge pull request #36815 from allencloud/simplify-ode
refactor: simplify code to make function getExecConfig  more readable
2018-05-11 10:06:33 -04:00
Sebastiaan van Stijn
8a8ec00c1f
overlay2: remove unused cdMountFrom() helper function
This function was added in 23e5c94cfb but never used

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-05-11 13:51:50 +02:00
Sebastiaan van Stijn
30f15d2bdc
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>
2018-05-11 13:40:46 +02:00
Brian Goff
673dd28e7e Add metrics for log failures/partials
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2018-05-10 17:22:37 -04:00
Brian Goff
d6558ad6a4 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>
2018-05-10 17:16:02 -04:00
Brian Goff
cc8f358c23 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>
2018-05-10 17:16:00 -04:00
Kir Kolyshkin
d8fd6137a1 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>
2018-05-10 12:53:37 -07:00
Brian Goff
f4ebcb42ac
Merge pull request #37029 from thaJeztah/fix-fluentd-partial
Fix fluentd partial detection
2018-05-10 12:51:02 -04:00