Commit Graph

30274 Commits

Author SHA1 Message Date
287ee51be3 Refactoring ineffectual assignments
This patch fixed below 4 types of code line
1. Remove unnecessary variable assignment
2. Use variables declaration instead of explicit initial zero value
3. Change variable name to underbar when variable not used
4. Add erro check and return for ignored error

Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
Upstream-commit: 6306019d0bad9c4e60ee437e93f2450dfb0b68c0
Component: engine
2017-01-13 00:27:01 -07:00
a9065717ae Merge pull request #30061 from yongtang/30027-docker-images-v1.12
Fix `Size` in `docker images` for v1.12 client to v1.13 daemon
Upstream-commit: 0b09d6bfa7af18763d0f4a74f179117a73e70e46
Component: engine
2017-01-13 02:11:48 +01:00
2cf38188cb Merge pull request #30039 from ripcurld0/specify_line_no_dockerfile_err
Specify in which line the Dockerfile parser failed
Upstream-commit: 597843e79040a4f00bfe2abd83343d43edd195f5
Component: engine
2017-01-12 19:48:45 -05:00
5db27accf5 Merge pull request #30106 from runcom/fix-upgrade-from-1.10
daemon: honor default runtime when starting containers
Upstream-commit: f65212d5b96a18349b0f436c35f99e4eed13f7c9
Component: engine
2017-01-12 14:44:37 -08:00
89de8e187c daemon: honor default runtime when starting containers
If you created containers from pre-OCI docker (e.g. docker-1.10.x)
upgrade may fail when restarting containers if the new docker daemon
has `--default-runtime` set.

In Fedora, we ship docker 1.12.6 with:

```
--default-runtime=oci
--add-runtime oci=/usr/libexec/docker/docker-runc-current
```

That way we don't rely on `docker-runc` being in `$PATH`.

The issue is, on upgrade from docker 1.10.3 without this patch, the
default runtime in `daemon/start_linux.go` is unconditionally set to
`runc=docker-runc` without honoring the `--default-runtime` flag set in
the docker daemon.

Reproducer:

- (1.10.3) `docker run -d -p 5000:5000 --restart=always --name registry
registry:2`
- upgrade to docker 1.12.6 (1.11.x has likely the same issue)
- the registry container fails to restart on upgrade with the following
log message `error="exec: \"docker-runc\": executable file not
found in $PATH: \"\""`

That error comes from the fact that we're setting the runtime in the
container's HostConfig to `runc` where instead we should have honored
the `--default-runtime` flag (in our case that's set to `oci`).

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 9391a822ea4bee60284b4b2eb3a6535e20492569
Component: engine
2017-01-12 20:36:22 +01:00
d11c4417e8 Merge pull request #27903 from kim0/master
zfs: expose mountpoint/dataset on inspection
Upstream-commit: 27695cd751c2bf6295b751b913893bbe72304b96
Component: engine
2017-01-12 11:28:07 -08:00
e808d12650 Merge pull request #30088 from tonistiigi/fifo-close-early
Close stdout/stderr fifo as soon as possible
Upstream-commit: f018c0dfff3c3dc213b3d3c05228dfed4ef0fb4a
Component: engine
2017-01-12 09:29:39 -08:00
52878055d1 Merge pull request #29485 from ericcurtin/remove-prompt-add-docker-group
Don't encourage adding user to docker group
Upstream-commit: 06e3812b6e50f63b13b9a6eefb012da83f6283ab
Component: engine
2017-01-12 18:28:16 +01:00
9122c50dc9 Merge pull request #28500 from rhvgoyal/remove-unused-param
devmapper: get rid of unused device id argument in unregisterDevice()
Upstream-commit: e880120fe25543f7f45dad5c3f1fcd43cb3acd8b
Component: engine
2017-01-12 18:02:00 +01:00
eb27b9a5c9 Merge pull request #27928 from erikh/fix-docs
api/types/client.go: documentation fix for ImageImportSource
Upstream-commit: 1d40e9cb187640f9369d2bef40d7d9d03b03d493
Component: engine
2017-01-12 17:36:36 +01:00
7a795dddeb Add test for image size for v1.12 and v1.13 clients against v1.13 daemon
This test checks to make sure both v1.12 and v1.13 client against v1.13 daemon get correct `Size` after the fix.

This test is related to 30027.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d9451f1c8c8a584053ef06e0801df14e37d43cbd
Component: engine
2017-01-12 08:12:39 -08:00
07dc948442 Fix ImageSummary.Size value
The prune PR changed the meaning of the file to mean "space on disk
only unique to this image", this PR revert this change.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: be20dc15af0cb281bd6d11586cfcc96bd50d12ca
Component: engine
2017-01-12 07:49:22 -08:00
a1c6880e0b Specify in which line the Dockerfile parser failed
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 8f282cdea5186896923da02f420e929c8ded61cb
Component: engine
2017-01-12 17:45:45 +02:00
5ce3711251 Merge pull request #30010 from thaJeztah/master-revert-27146
Revert "Require continuation char to be last char in a line"
Upstream-commit: bf71db7a12c6855720182d02af1a58c0b343468d
Component: engine
2017-01-12 09:17:08 -05:00
b003f7cdb4 Merge pull request #30077 from tonistiigi/fix-test-leaks
Fix leaked connections in integration tests
Upstream-commit: af5323f9583dbce0f6d8a43a2e442400b9e9b981
Component: engine
2017-01-12 11:35:02 +01:00
411f61003c Merge pull request #30085 from swernli/skip_push_base
storeLayer.Parent should return describableStoreLayers
Upstream-commit: e48937fb9922cbc1a7e2b50eb9d3d6d589a51d02
Component: engine
2017-01-11 23:37:50 -08:00
0c76241c26 Close stdout/stderr fifo as soon as possible
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 5a6184a535b62d9b5515d18d8561641d3f3d04cb
Component: engine
2017-01-11 22:11:13 -08:00
8d865a6c15 storeLayer.Parent should return describableStoreLayers
When storeLayer.Parent returns the parent layer, it needs to use the same logic as Get where it wraps in a describablyStoreLayer if the layer is describable. Otherwise, on Windows, this can result in pushing the foreign layers, which is not supposed to be allowed.
This fixes https://github.com/docker/docker/issues/30080.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
Upstream-commit: d14b7212ad7b2b161afc6f0c9ac08daae14198c0
Component: engine
2017-01-11 19:01:13 -08:00
5d161f8e0e Merge pull request #30073 from albers/completion-swarm-join--availability
Add bash completion for `swarm join --availability`
Upstream-commit: d9a4bba398031b6f644985d50265df9b32ce2ae0
Component: engine
2017-01-12 10:37:02 +09:00
4481a136ca Merge pull request #30079 from tonistiigi/debug-trusttest
Print daemon stacktrace when trust test times out
Upstream-commit: 640a5c1a38b3d6128be27f15e823e7cb2ce7e323
Component: engine
2017-01-11 17:06:33 -08:00
1362fa8de5 Merge pull request #30065 from dnephin/fix-extends-error-message
Improve the error message for extends in stack deploy.
Upstream-commit: acaf3cf870ff6a88df5c480682046e4106e31da5
Component: engine
2017-01-11 15:27:01 -08:00
8618f63e83 Print daemon stacktrace when trust test times out
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: e533685d13251e5c7127f2d92636c7fa6393c06e
Component: engine
2017-01-11 15:14:36 -08:00
24c4a881f8 Fix leaked connections in integration tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 1e98fb5ad91b956005059ae2148b1dda6fdf372c
Component: engine
2017-01-11 14:48:48 -08:00
b8f872e90b Merge pull request #29891 from sanimej/libnvendor
vendorin libnetwork @f9fa6e0
Upstream-commit: de54284bd7cf4e1c8c255c61d0cf05533f3c2ba4
Component: engine
2017-01-11 19:55:00 +01:00
47580bbc58 Add bash completion for swarm join --availability
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: f487b268f9ec7e4f06723261dadc2b567bf0504c
Component: engine
2017-01-11 10:30:56 -08:00
be1edfea27 Merge pull request #30060 from xulike666/fix-typo
Fix typo in libcontainerd/client.go
Upstream-commit: c38bb7a72517aec4c695d778c857621778edff82
Component: engine
2017-01-11 12:13:35 -05:00
b112b94b43 Improve the error message for extends in stack deploy.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 46422df4900be14730447045cc1b1da3ebbf1e28
Component: engine
2017-01-11 11:57:24 -05:00
de94c8e520 Merge pull request #24993 from yongtang/24596-swarm-join-with-drain
Allow swarm join with `--availability=drain`
Upstream-commit: 66aba12df2319b55b04e381189da39a7f35029e5
Component: engine
2017-01-11 17:39:01 +01:00
8928076872 fix typo in libcontainerd/client.go
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
Upstream-commit: 39a24019e3a7b2f423090dff4793698001620737
Component: engine
2017-01-11 23:10:02 +08:00
95646d90c7 Merge pull request #29206 from ripcurld0/doc_api_update
Specify content type in the build request
Upstream-commit: 24e9ac15759cc23caf90383b5ea6de79af4363a0
Component: engine
2017-01-11 08:41:39 +01:00
1cb5b7c369 Merge pull request #30014 from tiborvass/plugin-devices-redone-master
Plugins: Rename DeviceCreation to AllowAllDevices
Upstream-commit: 696ef7a19eccd44732e9c50902c8949e574ef097
Component: engine
2017-01-10 17:24:38 -08:00
9279721b7c Merge pull request #30035 from aaronlehmann/vendor-swarmkit-62d835f
Update vendored swarmkit to 62d835f
Upstream-commit: a02b1215c27b509c154bded6507cfef2dc40347e
Component: engine
2017-01-10 20:13:12 -05:00
2b1a88aa3b Handle IPv6 enabling correctly in the tests
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
Upstream-commit: d5e8d8e1cfb65cab9a2a651fd30c50a06afb4e00
Component: engine
2017-01-10 16:34:23 -08:00
acaf4ba63f Allow swarm init with --availability=drain
This fix adds a new flag `--availability` to `swarm join`.

Related documentation has been updated.

An integration test has been added.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0f30c644441b3b4150252af1b41db99d4b6e697a
Component: engine
2017-01-10 16:31:51 -08:00
9a5d4b9c8d Allow swarm join with --availability=drain
This fix tries to address the issue raised in 24596 where it was not
possible to join as manager only (`--availability=drain`).

This fix adds a new flag `--availability` to `swarm join`.

Related documentation has been updated.

An integration test has been added.

NOTE: Additional pull request for swarmkit and engine-api will
be created separately.

This fix fixes 24596.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: a8e7e37aa82d1adac67b05836ea97a06fbdfdbf0
Component: engine
2017-01-10 16:31:51 -08:00
b998fced62 plugins: rename DeviceCreation to AllowAllDevices
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: f265727bdf637c717cd8bdc8675aff4d1714963e
Component: engine
2017-01-10 13:50:30 -08:00
3e8a509133 vendorin libnetwork @d2edad309cc874e865b5ba4d6bd6b276c93451d3
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
Upstream-commit: a0dcdcb95f73cd06d3f037f9652a66a5764cb18a
Component: engine
2017-01-10 13:50:16 -08:00
cc8a539fed Update vendored swarmkit to 62d835f
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: f31ed6cb5bb0888acd83c5ddcd3c0da95dc0719b
Component: engine
2017-01-10 13:00:11 -08:00
2f215f3de2 Merge pull request #29967 from justincormack/gpg-include-keys
Do not use keyservers to fetch GPG keys for apt
Upstream-commit: 518945b6bd30dc535addf2aac9d5eeefbfc5e523
Component: engine
2017-01-10 11:35:11 -08:00
59c79fe38f Merge pull request #29787 from yongtang/29730-multiple-published-port
Fix issues of multiple published ports mapping to the same target port
Upstream-commit: 82dfa6563fe78d41eb2f720e1f041f52e02b2a7a
Component: engine
2017-01-10 18:49:16 +01:00
bc04d9530c Merge pull request #30021 from vdemeester/29994-followup
Few stack deploy network fixes
Upstream-commit: 2209c9c948331bac0f706cb0e068ae3bb134d55c
Component: engine
2017-01-10 16:40:51 +01:00
6a39de5e4f Merge pull request #29947 from vdemeester/integration-some-runCommandWithOutput-clean
[test-integration] clean some runCommandWithOutput
Upstream-commit: e5058ff15cac51836f426175df8a7840a670f046
Component: engine
2017-01-10 15:56:42 +01:00
5bf9b5443d Update swarmkit to c97146840a26c9ce8023284d0e9c989586cc1857
This commit updates swarmkit to c97146840a26c9ce8023284d0e9c989586cc1857

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: f3a274fa08d70e25b31ba0e0603d14d3b9997c32
Component: engine
2017-01-10 03:46:42 -08:00
c1d7d93cb3 Few stack deploy network fixes
- Make sure we use the correct network name for external ones.
- Make the default network overridable and only creates networks that
  are used by services — so that default network is only created if a
  service doesn't declare a network.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 3191f5809bc1233bbf2103d2432b75cac93567bb
Component: engine
2017-01-10 10:29:09 +01:00
3229d5a2cb Fix issues of multiple published ports mapping to the same target port
This fix tries to address the issue raised in docker/docker-29730
where a service with multiple published ports mapping to the same target
port (e.g., `--publish 5000:80 --publish 5001:80`) can't be allocated.

The reason for the issue is that, `getPortConfigKey` is used for both
allocated ports and configured (may or may not be allocated) ports.
However, `getPortConfigKey` will not take into consideration the
`PublishedPort` field, which actually could be different for different
allocated ports.

This fix saves a map of `portKey:portNum:portState`,  instead of currently
used `portKey:portState` so that multiple published ports could be processed.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: cb59bd0c5194f3f74cd405a87b562465219cad8a
Component: engine
2017-01-10 00:46:18 -08:00
b3e47ec408 Merge pull request #29564 from aaronlehmann/getter-types
plugingetter: Avoid all caps for constant declarations
Upstream-commit: 9c96768eae4b3a65147b47a55c850c103ab8972d
Component: engine
2017-01-10 09:35:19 +01:00
8f27f74ad0 Update docs and code to use application/x-tar in the build API
At the "Build image from Dockerfile" section in the API docs
the Content-Type header is missing.
In addition, some parts in the code are still setting the
Content-Type header to application/tar while it was changed
to application/x-tar since 16th September 2015.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: b1996728aaeaa147c2045c8be79373d59ce7117a
Component: engine
2017-01-10 06:40:06 +02:00
cc35939485 Revert "Require continuation char to be last char in a line"
This reverts commit 105bc63295a7126798d3722a0e205c5ead4e2b1c,
which (although correct), resulted in a backward incompatible
change.

We can re-implement this in future, after this changes goes
through a deprecation cycle

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c67550414b762ab32ea3e9645ebcafb79cb9059d
Component: engine
2017-01-10 00:41:03 +01:00
1f4bebfb09 Merge pull request #30005 from dnephin/fix-stack-deploy-resources
Fix parsing resources from compose file for stack deploy.
Upstream-commit: 8563492eefb1653c7e83b539a254446a555961e3
Component: engine
2017-01-09 22:50:01 +01:00
96ecd9523f Merge pull request #30002 from Microsoft/jjh/registerdiffids
Windows: Remove dead code RegisterDiffIDs
Upstream-commit: c0e679660f26e1e3b90904365dd253613e7bccba
Component: engine
2017-01-09 22:43:54 +01:00