Commit Graph

30760 Commits

Author SHA1 Message Date
d916d66338 Merge pull request #30773 from aboch/gn
getAllNetworks unnecessary walks all the networks
Upstream-commit: 7c7be8423842768d174f9091c7adfc2e89c1a24d
Component: engine
2017-02-06 20:28:30 -08:00
1a76374f64 getAllNetworks unnecessary walks all the networks
- libnetwork controller Networks() already returns
  a copy list. Also Networks() correctly skips any
  network which ahs already been marked for deletion
  while getNetworks implementation bypass this.

Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 5d71cc01b6bb089a70fa1e855943dab0d88439bb
Component: engine
2017-02-06 16:37:51 -08:00
404093c291 Merge pull request #30732 from stevvooe/validate-mounts-at-start
cluster/executor: check mounts at start
Upstream-commit: 41864ca0ecc5c515f870cae862c286bb38cc1bf6
Component: engine
2017-02-06 15:01:48 -08:00
a7aa5f4c3b Merge pull request #30755 from andrewhsu/golang-1.7.5-for-manpages
use golang 1.7.5 for building man pages
Upstream-commit: 94c4c68607fcc61d28a424ee3aa33e0c233a9307
Component: engine
2017-02-06 14:48:28 -08:00
770410c730 Merge pull request #30749 from yongtang/28005-docker-stats-header-windows
Fix Windows `docker stats` showing Linux headers
Upstream-commit: 90709776c5a78bcfab226c19ccb6fa21c3f272f6
Component: engine
2017-02-06 14:09:23 -08:00
3b9f4a63b1 Merge pull request #30136 from tg123/master
Windows: return err instead of panic when convert string to utf16
Upstream-commit: d38753303a60181acbf15c8e01a223f2013439c8
Component: engine
2017-02-06 14:00:00 -08:00
b6e3ac9b99 remove musl-dev in man/Dockerfile.armhf
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 1c7a66eda768dcdcc210c7c43d80770bfb59b435
Component: engine
2017-02-06 13:32:21 -08:00
0ba6f88a03 cluster/executor: check mounts at start
While it is important to not create controllers for an invalid task,
certain properties should only be checked immediately before use. Early
host validation of mounts prevents resolution of the task Executor when
the mounts are not relevant to execution flow. In this case, we have a
check for the existence of a bind mount path in a creation function that
prevents a task controller from being resolved. Such early validation
prevents one from interacting directly with a controller and result in
unnecessary error reporting.

In accordance with the above, we move the validation of the existence of
host bind mount paths to the `Controller.Start` phase. We also call
these "checks", as they are valid mounts but reference non-existent
paths.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 92899ffac8ca1136e807dd234e8fa1dd49db7801
Component: engine
2017-02-06 13:09:53 -08:00
bcfb515abf Merge pull request #30764 from tiborvass/stacktrace-debug-mode
Show stacktrace in daemon logs only if 500 internal error
Upstream-commit: dc15fe8a34df42a97d20b26338dc5ef13897c9fa
Component: engine
2017-02-06 12:41:50 -08:00
f29b0ab9bd Merge pull request #30742 from yongtang/29975-compose-network-attachable
Add compose support of `attachable` in networks
Upstream-commit: e06ae6f41955acad6f614f9e88b79672862ec26c
Component: engine
2017-02-06 12:27:44 -08:00
8b439bbd93 Merge pull request #30701 from allencloud/add-status-code-404-for-plugin-in-api-doc
add status code 404 for plugin api endpoint enable and disable
Upstream-commit: 0113128b2a79a9cef9950e71e0681380b240faf4
Component: engine
2017-02-06 11:53:17 -08:00
264f6d8260 Merge pull request #30753 from NickrenREN/daemon-register
remove Register return value
Upstream-commit: b11f988dd003f702dcdbdc4dcab986c068d68a0f
Component: engine
2017-02-06 11:47:17 -08:00
7942fcb4f0 Merge pull request #30769 from tianon/prompt-for-confirmation
Fix "command.PromptForConfirmation" to accept "enter" for the "N" default
Upstream-commit: d4136eb5251132f4b841fd74fa8a0d74c156069e
Component: engine
2017-02-06 11:44:45 -08:00
daca41d5ee use precompiled go from google, needs debian to work
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: a6886bfc5253453b79cdddd7f8412b29356fd02b
Component: engine
2017-02-06 11:29:25 -08:00
3da9fbe9c3 Merge pull request #30760 from justincormack/yamlup
Update Go Yaml
Upstream-commit: 00d2057698e078ff55ea05044af41a94d704538f
Component: engine
2017-02-06 11:14:55 -08:00
7fb8ca1684 Merge pull request #30690 from aboch/vnd
Vendoring libnetwork @802895f
Upstream-commit: 1d3f6e4aaf8e83787a22017bd686c6d04c727710
Component: engine
2017-02-06 13:20:51 -05:00
0ff5a04abc Show stacktrace in daemon logs only if 500 internal error
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: f7d9bb62483fa160553ef17840b1f974b12885ac
Component: engine
2017-02-06 10:13:21 -08:00
3b3c271a31 Fix "command.PromptForConfirmation" to accept "enter" for the "N" default
This adjusts `command.PromptForConfirmation` in `cli/command/utils.go` to use `bufio`'s `ReadLine` rather than using `fmt.Fscan` for reading input, which makes `<Enter>` properly accept the default value of "No" as one would expect.

This new code actually came from `cli/command/plugin/install.go`'s `acceptPrivileges` function, which I've also refactored here to use `command.PromptForConfirmation` as it should.

Additionally, this updates `cli/command/plugin/upgrade.go`'s `runUpgrade` function to use `command.PromptForConfirmation` for further consistency.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
Upstream-commit: 2198b0568f7b7137545757c896191ef2a2bc720e
Component: engine
2017-02-06 09:13:07 -08:00
969d829731 Update Go Yaml
- changes license to Apache from LGPLv3
- small fixes for Go 1.8, parsing.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
Upstream-commit: 08304e853863b3c78a7455923b55349c2e3c9334
Component: engine
2017-02-06 13:08:58 +00:00
f3c8bbef1f Merge pull request #30710 from albers/completion-service--format
Add bash completion for `(stack services|service ls) --format`
Upstream-commit: 191719e39af721c5dda955e4aafa64eeb643dad8
Component: engine
2017-02-06 11:44:26 +01:00
54e19fa73c Merge pull request #30683 from milindchawre/fix_30503
Adding support for docker max restart time
Upstream-commit: 67dffe2741a1f56de0a8225988765bc5baa543fc
Component: engine
2017-02-05 23:33:31 -08:00
8dc75c5438 from golang:1.7.5-alpine for docker-manpage-dev
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 7b52ec5f103bc026b47e58f2c4dfe46b9bd83c32
Component: engine
2017-02-05 22:40:57 -08:00
5926ef0392 remove Register return value
Since Register() will never return err,remove the return value

Signed-off-by: NickrenREN <yuquan.ren@easystack.cn>
Upstream-commit: 78b50c129e06ceab460648b9c84d464b4c34cfee
Component: engine
2017-02-06 12:44:24 +08:00
190522d7df Fix Windows docker stats showing Linux headers
This fix is an attempt to fix issue raised in #28005 where
`docker stats` on Windows shows Linux headers if there is
no containers in stats.

The reason for the issue is that, in case there is no container,
a header is faked in:
https://github.com/docker/docker/blob/v1.13.0/cli/command/formatter/formatter.go#L74-L78
which does not know OS type information (as OS was stored with container stat entries)

This fix tries to fix the issue by moving OS type information
to stats context (instead of individual container stats entry).

Additional unit tests have been added.

This fix fixes #28005.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0a3a3ba2b62a5720d949e93fd580d3cf797cfa9e
Component: engine
2017-02-05 08:55:30 -08:00
ba62bc02bb Merge pull request #30290 from vdemeester/carry-pr-27834
Carry #27834 — Do not require `.git` in the build context
Upstream-commit: 4af2555a353a8f407c49adb57877ead436af04be
Component: engine
2017-02-04 19:19:16 -08:00
a86724bb15 Add compose support of attachable in networks
This fix tries to address the issue raised in 29975 where
it was not possible to specify `attachable` flag for networks
in compose format.

NOTE: Compose format aleady supports `labels` in networks.

This fix adds the support of `attachable` for compose v3.1 format.

Additiona unit tests have been updated and added.

This fix fixes 29975.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: cf4b7a5b876cfa91a1bea22d248e4925c8e2bf71
Component: engine
2017-02-04 14:16:06 -08:00
03aaf44639 Merge pull request #30187 from thaJeztah/show-error-on-unsupported-flags
print error if unsupported flags are used
Upstream-commit: f538c4bd3c203a4d49711fd7807cdd4bb4182e70
Component: engine
2017-02-04 22:43:51 +01:00
1a6864c6d3 Merge pull request #30686 from anusha-ragunathan/windowsPath
Add Windows specific exec root for plugins.
Upstream-commit: eb6b972c493cf67d8adbc1f7cf6f0de69eff71e9
Component: engine
2017-02-04 16:12:16 +01:00
a3638a3c5b Merge pull request #28751 from ijc25/wrap-help-output
Wrap CLI --help output to terminal width
Upstream-commit: fac13e4e0764c551c5452e6f8fbcde45cf67ff12
Component: engine
2017-02-03 23:04:11 -08:00
5d5f0fee1c Adding support for docker max restart time
Signed-off-by: milindchawre <milindchawre@gmail.com>
Upstream-commit: 9bd3a7c0297fdb93deb846070c85ac23da0a20e8
Component: engine
2017-02-04 03:54:47 +00:00
327117961b Merge pull request #30553 from lewisdaly/21050-improve-user-namespace-docs
Updated dockerd docs with note about user namespaces
Upstream-commit: d6b1b532a1e12c4969772519cb2643b285d1318f
Component: engine
2017-02-03 19:48:06 -08:00
6fc03b6025 Updated dockerd docs with note about user namespaces
Signed-off-by: Lewis Daly <lewisdaly@me.com>

Updated uid/gid reference to be more canonical - and signed commit

Signed-off-by: Lewis Daly <lewisdaly@me.com>

Editorial suggestion

I tried my hand at rewriting this a bit for readability. Can you please verify that the facts are correct, especially about the permission changes? You can feel free to squash my commit with yours so that it's signed. You'll need to pull the change from your fork to work on it locally.

Editorial suggestion

I tried my hand at rewriting this a bit for readability. Can you please verify that the facts are correct, especially about the permission changes? You can feel free to squash my commit with yours so that it's signed. You'll need to pull the change from your fork to work on it locally.
Upstream-commit: 2f9280dcd05f965a24c2f4112a328be59f116412
Component: engine
2017-02-04 13:50:50 +10:30
7b0b9f56f9 Merge pull request #30673 from mavenugo/nr
List Networks need not pull all the endpoints
Upstream-commit: 4dbc105fc1dc572577f48a69fcecc475ba81b576
Component: engine
2017-02-03 19:09:43 -08:00
720dd28131 Merge pull request #30210 from thaJeztah/carry-29727
[carry 29727] update unit-file; wait for network to be online
Upstream-commit: ea4d1243953e6b652082305a9c3cda8656edab26
Component: engine
2017-02-03 17:17:08 -08:00
07cd3d04be print error if unsupported flags are used
Docker 1.13 and up allows a client to communicate
with older daemons. As a result, flags may be
present that are not supported by the older daemon.

The client already _hides_ flags that are not
supported yet, but this doesn't present users
from using those flags.

This change shows an error if a flag is used
that is not supported by the daemon (either
based on the API version, or because experimental
features are not enabled).

Note that for some options, a check is already
in place in the API client. For those
options, this is just a minor enhancement
to more clearly indicate which _flag_ is
not supported.

Before this change;

    DOCKER_API_VERSION=1.24 docker run -d --stop-timeout=30 busybox top
    mjfyt3qpvnq0iwmun3sjwth9i

    echo -e "FROM busybox\nRUN echo foo > bar" |  DOCKER_API_VERSION=1.24 docker build --squash -
    "squash" requires API version 1.25, but the Docker server is version 1.24

After this change;

    DOCKER_API_VERSION=1.24 docker run -d --stop-timeout=30 busybox top
    "--stop-timeout" requires API version 1.25, but the Docker daemon is version 1.24

    echo -e "FROM busybox\nRUN echo foo > bar" | DOCKER_API_VERSION=1.24 docker build --squash -
    "--squash" requires API version 1.25, but the Docker daemon is version 1.24

    echo -e "FROM busybox\nRUN echo foo > bar" | docker build --squash -
    "--squash" is only supported on a Docker daemon with experimental features enabled

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 34148978bd0f71692e2584add60018e10b8ff68d
Component: engine
2017-02-03 16:59:20 -08:00
e6c5fda6f5 Merge pull request #29414 from cpuguy83/plugin_upgrade
Add docker plugin upgrade
Upstream-commit: fa49c076d44365f77f392b72fd181db0524a18fb
Component: engine
2017-02-03 15:27:48 -08:00
a14a8b183d Make propagated mount persist outside rootfs
This persists the "propagated mount" for plugins outside the main
rootfs. This enables `docker plugin upgrade` to not remove potentially
important data during upgrade rather than forcing plugin authors to hard
code a host path to persist data to.

Also migrates old plugins that have a propagated mount which is in the
rootfs on daemon startup.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e8307b868de9f19bb97f5cafcd727df5c5f501be
Component: engine
2017-02-03 16:22:58 -05:00
28da29ca6e Add docker plugin upgrade
This allows a plugin to be upgraded without requiring to
uninstall/reinstall a plugin.
Since plugin resources (e.g. volumes) are tied to a plugin ID, this is
important to ensure resources aren't lost.

The plugin must be disabled while upgrading (errors out if enabled).
This does not add any convenience flags for automatically
disabling/re-enabling the plugin during before/after upgrade.

Since an upgrade may change requested permissions, the user is required
to accept permissions just like `docker plugin install`.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 03c694973968f63743ed53cef83d0b7455695081
Component: engine
2017-02-03 16:21:12 -05:00
ba32ae9bba Bind mount .git 👼
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 617be0ef2bbbce6f0e908734f8a5f2b6a7b93877
Component: engine
2017-02-03 21:00:32 +01:00
423693caaf Merge pull request #30717 from albers/completion-dockerd--default-shm-size
Add bash completion for `dockerd --default-shm-size`
Upstream-commit: 08567641bb8fa7fdf84005ca346d4d2d92fb59e2
Component: engine
2017-02-03 11:27:46 -08:00
ccade9b683 Merge pull request #30718 from allencloud/update-incorrect-comments-of-checkpoint
update incorrect comments of CheckpointList
Upstream-commit: 73e218c965ba903137764c117331b99b8682b541
Component: engine
2017-02-03 11:22:30 -08:00
d278833fc3 Merge pull request #30720 from albers/completion-refactor-shared-completions
Refactor use of shared completion functions
Upstream-commit: 453c5c1650ddb45a1500c137bb58a68230fc8a77
Component: engine
2017-02-03 11:14:11 -08:00
12ff361266 Merge pull request #30719 from alfred-landrum/gdcounter
Fix RefCounter count return
Upstream-commit: 70dc4cd44654612c28bb8f6fa596d1f0dc9be14e
Component: engine
2017-02-03 11:09:17 -08:00
ce674beb2b Refactor use of shared completion functions
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 013152972df7fdc3b4d36fc088db408fe1aec5c5
Component: engine
2017-02-03 18:01:32 +01:00
049d94cb19 Fix RefCounter count return
Signed-off-by: Alfred Landrum <alfred.landrum@docker.com>
Upstream-commit: 874a502b1deea1019dab23e2b5ead9c792925e40
Component: engine
2017-02-03 08:47:55 -08:00
0cda3fd8df update incorrect comments of CheckpointList
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 98ffe52fbc953ec2fce0d3b6c3b2405188b96cd5
Component: engine
2017-02-04 00:41:35 +08:00
8ace2f2784 Add bash completion for dockerd --default-shm-size
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: a45ab91066919d6bbc37186dab9e03012d392fd2
Component: engine
2017-02-03 17:39:32 +01:00
041250945b Add bash completion for {stack services,service ls} --format
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 6f86066d44579621a53a3f126c39288512e63e63
Component: engine
2017-02-03 13:09:46 +01:00
6beb277937 Wrap output of docker cli --help
This should go some way to unblocking a solution to #18797, #18385 etc by
removing the current rather restrictive constraints on help text length.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
Upstream-commit: a4f71ccff6a99b39c01e3743d0b0cc4316b33b8d
Component: engine
2017-02-03 11:05:49 +00:00
0035afab8d Revendor github.com/spf13/pflag to 9ff6c6923cfffbcd502984b8e0c80539a94968b7
$ git log --oneline dabebe21bf79..9ff6c6923cff
9ff6c69 Add FlagSet.FlagUsagesWrapped(cols) which wraps to the given column (#105)
a9a634f Add BoolSlice and UintSlice flag types. (#111)
a232f6d Merge pull request #102 from bogem/redundant
5126803 Merge pull request #110 from hardikbagdi/master
230dccf add badges to README.md
c431975 Merge pull request #107 from xilabao/add-user-supplied-func-when-parse
271ea0e Make command line parsing available outside pflag
25f8b5b Merge pull request #109 from SinghamXiao/master
1fcda0c too many arguments
5ccb023 Remove Go 1.5 from Travis
86d3545 Clean up code

I am interested in 9ff6c69 for a followup.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
Upstream-commit: a6e536e415e125fba7578e2a1ee5c12fb380b0d9
Component: engine
2017-02-03 11:05:49 +00:00