Commit Graph

3269 Commits

Author SHA1 Message Date
ee44cd51fb Merge pull request #21315 from hqhq/hq_check_quota
Add validation for cpu period and quota
Upstream-commit: f2847f8ab3467b43eccf0a9580d4ea3e8abdf146
Component: engine
2016-03-24 14:10:48 -07:00
1a8e9b8519 Merge pull request #21464 from coolljt0725/cleanup_dot
Cleanup: remove redundant period
Upstream-commit: 2b6b2e1af853d465d22f5a57e71aea89852340eb
Component: engine
2016-03-24 18:34:20 +01:00
0986455243 fix typos in daemon_unix.go
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 25c9bd81f6d293996856daeb19108ebb2522416b
Component: engine
2016-03-24 23:57:11 +08:00
95256bc90a Cleanup: remove redundant period
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: cb5b8767b6988855daa1a264202be929c24c6177
Component: engine
2016-03-24 08:26:04 -04:00
d35ea7bea5 Merge pull request #21454 from anusha-ragunathan/fix_overlay
Move layer mount refcounts to mountedLayer
Upstream-commit: 55bbea375100716ebc0ef16edab567b0627cff0d
Component: engine
2016-03-23 22:39:38 -04:00
6cee95ae99 Merge pull request #21268 from calavera/remove_dockerfile_from_api
Remove dockerfile dependency from the API.
Upstream-commit: 5ef04b1c6d1ca94c83c7ce52faae908a278ce6ea
Component: engine
2016-03-23 19:34:21 -07:00
778611a207 Move layer mount refcounts to mountedLayer
Instead of implementing refcounts at each graphdriver, implement this in
the layer package which is what the engine actually interacts with now.
This means interacting directly with the graphdriver is no longer
explicitly safe with regard to Get/Put calls being refcounted.

In addition, with the containerd, layers may still be mounted after
a daemon restart since we will no longer explicitly kill containers when
we shutdown or startup engine.
Because of this ref counts would need to be repopulated.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 65d79e3e5e537039b244afd7eda29e721a93d84f
Component: engine
2016-03-23 14:42:52 -07:00
8ddceeb099 Fix use of mounted() in overlay.
Handle error and mounted case separately.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 57ca2a210108d31f8cbe9660bcd6cd469a937ff7
Component: engine
2016-03-23 14:42:52 -07:00
fba90c19ef Revert "Move layer mount refcounts to mountedLayer"
This reverts commit 563d0711f83952e561a0d7d5c48fef9810b4f010.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: e91de9fb9d175541acc95834de486d33feef552a
Component: engine
2016-03-23 00:33:02 -07:00
1981bd700f Merge pull request #21407 from LK4D4/log_stats_errors
daemon: log errors from stats calls
Upstream-commit: f668e36652e26f92c0f1a7fa3f648e5ed444b68e
Component: engine
2016-03-23 14:12:12 +08:00
730efa6a55 Merge pull request #21107 from cpuguy83/one_ctr_to_rule_them_all
Move layer mount refcounts to mountedLayer
Upstream-commit: 92a3ece35a10092af0944f175a15b2390f6c666e
Component: engine
2016-03-22 21:19:00 -07:00
7c90f8b43b Merge pull request #21370 from tonistiigi/expose-layer-ids
Expose RootFS in image inspect
Upstream-commit: 694b32df51ac82afdf4695569e87dad7eaf71de4
Component: engine
2016-03-22 20:33:18 -04:00
48cef14de6 Merge pull request #21367 from mlaventure/containerd-docs-cleanup
Remove unneeded references to execDriver
Upstream-commit: 3ce494f48cc37b1e4065b62e58ec1c0a5df0e00c
Component: engine
2016-03-22 19:40:27 -04:00
23e67168ca daemon: log errors from stats calls
I encountered silent errors ignoring when runc failed to parse pids.max

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 14e1325656257c9d96cd01c03e624c99cfc35d31
Component: engine
2016-03-22 14:03:47 -07:00
296caafbd2 Expose RootFS in image inspect
Fixes #20451

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 14dc4a7158a141b5c13aa63231e467f0c3235850
Component: engine
2016-03-22 13:49:30 -07:00
02220a45c4 Merge pull request #21270 from ehazlett/resource-labels
Add Label support for Images (build), Networks and Volumes on Creation
Upstream-commit: 53d2e5e9d754ce8fbef733759e9ec450514133e3
Component: engine
2016-03-22 15:12:33 -04:00
f18bd98fd4 Merge pull request #21383 from estesp/shared-userns-net-ipc
Allow net and IPC namespaces to be shared when userns=on
Upstream-commit: 62d45566544344b6f562bff7792976702ed8938b
Component: engine
2016-03-22 11:40:12 -07:00
85da9b3aae Merge pull request #21223 from cpuguy83/add_nocp_to_vols
Add explicit flags for volume cp/no-cp
Upstream-commit: de9ff4bdc0e17a0fd455790972d83133f424ef9d
Component: engine
2016-03-22 13:45:12 -04:00
fe56b4ef22 add label support for build, networks and volumes
build: implement --label

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

network: allow adding labels on create

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

volume: allow adding labels on create

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

add tests for build, network, volume

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

vendor: libnetwork and engine-api bump

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: fc214b4408d915e3510f61c7584ca01c176d1373
Component: engine
2016-03-22 11:49:06 -04:00
44acd43622 Move layer mount refcounts to mountedLayer
Instead of implementing refcounts at each graphdriver, implement this in
the layer package which is what the engine actually interacts with now.
This means interacting directly with the graphdriver is no longer
explicitly safe with regard to Get/Put calls being refcounted.

In addition, with the containerd, layers may still be mounted after
a daemon restart since we will no longer explicitly kill containers when
we shutdown or startup engine.
Because of this ref counts would need to be repopulated.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 563d0711f83952e561a0d7d5c48fef9810b4f010
Component: engine
2016-03-22 11:36:28 -04:00
ea0ebdf222 Merge pull request #21373 from aaronlehmann/client-user-agent-registry-operations
Pass upstream client's user agent through to registry on operations beyond pulls
Upstream-commit: 9f327b4c2805d3280e4e0ae6fe2d6522e8e753a7
Component: engine
2016-03-21 21:49:48 -07:00
f73bda8d49 Merge pull request #21354 from Microsoft/jjh/getpids
Windows: Minimal docker top implementation
Upstream-commit: adc6ed5a1051695cb488c57eea918d3c73566a04
Component: engine
2016-03-21 19:59:27 -07:00
19b58f8f21 Allow net and IPC namespaces to be shared when userns=on
Now that the namespace sharing code via runc is vendored with the
containerd changes, we can disable the restrictions on container to
container net and IPC namespace sharing when the daemon has user
namespaces enabled.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: 2b278f48460453691c63ad81b0c87b50d8b18979
Component: engine
2016-03-21 22:20:26 -04:00
ec3df3b28a Remove dot in suffix to avoid double dot error message
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: aae4bcf773a88f854c720387040a0a289a2fca87
Component: engine
2016-03-22 09:17:54 +08:00
42b42ce4ee Add validation for cpu period and quota
Accoding to:
https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt

It has minimal and maximal limit.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: b041fdc0d53c209a5e0614d2b35c6fa2209fe12d
Component: engine
2016-03-22 09:17:54 +08:00
308c81e7d4 Add explicit flags for volume cp/no-cp
This allows a user to specify explicitly to enable
automatic copying of data from the container path to the volume path.
This does not change the default behavior of automatically copying, but
does allow a user to disable it at runtime.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b0ac69b67ef79c6c937f84bee3df20a1924ad334
Component: engine
2016-03-21 20:38:44 -04:00
87c76eb0d7 Pass upstream client's user agent through to registry on operations beyond pulls
This adds support for the passthrough on build, push, login, and search.

Revamp the integration test to cover these cases and make it more
robust.

Use backticks instead of quoted strings for backslash-heavy string
contstands.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: c44e7a3e632c3ea961cb8c12ba45371f54e6699c
Component: engine
2016-03-21 14:31:47 -07:00
6c1d291a31 Merge pull request #21306 from mgoelzer/issue20001-nodeps
Pass upstream client's user agent through to registry on image pulls
Upstream-commit: 278d3962a8cb6a42e9841789bdb8b49a29617e24
Component: engine
2016-03-21 14:26:59 -07:00
a369a60b8b Merge pull request #21301 from cpuguy83/cleaner_file_log
Fixes some issues with jsonfile write/read
Upstream-commit: 11b4c89087cb7d6014e6106521ebb92fa74d01ab
Component: engine
2016-03-21 14:03:36 -07:00
bf213f3332 Remove unneeded references to execDriver
This includes:
 - updating the docs
 - removing dangling variables

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 8af4f89cba09105f3d581926aca6e231326f7054
Component: engine
2016-03-21 13:06:08 -07:00
f1f7a4b7fc Merge pull request #19439 from pcarrier/pcarrier/19438-async-connections-to-fluentd
fluentd logger: support all options besides Unix sockets
Upstream-commit: d82ad12df813824d9166478068536d7d78cf0b69
Component: engine
2016-03-21 18:09:14 +01:00
50eb81fd53 Merge pull request #21342 from tonistiigi/cleanup-libcontainer
Convert libnetwork stats directly to api types 
Upstream-commit: 2a4c970aeb23cace02963eb364474e6197388170
Component: engine
2016-03-21 08:54:03 -07:00
2d1c4a6369 Merge pull request #21313 from Microsoft/sjw/logs_fix
Fixing logs file handle leak.
Upstream-commit: be8459c24891648849cb6123b6f60c885e03a99f
Component: engine
2016-03-21 08:41:31 -07:00
e295486862 Merge pull request #21336 from Microsoft/jjh/fixunmount
Windows: Fix unmount for Hyper-V Containers
Upstream-commit: 336d585292cb2551b423c0dcd0646cf152f9a6a4
Component: engine
2016-03-21 08:40:52 -07:00
d7a627364b Fixes some issues with jsonfile write/read
This cleans up some of the use of the filepoller which makes reading
significantly more robust and gives fewer changes to fallback to the
polling based watcher.
In a lot of cases, if the file was being rotated while we were adding it
to the watcher, it would return an error that the file doesn't exist and
would fallback.
In some cases this fallback could be triggered multiple times even if we
were already on the fallback/poll-based watcher.

It also fixes an open file leak caused by not closing files properly on
rotate, as well as not closing files that were read via the `tail`
function until after the log reader is completed.

Prior to the above changes, it was relatively simple to cause the log
reader to error out by having quick rotations, for example:
```
$ docker run --name test --log-opt max-size=10b --log-opt max-files=10
-d busybox sh -c 'while true; do usleep 500000; echo hello; done'
$ docker logs -f test
```
After these changes I can run this forever without error.

Another fix removes 2 `os.Stat` calls when rotating files. The stat
calls are not needed since we are just calling `os.Rename` anyway, which
will in turn also just produce the same error that `Stat` would.
These `Stat` calls were also quite expensive.
Removing these stat calls also seemed to resolve an issue causing slow
memory growth on the daemon.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 1ae9dcf97dc6ccaf7a7977fe8ae1812b691ccba2
Component: engine
2016-03-21 11:05:58 -04:00
42d4192417 Merge pull request #21353 from Microsoft/jjh/tidylibcontainerdmore
Windows: Tidy after libcontainerd
Upstream-commit: 722f06dae3fe18865978d0f7f531ceea15b4f51a
Component: engine
2016-03-21 11:06:54 +01:00
0f2d2de049 fluentd logger: support all options besides Unix sockets
Mostly useful for docker/docker#19438.

Signed-off-by: Pierre Carrier <pierre@meteor.com>
Upstream-commit: 13086f387b28ceea5aff5924e430f41608884a9b
Component: engine
2016-03-21 10:03:21 +00:00
ab57f522eb Merge pull request #21345 from duglin/BetterError
Add the name of the exe that's trying to be executed
Upstream-commit: 02a90d039946eff71ad116aafc2655050fde0dba
Component: engine
2016-03-21 10:17:10 +01:00
76875b2808 Add the name of the exe that's trying to be executed
so that the user knows what's not in the container but should be.
Its not always easy for the user to know what exact command is being run
when the 'docker run' is embedded deep in something else, like a Makefile.
Saw this while dealing with the containerd migration.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 79421606388169151c31d1c34079a98f53170ab8
Component: engine
2016-03-20 18:15:46 -07:00
d4fa46cb38 Windows: Minimal docker top implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 52237787fa82c12b018d71b1e00f28492be35dad
Component: engine
2016-03-20 16:45:53 -07:00
01537880de Windows: Tidy after libcontainerd
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 3ca6ad5b9e6e37766d26c29f6a99bbd80961473c
Component: engine
2016-03-20 15:59:52 -07:00
35aa0cbae1 Revert "Added flag to ignore fluentd connect error on container start"
This reverts commit 3cf82ff1ab14e1ddd2b629524e894ac359168388.

Signed-off-by: Pierre Carrier <pierre@meteor.com>
Upstream-commit: d89dae6e4becc16e80e3781ac68b9fbb855947b3
Component: engine
2016-03-20 16:22:19 +00:00
6143e6c8cf Pass upstream client's user agent through to registry on image pulls
Changes how the Engine interacts with Registry servers on image pull.
Previously, Engine sent a User-Agent string to the Registry server
that included only the Engine's version information.  This commit
appends to that string the fields from the User-Agent sent by the
client (e.g., Compose) of the Engine.  This allows Registry server
operators to understand what tools are actually generating pulls on
their registries.

Signed-off-by: Mike Goelzer <mgoelzer@docker.com>
Upstream-commit: d1502afb63a10df0bfce20ae2957774cfb3e58d8
Component: engine
2016-03-20 04:30:09 -07:00
179304ecf4 Reuse profiles/seccomp package
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 99b16b3523461551b03362305c36811372344af2
Component: engine
2016-03-19 14:15:39 -07:00
acf746a299 Convert libnetwork stats directly to api types
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: d36376f86c8944f6955f537a1a12f4072f8d7403
Component: engine
2016-03-19 12:56:45 -07:00
fa03957561 Windows: Fix unmount for Hyper-V Containers
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 4461bc45b6fafaabaf3a8158e2f785f836331bb5
Component: engine
2016-03-18 20:43:46 -07:00
20351391ce Merge pull request #21274 from jfrazelle/fix-variables-that-werent-being-used
fix variables that werent being called
Upstream-commit: b77573f48e4022c7b8b829c4a33c6963fe08e18a
Component: engine
2016-03-18 18:03:15 -07:00
ba41c51be4 Merge pull request #20662 from tonistiigi/containerd-integration
Containerd integration
Upstream-commit: e5a3f86e447dd659da3c2e759f3c088a0bfcfe3d
Component: engine
2016-03-18 17:21:18 -07:00
ef4d935247 Merge pull request #21232 from calavera/consolidate_security_opts_format
Consolidate security options to use `=` as separator.
Upstream-commit: 06e98f0a5cf59c040e9f753d60f33ba22256d55c
Component: engine
2016-03-18 16:02:38 -07:00
a76e16e99f Windows libcontainerd implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
Signed-off-by: John Starks <jostarks@microsoft.com>
Signed-off-by: Darren Stahl <darst@microsoft.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 94d70d835500bec3b171425271916d3e40f29635
Component: engine
2016-03-18 13:38:41 -07:00