Commit Graph

4863 Commits

Author SHA1 Message Date
c90ad1369f Merge pull request #31257 from tonistiigi/nested-build
build: add multi-stage build support
Upstream-commit: 2fa8fe400d926b3ceb0c84640a8f4e0f36e51463
Component: engine
2017-03-23 19:14:13 -07:00
e59b5a1439 Add support for COPY from previous rootfs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: f95f58283b2a69f4fd06d01de2281641e09b06bb
Component: engine
2017-03-23 15:12:15 -07:00
0e21058181 Merge pull request #31631 from aaronlehmann/swarm-failure-on-startup
cluster: Proceed with startup if cluster component can't be created
Upstream-commit: 9b33edfa7e1f8fcd32b1c19120bc591ae22a5a8f
Component: engine
2017-03-22 16:40:49 -07:00
30a11974ed Merge pull request #31930 from anusha-ragunathan/authz-disable
When authz plugin is disabled, remove from authz middleware chain.
Upstream-commit: bbce24997c7a31454edd1d3d979823582bcdd95d
Component: engine
2017-03-22 14:17:38 -07:00
2034662b7a When authz plugin is disabled, remove from authz middleware chain.
When the daemon is configured to run with an authorization-plugin and if
the plugin is disabled, the daemon continues to send API requests to the
plugin and expect it to respond. But the plugin has been disabled. As a
result, all API requests are blocked. Fix this behavior by removing the
disabled plugin from the authz middleware chain.

Tested using riyaz/authz-no-volume-plugin and observed that after
disabling the plugin, API request/response is functional.

Fixes #31836

Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
Upstream-commit: 38de272bd4dfea945985b7031cd353ac5f6507c5
Component: engine
2017-03-22 12:07:39 -07:00
dfbe94cc62 Merge pull request #31996 from aboch/drst
Fix stop/start/restart of detached container
Upstream-commit: d8406fd7a029f38ece55421294568045d1c9de92
Component: engine
2017-03-22 10:24:45 -04:00
09b605e914 Fix start/restart of detached container
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 4ca7d4f0c1490845cbf04220a408f67c006af248
Component: engine
2017-03-22 02:38:26 -07:00
65906b40c8 Fix nw sandbox leak when stopping detached container
Signed-off-by: Ryan Liu <ryanlyy@me.com>
Upstream-commit: 786f30107b0c63e8a42ca4b0d8d40621f45861c6
Component: engine
2017-03-21 23:51:52 -07:00
4b6db08e9a Merge pull request #31928 from Microsoft/jjh/cleanupremoving
Windows: graph cleanup '-removing'
Upstream-commit: 58ccdfe00c4e47f1f1d3aabff40189c3aea64b65
Component: engine
2017-03-21 09:43:38 +01:00
b8b27f2f65 Merge pull request #29779 from thaJeztah/do-not-return-incorrect-error
NetworksPrune: do not return warnings as error
Upstream-commit: 9a5bf4b5ad10c7f0363a20d9781d4050d9de142e
Component: engine
2017-03-21 16:28:54 +09:00
c8585d779a Windows: graph cleanup '-removing'
Signed-off-by: John Howard (VM) <jhoward@ntdev.microsoft.com>
Upstream-commit: 9910b9a7f02f6991d55abcc4ea57ec78d3b3675f
Component: engine
2017-03-20 09:15:27 -07:00
996aa3fb64 Merge pull request #31820 from ehazlett/secrets-restrict
Restrict secret view to node level in controller
Upstream-commit: 0fe41cc4db65372f66d79721344522159c173ae5
Component: engine
2017-03-17 14:25:32 +01:00
96285f84ba Merge pull request #31864 from Microsoft/jjh/failfsopshyperv
Windows: Fail fs ops on running Hyper-V containers gracefully
Upstream-commit: b6abfbafcd9e099b1d435f101c5665b5d918ed32
Component: engine
2017-03-16 16:00:34 +01:00
fc7d1ce752 Ignore layer does not exist error from docker images
Fix #31350

As we can see in `daemon.Images()`, there is a gap between
`allImages = daemon.imageStore.Map()` and `l, err :=
daemon.layerStore.Get(layerID)`, so images which still exist when we hit
`allImages = daemon.imageStore.Map()` may have already been deleted when we hit
`l, err := daemon.layerStore.Get(layerID)`.

```
	if danglingOnly {
        	allImages = daemon.imageStore.Heads()
	} else {
        	allImages = daemon.imageStore.Map()
	}

	...

	for id, img := range allImages {
		...

		layerID := img.RootFS.ChainID()
        	var size int64
	        if layerID != "" {
        	        l, err := daemon.layerStore.Get(layerID)
                	if err != nil {
                        	return nil, err
                	}
```

Signed-off-by: Yuanhong Peng <pengyuanhong@huawei.com>
Upstream-commit: 2b9694c29e3bbbce23f0c4009f908a23c115c598
Component: engine
2017-03-16 09:21:51 +08:00
ea6f7f96d3 Merge pull request #31538 from yongtang/31325-service-ls-filter-mode
Support `--filter mode=global|replicated` for `docker service ls`
Upstream-commit: b36ce6f2f6cfdee4d376b58137dde2bc20fc4312
Component: engine
2017-03-16 01:42:55 +01:00
0e370a3402 Windows: Fail fs ops on running Hyper-V containers gracefully
Signed-off-by: John Howard (VM) <jhoward@ntdev.microsoft.com>
Upstream-commit: 481d2633fee30bdc4d00b9d61b031064f5af5739
Component: engine
2017-03-15 13:31:41 -07:00
f6bac49560 Support --filter mode=global|replicated for docker service ls
This fix tries to address the request in 31325 by adding
`--filter mode=global|replicated` to `docker service ls`.

As `docker service ls` has a `MODE` column by default, it is natural
to support `--filter mode=global|replicated` for `docker service ls`.

There are multiple ways to address the issue. One way is to pass
the filter of mode to SwarmKit, another way is to process the filter
of mode in the daemon.

This fix process the filter in the daemon.

Related docs has been updated.

An integration test has been added.

This fix fixes 31325.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 43a1bd564b5dbd835631cda102f68286c0d533e9
Component: engine
2017-03-15 11:06:57 -07:00
2ab1de2543 Resolve connection reset by peer regression
Signed-off-by: Jim Minter <jminter@redhat.com>
Upstream-commit: dc0ee98805c1e9282c729a79cdf10e59bad3cb09
Component: engine
2017-03-15 09:36:44 +00:00
7f033bf36d Merge pull request #31586 from aaronlehmann/digest-pin-context
cluster: Renew the context after communicating with the registry
Upstream-commit: 08bbd434f55e7468cb4363c60c5533b37875cf03
Component: engine
2017-03-14 09:46:15 -07:00
402994850c restrict secret view to node level in controller
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 8392123f303e55902ac42544f0e7e226855592f6
Component: engine
2017-03-14 09:53:02 -04:00
5fe9aafe47 Merge pull request #31500 from dperny/fix-service-logs-cli
Add tail and since to service logs
Upstream-commit: 1d4608032d95b846418cdf6a718061d20fed7f48
Component: engine
2017-03-14 14:19:29 +01:00
3f4d5e9ab5 Merge pull request #31713 from nishanttotla/better-warnings
Improve warnings when image digest pinning fails
Upstream-commit: 764e80e84c8cd72cf7843deda18c07760b5533a9
Component: engine
2017-03-13 17:57:06 -07:00
7e6d323f9b Improve warnings when image digest pinning fails
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
Upstream-commit: 44855dff42a4adbf73a4d286e27963da2112f563
Component: engine
2017-03-13 15:16:35 -07:00
1b786f2dda Merge pull request #31674 from dperny/service-logs-err-on-tty
Error on attempting services logs on TTY container
Upstream-commit: 47615d9871510cdad0f894f8bc9e82c1a9873fa5
Component: engine
2017-03-13 10:17:33 -07:00
067b63e8af Merge pull request #31579 from ijc25/cpuacct
Correct CPU usage calculation in presence of offline CPUs and newer Linux
Upstream-commit: 2c6a1e1878975550cd2e7a98494773903e39eaf7
Component: engine
2017-03-13 16:32:18 +00:00
c2b7c22146 daemon: also ensureDefaultApparmorProfile in exec path
When 567ef8e7858c ("daemon: switch to 'ensure' workflow for AppArmor
profiles") was merged, it didn't correctly handle the exec path if
AppArmor profiles were deleted. Fix this by duplicating the
ensureDefaultApparmorProfile code in the exec code.

Fixes: 567ef8e7858c ("daemon: switch to 'ensure' workflow for AppArmor profiles")
Signed-off-by: Aleksa Sarai <asarai@suse.de>
Upstream-commit: 790a81ea9acce318d0e037771c253951b874140b
Component: engine
2017-03-13 15:20:05 +11:00
e5626386d5 Add tail and since to service logs
This change adds the ability to do --tail and --since on docker service
logs. It wires up the API endpoints to each other and fixes some older
bugs. It adds integration tests for these new features.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 8dc437bd9b474c24a2cf802c2779dace2f91194a
Component: engine
2017-03-10 14:59:00 -08:00
218618324e Error on attempting service logs on TTY container
Right now getting logs from a service with an attached TTY does not
work. The behavior was undefined and caused the command to hang and
strange messages to occur in the daemon logs.

This returns errors, both deep in the swarmkit adapter (to guard against
undefined behavior, which is Bad) and in the daemon (to tell users that
the thing they're asking for is not possible).

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 37ae1ef0ffcf8605daeaf41440da774370377a6d
Component: engine
2017-03-10 14:48:56 -08:00
da62433767 Merge pull request #31665 from mlaventure/aufs-lsof-oob
Remove aufs debugEBusy()
Upstream-commit: 2c2983cd8e58630889712c40a614714ce0c68efc
Component: engine
2017-03-10 11:51:14 -05:00
6f5f3ec34f Correct CPU usage calculation in presence of offline CPUs and newer Linux
In https://github.com/torvalds/linux/commit/5ca3726 (released in v4.7-rc1) the
content of the `cpuacct.usage_percpu` file in sysfs was changed to include both
online and offline cpus. This broke the arithmetic in the stats helpers used by
`docker stats`, since it was using the length of the PerCPUUsage array as a
proxy for the number of online CPUs.

Add current number of online CPUs to types.StatsJSON and use it in the
calculation.

Keep a fallback to `len(v.CPUStats.CPUUsage.PercpuUsage)` so this code
continues to work when talking to an older daemon. An old client talking to a
new daemon will ignore the new field and behave as before.

Fixes #28941.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
Upstream-commit: 115f91d7575d6de6c7781a96a082f144fd17e400
Component: engine
2017-03-10 10:24:33 +00:00
9365b0d405 Merge pull request #30870 from ripcurld0/fix_msg_rm
Fix the rm error message when a container is restarting/paused
Upstream-commit: 6c31abde2057854bc83c03de971c38ca18264ab4
Component: engine
2017-03-10 10:04:49 +01:00
e92d0c63e0 cluster: Fix shadowed resp variable
The response would never reach the client because it was being
redeclared in the current scope.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 9d127f8de3fa489b2c0d896dd9612f43e45f7cdd
Component: engine
2017-03-09 17:58:12 -08:00
9298102f46 Fix the rm error message when a container is restarting/paused
Running the rm command on a paused/restarting container
will give an error message saying the container is running
which is incorrect.

To fix that, the error message will have the correct
container state and a procedure to remove it accordingly.

Notice: docker-py was bumped to:
        4a08d04aef0595322e1b5ac7c52f28a931da85a5

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 0ec8f56a3d7f1413cdb3ae7711d518e99f9282e9
Component: engine
2017-03-10 00:39:16 +02:00
188830de7a Remove aufs debugEBusy()
Since it was introduced no reports were made and lsof seems to cause
issues on some systems.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: eac66b67be0710322d0e21a67a55f5731be48f68
Component: engine
2017-03-09 14:35:13 -08:00
8c76bad868 Merge pull request #30856 from allencloud/make-secret-update-support-name-and-id-prefix
make secret update support name and id prefix
Upstream-commit: d4a8c3b438cb8ae95916fee3e7fac93639b720f6
Component: engine
2017-03-08 12:31:44 +01:00
642bdd2e30 cluster: Proceed with startup if cluster component can't be created
The current behavior is for dockerd to fail to start if the swarm
component can't be started for some reason. This can be difficult to
debug remotely because the daemon won't be running at all, so it's not
possible to hit endpoints like /info to see what's going on. It's also
very difficult to recover from the situation, since commands like
"docker swarm leave" are unavailable.

Change the behavior to allow startup to proceed.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: f7d846094a5dc642198cc4939df646a3e889a750
Component: engine
2017-03-07 16:50:39 -08:00
f7cd555009 Fix dropped field in task translation from GRPC to REST
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 497c4f05b931a7f64785543922b19e94362607e6
Component: engine
2017-03-07 14:55:15 -08:00
569aaf9edd Merge pull request #31265 from cyli/remove_swarm_subdirs
Rather than remove the swarm directory and re-create, remove the subdirs
Upstream-commit: fd5f9d7941287cbbaeecfd16e0159508b3f6af63
Component: engine
2017-03-07 14:30:34 -05:00
4340eba05a make secret update support name and id prefix
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 9d30525a04e2d4efe51ac9e6c114ce36276aafa8
Component: engine
2017-03-07 16:01:21 +08:00
ec64fef8e0 cluster: Renew the context after communicating with the registry
When pinning by digest, the registry might be slow or unresponsive. This
could cause the context to already be expired by the time UpdateService
or CreateService is called. We want digest pinning to be a best-effort
operation, so it's problematic if a slow or misbehaving registry
prevents the service operation from completing. Replace the context
after communicating with the registry, so we have a fresh timeout for
the gRPC call.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: f8273a216ed35e22ac157dee8055393f07d4be39
Component: engine
2017-03-06 16:05:56 -08:00
e7e6e755c3 Merge pull request #31450 from thaJeztah/fix-volume-force-remove
do not ignore "volume in use" errors when force-delete
Upstream-commit: 95cb74818a92de99b42c0c10f9ae4710c27357f4
Component: engine
2017-03-06 14:35:46 +01:00
d82df5d4ba Implement server-side rollback, for daemon versions that support this
Server-side rollback can take advantage of the rollback-specific update
parameters, instead of being treated as a normal update that happens to
go back to a previous version of the spec.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: f9bd8ec8b268581f93095c5a80679f0a8ff498bf
Component: engine
2017-03-03 16:33:34 -08:00
ac66308e6c Add support for rollback flags
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 3a88a24d23e6eb1ca521cd9ab6e306d4ba1c1464
Component: engine
2017-03-03 16:33:34 -08:00
0c390668f1 Add support for the "rollback" failure action
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: cc9d04647a68cf49e66bf26f10908387b99dae1a
Component: engine
2017-03-03 16:33:34 -08:00
47709fd338 Merge pull request #31083 from xulike666/fight-for-readability
fix some typos from module contrib to man
Upstream-commit: 57fd478169071b09f0e6657cc1c2568d80c1bed3
Component: engine
2017-03-03 15:13:01 +01:00
d4d27bb5d4 Merge pull request #30725 from aaronlehmann/topology
Topology-aware scheduling
Upstream-commit: 3a5a1c3f3d1638c35891ee630ba20eda0bef560f
Component: engine
2017-03-03 15:01:12 +01:00
c09eedcd69 Merge pull request #30265 from allencloud/add-CheckDuplicate-details-and-logic
add CheckDuplicate docs and logics in network
Upstream-commit: e1da516598e6f4e8f58964fce62ff13be1d8cc09
Component: engine
2017-03-03 14:18:52 +01:00
f3bfd3cf98 Merge pull request #28279 from chchliang/updown
--max-concurrent-downloads,--max-concurrent-uploads must great than or equal to 0 
Upstream-commit: dc1b0e1b2c8483e0f2eaa28316be01aae6d6ae4a
Component: engine
2017-03-03 10:06:59 +01:00
fa769257a1 Merge pull request #31491 from rawkode/feature/healthchecks-missing-environment
Healthchecks should inherit environment
Upstream-commit: f4e82d71a8ec6aa2b03c213be7fb2a2ebd591ca7
Component: engine
2017-03-03 08:36:37 +01:00
302e2c7325 Merge pull request #31409 from yuexiao-wang/fix-version
'docker daemon' deprecation message doesn't use the new version
Upstream-commit: 55b955d9ffc14571fa6b5a1a6369a8be8d053853
Component: engine
2017-03-02 22:02:09 -05:00