Commit Graph

30798 Commits

Author SHA1 Message Date
c9ee5a3f47 Return error in case docker network inspect is ambiguous
This fix is partially based on comment
https://github.com/docker/docker/issues/30242#issuecomment-273517205

Currently, `docker network inspect` relies on `FindNetwork()` which
does not take into consideration that multiple networks with the same
name might exist.

This fix propose to return `docker network inspect` in a similiar
fashion like other commands:
1. Lookup full ID
2. Lookup full name
3. Lookup partial ID
If multiple networks exist, an error will be returned.

NOTE: this fix is not a complete fix for the issue raised in
https://github.com/docker/docker/issues/30242#issuecomment-273517205
where SwarmKit is unable to update when multiple networks with the same
name exit.
To fix that issue requires multiple places when `FindNetwork()` is called.
Because of the impact of changing `FindNetwork()`, this fix focus on
the issue in `docker network inspect`.

A separate PR will be created to address
https://github.com/docker/docker/issues/30242#issuecomment-273517205

An integration test has been added.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: abf31ee0837ff80638f10b77df9025b6b6470253
Component: engine
2017-02-07 18:05:29 -08:00
6b54bc16cf Merge pull request #30694 from godefroi/26937-fix-rfc5424-log-format-1
Add NILVALUE for STRUCTURED-DATA in RFC5424 logs
Upstream-commit: 14790e4008c030626eeb8886c4578441af561cf0
Component: engine
2017-02-07 23:22:39 +01:00
1b9a800107 Merge pull request #30661 from yongtang/02012017-man-expose-publish-filter
Update API history and man page for `--filter expose/publish`
Upstream-commit: 91f36e4b8ae9040b6d6c425a8263936dc9873691
Component: engine
2017-02-07 14:05:36 -08:00
72f4f526e4 Merge pull request #30638 from albers/completion-ps-filter-by-ports
Add bash completion for `docker ps --filter expose|publish`
Upstream-commit: 9f8a7b6b452278605dabdb14936e0c6f38e98350
Component: engine
2017-02-07 13:38:19 -08:00
4c3e3cc52d Merge pull request #30640 from albers/completion-plugin-ls--filter
Add bash completion for `docker plugin ls --filter`
Upstream-commit: a19ead01bead960053cd8bf9c7660a4ec2c736a7
Component: engine
2017-02-07 13:32:29 -08:00
c355cec53c Merge pull request #30457 from dmcgowan/distribution-reference-update-2
reference: use distribution reference and remove fork
Upstream-commit: 254fc83cba90ed79c78f4cb0cb33aeeaff492798
Component: engine
2017-02-07 22:01:25 +01:00
6df9f2365c Merge pull request #29552 from dnephin/fix-build-with-log-driver
Ignore the daemon log config when building images
Upstream-commit: 1b4e2b7c878fb69c1c96755e21a571e6d7b8e4bb
Component: engine
2017-02-07 15:47:41 -05:00
5eac19d80f Merge pull request #30780 from xulike666/update-vender-for-go-gelf
Update dependency for Graylog2/go-gelf
Upstream-commit: 0daff908a83d92114a51a8294114098ffbcf8fb6
Component: engine
2017-02-07 21:40:08 +01:00
22902a5639 Merge pull request #29563 from yongtang/21845-duplicate-mount-point-volumes-from
Fix duplicate mount points for multiple `--volumes-from` in `docker run`
Upstream-commit: 5381f9f726e50a392d6623973d232b63290789f9
Component: engine
2017-02-07 14:58:51 -05:00
2260389fe6 Use distribution reference
Remove forked reference package. Use normalized named values
everywhere and familiar functions to convert back to familiar
strings for UX and storage compatibility.

Enforce that the source repository in the distribution metadata
is always a normalized string, ignore invalid values which are not.
Update distribution tests to use normalized values.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 3a1279393faf78632bf169619d407e584da84b66
Component: engine
2017-02-07 11:08:37 -08:00
958fd45277 Update swarmkit vendor
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 2bea87393b7673fc88531851803f073198527021
Component: engine
2017-02-07 11:08:36 -08:00
1b4c4226e5 Merge pull request #30787 from kevinetc123/typo-2
fix some types on errors and form
Upstream-commit: bbd4c87377dab95e40f54c66d3603de825383d99
Component: engine
2017-02-07 10:34:39 -08:00
4bc2dda008 Merge pull request #30767 from cpuguy83/plugin_upgrade_swagger
Update swagger spec for plugin upgrade
Upstream-commit: 124b480967675bcf6a95fe98c4df42acae8e7038
Component: engine
2017-02-07 10:32:40 -08:00
fcde483797 Merge pull request #30523 from nathanleclaire/document_init
Document --init flag for docker run
Upstream-commit: e0cc664cc34959b301849378f3e98146b079fc5e
Component: engine
2017-02-07 09:28:30 -08:00
03b9460cf3 Fix duplicate mount point for --volumes-from in docker run
This fix tries to fix the issue raised in 21845. The issue with 21845
is that if multiple `--volumes-from` with the same destination has been
specified, then one volume will be overridden by the other. This will mess
up with volumes reference and prevent the overridden volume from
being removed at the end.

Issue 21845 was observed with `docker-compose` though it is possible to
emulate the same behavior with `docker` alone:
```
$ cat Dockerfile
FROM busybox
VOLUME ["/tmp/data"]
$ docker build -t vimage .
$ docker run --name=data1 vimage true
$ docker run --name=data2 vimage true
$ docker run --name=app --volumes-from=data1 --volumes-from=data2 -d busybox top
$ docker rm -f -v $(docker ps -aq)
$ docker volume ls
$ docker volume rm ...
```
NOTE: Second case:
```
$ cat Dockerfile
FROM busybox
VOLUME ["/tmp/data"]
$ docker build -t vimage .
$ docker run --name=data1 vimage true
$ docker run --name=data2 vimage true
$ docker run --name=app --volumes-from=data1 --volumes-from=data2 -v /tmp/data:/tmp/data -d busybox top
$ docker rm -f -v $(docker ps -aq)
$ docker volume ls
$ docker volume rm ...
```
NOTE: Third case: Combination of --volumes-from and `HostConfig.Mounts` (API only)

This fix tries to address the issue by return an error if duplicate
mount points was used with `--volumes-from`.

An integration test has been added.

This fix fixes 21845.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9526e5c6aebfaf8c8d18cefa0cf44e92b7ad5f77
Component: engine
2017-02-07 08:30:56 -08:00
49889e6daa Update API history and man page for --filter expose/publish
This fix updates API history and man page for
`docker ps --filter expose/publish`, from the feedback:
https://github.com/docker/docker/pull/27557#issuecomment-276832876

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9fc393615f6aae1a70ba282123ee15afc23a6297
Component: engine
2017-02-07 08:24:46 -08:00
148d8c5f61 Update swagger spec for plugin upgrade
This was added in 03c694973968f63743ed53cef83d0b7455695081 but spec was
not updated.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: ae48cd04dacddbab50839be620b1f659ca322b7c
Component: engine
2017-02-07 11:21:54 -05:00
e827e3506f Merge pull request #30197 from yongtang/30178-service-health-check-none
Fix issue where service healthcheck is `{}` in remote API
Upstream-commit: 09114fe9f0fcfaa97be46c3142b8b64aacc94571
Component: engine
2017-02-07 17:17:26 +01:00
1be829bb74 Merge pull request #30789 from vdemeester/carry-update-docker-stack-experimental
Update docker stack experimental notes
Upstream-commit: c5a592a0a43ef3ce5a6d0644427cbe7011213f63
Component: engine
2017-02-07 08:11:26 -08:00
3f7730c74a Merge pull request #30734 from allencloud/add-400-status-code-for-events-endpoint
add status code 400 for api endpoint /events
Upstream-commit: f3da980a459c11a35248daa8a6be9919bf65fda2
Component: engine
2017-02-07 17:02:50 +01:00
edcb479225 Merge pull request #30639 from Microsoft/jjh/makeshortcut
Windows: Make.ps1 default to build binaries
Upstream-commit: 0a51ad2586a68ed7fd7e3547594630f07d8c9ee3
Component: engine
2017-02-07 07:39:33 -08:00
aad0552893 Update docker stack experimental notes
Update command usage and help.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 3225150b164c97e5e67893e93f45888d552f4919
Component: engine
2017-02-07 15:17:47 +01:00
5a2fed241e fix some types on errors and form
Signed-off-by: kaiwentan <kaiwentan@harmonycloud.cn>
Upstream-commit: ac9c47e26f57a0fa2fed95a1fb1bf6c9410a3b60
Component: engine
2017-02-07 20:29:32 +08:00
0bc7415047 fetch the latest code with zero-harm but good-readability for Graylog2/go-gelf
update vendor.conf for github.com/Graylog2/go-gelf

Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
Upstream-commit: 79d47a3bb763689bb7ea64da8a24c8ecfa6181c8
Component: engine
2017-02-07 17:27:17 +08:00
a0487c75eb Merge pull request #30771 from tophj-ibm/fix-manpages-p-z
ppc64le and s390x fixes for manpages
Upstream-commit: 09e99ef1fcbbcb8f1551298244ad8ac214cf2625
Component: engine
2017-02-06 21:53:19 -08:00
207b36b0ce Merge pull request #30774 from aaronlehmann/swarm-leave-docs-fix
Fix grammatical error in swarm_leave.md
Upstream-commit: 9e80a2a457a93b625aea72db42bb2f820d2b5b10
Component: engine
2017-02-06 21:33:12 -08:00
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
48134e2cad Fix grammatical error in swarm_leave.md
Correct this sentence so it reads correctly. "to on a manager" should be
"on a manager".

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 248b1c23d37e1e32af66583f8d14d9f8742280ef
Component: engine
2017-02-06 17:31:55 -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
1c501e8036 added ppc64le and s390x fixes for manpages
Fixes manpages for p and z by downloading a specific version
of go instead of relying on the distro version.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: 5bec1b686481244698474a0103c0994b25c5c79c
Component: engine
2017-02-06 17:51:37 -05: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
df1c58e788 Update distribution vendor
Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 24698a07cba89a08ac6fcc2c6e4097491b922883
Component: engine
2017-02-06 13:06:52 -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