Commit Graph

30291 Commits

Author SHA1 Message Date
9fdc574804 Use counter for tracking container states
Container state counts are used for reporting in the `/info` endpoint.
Currently when `/info` is called, each container is iterated over and
the containers 'StateString()' is called. This is not very efficient
with lots of containers, and is also racey since `StateString()` is not
using a mutex and the mutex is not otherwise locked.

We could just lock the container mutex, but this is proven to be
problematic since there are frequent deadlock scenarios and we should
always have the `/info` endpoint available since this endpoint is used
to get general information about the docker host.

Really, these metrics on `/info` should be deprecated. But until then,
we can just keep a running tally in memory for each of the reported
states.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e4c03623c2fcd3013343d246e3432409850c8c37
Component: engine
2017-04-29 17:10:14 -04:00
25f30c808a Merge pull request #32805 from daehyeok/refactoring
Remove unnecessary line
Upstream-commit: 52bded9868f04ec8f06148506666150b017af238
Component: engine
2017-04-28 11:22:59 -04:00
ad91de1337 Merge pull request #32772 from dnephin/refactor-builder-split-commit
[Builder] Refactor `Builder.commit()`
Upstream-commit: ec67cea96e0fd90a7a266e1adac9fe1867c8ae13
Component: engine
2017-04-28 11:18:55 -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
8a48c1f61c Merge pull request #32910 from friism/patch-11
fix typo in plugins_logging.md
Upstream-commit: 9b4bbaf1218d8cbfa283472cf0e09eae586a43e2
Component: engine
2017-04-28 09:34:39 -04:00
16a9e0d85d Merge pull request #32851 from rhvgoyal/volume-propagation
Volumes should have default propagation property "rprivate"
Upstream-commit: eaae8a9a9ca2b26ede363f11904a80a26aa1ee77
Component: engine
2017-04-28 08:58:10 -04:00
d2502dd75f fix typo in plugins_logging.md
Signed-off-by: Michael Friis <friism@gmail.com>
Upstream-commit: 3875305284e6d17874bd31a17fe31621a6a09169
Component: engine
2017-04-27 21:29:36 -07:00
3667e2cbdb Merge pull request #32653 from allencloud/add-empty-string-for-restartpolicy-in-swagger
add empty string for restart policy in swagger.yml
Upstream-commit: 9752e41fd06a46a7d3f3e1c42168dc02df53b81c
Component: engine
2017-04-28 00:03:09 -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
f6bbbde171 Extract commitContainer from commit() to separate the distinct branches
Remove unused arguments to commit.
This will allow us to remove all the runConfig mutate+revert code that
is scattered around builder dispatchers/internals

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 0d9e66b98ac9237b561d9beee5ecfe6a133ffc8f
Component: engine
2017-04-27 20:49:38 -04:00
960c2c726c Merge pull request #32327 from cpuguy83/fix_volumerm_mounted
Ensure unmount before removing local volume
Upstream-commit: eabee4d47bec93a5c180c429a9f8b791364c5876
Component: engine
2017-04-27 20:31:11 -04:00
60079a8d66 Merge pull request #32882 from albers/completion-stack-ls--format
Add bash completion for `stack ls --format`
Upstream-commit: 68a5336b61c8b252966b582f0e4d08c6ae0bdb63
Component: engine
2017-04-27 15:13:05 -07:00
d23cd74237 Merge pull request #32884 from albers/completion-system-df--format
Add bash completion for `system df --format`
Upstream-commit: 294c9eab56970fa0b106d20560ee1110ea478c5d
Component: engine
2017-04-27 15:10:17 -07:00
a9b3c829ba Merge pull request #32889 from yuexiao-wang/fix-config
fix errors in config
Upstream-commit: dc329d38ad70bd0b21fe7c09d2615f38dfb520dc
Component: engine
2017-04-27 15:04:07 -07: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
4554383dcd Merge pull request #31391 from cpuguy83/fix_volume_unmount_disconnected_fs
Use lazy unmount for local volume driver unmount
Upstream-commit: ccc1324b59e5768a3ef0236f112e1af20f7fbd2f
Component: engine
2017-04-27 16:22:58 -04:00
521ddefb3a Merge pull request #32897 from crosbymichael/unix-group
Don't error with empty group
Upstream-commit: cfae6278be8091e3b6025deaf0a9e225662a017f
Component: engine
2017-04-27 15:50:21 -04:00
a871092798 fix errors in config
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 25db82371eef40f54e1bd175ef72c479d368a798
Component: engine
2017-04-28 01:59:39 +08:00
c4a7515140 Merge pull request #32896 from albers/completion-attach
Add missing bash completion for `docker attach`
Upstream-commit: 420b67f892d5424be59a788a51e2c4e64bb9cd66
Component: engine
2017-04-27 13:57:27 -04:00
462b01fa63 Merge pull request #32887 from albers/completion-remove--init-path
Remove bash completion for `run|create --init-path`
Upstream-commit: 6b5a02e95c6f68db200c304bf084c1e4af13a11d
Component: engine
2017-04-27 13:53:47 -04:00
31e2336b4e Merge pull request #32883 from albers/completion-history--format
Add bash completion for `history --format`
Upstream-commit: 2881e2be587e5a16e3f1f5e9d5547263517c9c54
Component: engine
2017-04-27 10:51:12 -07:00
ce59d98dee Merge pull request #32858 from dnephin/builder-shell-words-interface
[Builder] Remove b.escapeToken, create ShellLex
Upstream-commit: aee2da3bdf6665939722dacf3b0c149499c35d90
Component: engine
2017-04-27 13:16:40 -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
e369d2c215 Don't error with empty group
Don't error if no group is specified, as this was the prior API.  Also
don't return a docker specific error message as this is in `/pkg` and
used by other projects.  Just set the default group for the current
user/group consuming the package.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 169c013911c9465f0e62a37f467d1afa54a0dbe7
Component: engine
2017-04-27 09:26:21 -07: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
0c65c48987 Add missing bash completion for docker attach
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: afbd5a79ca56556e58032a994efd18537c9169fb
Component: engine
2017-04-27 16:59:32 +02:00
2805ccbd34 Use lazy unmount for local volume driver unmount
This fixes issues where the underlying filesystem may be disconnected and
attempting to unmount may cause a hang.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: acbfe6bc56b9357d40a452f6b3901cb2c2d40404
Component: engine
2017-04-27 08:43:43 -04:00
a0854b8fd2 Remove bash completion for run|create --init-path
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: b7a32e178029442be05bad39466418bd12e26145
Component: engine
2017-04-27 11:02:33 +02:00
c0b973c686 Add bash completion for system df --format
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 69a2ca0d4409911f9dc2c55cbb75fad908c717a3
Component: engine
2017-04-27 10:29:19 +02:00
956e1394b5 Add bash completion for history --format
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: c3e161fb52835823e6d00c5a4d94323cb0a09964
Component: engine
2017-04-27 10:18:55 +02:00
ccf66c24b8 Add bash completion for stack ls --format
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: b065ed3ec24037f4f66a0e4a2656505adb8287ee
Component: engine
2017-04-27 10:01:17 +02:00
182eb7ea78 Merge pull request #32802 from juliengk/docs_plugin_authz
Update legacy_plugins.md to include HBM authz plugin
Upstream-commit: d90fb13de717effaff70ffc466f913eb9b453e30
Component: engine
2017-04-26 23:09:47 -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
1f57e06852 Merge pull request #32870 from thaJeztah/anusha-no-auto-assign
Disable auto-assign for Anusha
Upstream-commit: 5704d58cd89900555763bc3e55bff9cff50a481e
Component: engine
2017-04-26 18:55:01 -07:00
99fff90178 Merge pull request #32834 from Microsoft/gowinio-v0.3.9
Remove go-winio fork - move to v0.3.9
Upstream-commit: 3c5f3fd42bfb449ca56df03250096b3bd1bd22de
Component: engine
2017-04-26 21:06:39 -04:00
8fc8babfdf Merge pull request #32564 from dnephin/compose-file-rel-dir
Set Composefile WorkingDir to dirname of the composefile.
Upstream-commit: 22d9eadee2f511c5d39c0458116738e05d5d1e98
Component: engine
2017-04-26 17:30:33 -07:00
eed7e3e562 Disable auto-assign for Anusha
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 97d6b2a873ac62fec61117201325294679241205
Component: engine
2017-04-26 17:18:06 -07:00
e25a81277d Create a new ShellLex struct which provides the expected interface to Builder.
Remove b.escapeToken from builder

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 2414166e1e38a4de8aa4af40b90c7e1bc90102b0
Component: engine
2017-04-26 19:39:16 -04:00
0411944839 Merge pull request #31856 from jim-minter/more_races
Resolve a set of race conditions in logging and attaching code
Upstream-commit: 5eca7f7c5d7678f6548cd7d90199d67ce98d4c98
Component: engine
2017-04-26 16:04:02 -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
648a386996 Libnetwork vendoring
Vendor libnetwork changes for --data-path-addr flag

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: b96988feb928d295569f82fd0eaed5c16efad41d
Component: engine
2017-04-26 15:33:13 -07:00
d6b5919889 Merge pull request #32574 from mlaventure/add-ctx-to-df-prune
Add ctx to df and prune
Upstream-commit: d4bf6ad71623012a53e45debc90aaab0876ece48
Component: engine
2017-04-26 15:42:08 -05:00
597451657d Volumes should have default propagation property "rprivate"
Until and unless user has specified a propagation property for volume, they
should default to "rprivate" and it should be passed to runc.

We can't make it conditional on HasPropagation(). GetPropagation() returns
default of rprivate if noting was passed in by user.

If we don't pass "rprivate" to runc, then bind mount could be shared even
if user did not ask for it. For example, mount two volumes in a container.
One is "shared" while other's propagation is not specified by caller. If
both volume has same source mount point of "shared", then second volume
will also be shared inside container (instead of being private).

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: af8a1430f1c1a9d4c45c7d722b90c19094171651
Component: engine
2017-04-26 16:27:50 -04:00
5f291cb6ec Use personal email address
Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
Upstream-commit: 54dfc3721ca9f5e5e8e8178b0aae3f44a6a4575a
Component: engine
2017-04-26 11:59:51 -07:00
d617eb3d7d Merge pull request #32831 from jmaitrehenry/patch-2
Clarify where the RUN command runs from
Upstream-commit: 94465adaf05edd16f518f255cd7ad3c5ca23e2ac
Component: engine
2017-04-26 11:34:00 -07:00
c057b8b3f4 Clarify where the RUN command runs from
Also, chained/quoted shell does not work

Signed-off-by: Julien Maitrehenry <julien.maitrehenry@me.com>
Upstream-commit: 3f6e861c14bf13bb5b43aacb9edfbb027d6b6903
Component: engine
2017-04-26 13:54:48 -04: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
d806eb521a Merge pull request #32829 from aaronlehmann/cli-image-tests-corrections
cli: Correct command/image tests for testify
Upstream-commit: 08422650bec3c38936cc3eb950cc87c2d4ad9233
Component: engine
2017-04-26 11:29:11 +02:00