Commit graph

3258 commits

Author SHA1 Message Date
Tonis Tiigi
e91de9fb9d Revert "Move layer mount refcounts to mountedLayer"
This reverts commit 563d0711f8.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-23 00:33:02 -07:00
Lei Jitang
f668e36652 Merge pull request #21407 from LK4D4/log_stats_errors
daemon: log errors from stats calls
2016-03-23 14:12:12 +08:00
Tõnis Tiigi
92a3ece35a Merge pull request #21107 from cpuguy83/one_ctr_to_rule_them_all
Move layer mount refcounts to mountedLayer
2016-03-22 21:19:00 -07:00
Tibor Vass
694b32df51 Merge pull request #21370 from tonistiigi/expose-layer-ids
Expose RootFS in image inspect
2016-03-22 20:33:18 -04:00
Tibor Vass
3ce494f48c Merge pull request #21367 from mlaventure/containerd-docs-cleanup
Remove unneeded references to execDriver
2016-03-22 19:40:27 -04:00
Alexander Morozov
14e1325656 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>
2016-03-22 14:03:47 -07:00
Tonis Tiigi
14dc4a7158 Expose RootFS in image inspect
Fixes #20451

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-22 13:49:30 -07:00
Tibor Vass
53d2e5e9d7 Merge pull request #21270 from ehazlett/resource-labels
Add Label support for Images (build), Networks and Volumes on Creation
2016-03-22 15:12:33 -04:00
David Calavera
62d4556654 Merge pull request #21383 from estesp/shared-userns-net-ipc
Allow net and IPC namespaces to be shared when userns=on
2016-03-22 11:40:12 -07:00
Tibor Vass
de9ff4bdc0 Merge pull request #21223 from cpuguy83/add_nocp_to_vols
Add explicit flags for volume cp/no-cp
2016-03-22 13:45:12 -04:00
Evan Hazlett
fc214b4408 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>
2016-03-22 11:49:06 -04:00
Brian Goff
563d0711f8 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>
2016-03-22 11:36:28 -04:00
Arnaud Porterie
9f327b4c28 Merge pull request #21373 from aaronlehmann/client-user-agent-registry-operations
Pass upstream client's user agent through to registry on operations beyond pulls
2016-03-21 21:49:48 -07:00
David Calavera
adc6ed5a10 Merge pull request #21354 from Microsoft/jjh/getpids
Windows: Minimal docker top implementation
2016-03-21 19:59:27 -07:00
Phil Estes
2b278f4846 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)
2016-03-21 22:20:26 -04:00
Brian Goff
b0ac69b67e 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>
2016-03-21 20:38:44 -04:00
Aaron Lehmann
c44e7a3e63 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>
2016-03-21 14:31:47 -07:00
Arnaud Porterie
278d3962a8 Merge pull request #21306 from mgoelzer/issue20001-nodeps
Pass upstream client's user agent through to registry on image pulls
2016-03-21 14:26:59 -07:00
Alexander Morozov
11b4c89087 Merge pull request #21301 from cpuguy83/cleaner_file_log
Fixes some issues with jsonfile write/read
2016-03-21 14:03:36 -07:00
Kenfe-Mickael Laventure
8af4f89cba Remove unneeded references to execDriver
This includes:
 - updating the docs
 - removing dangling variables

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-03-21 13:06:08 -07:00
Vincent Demeester
d82ad12df8 Merge pull request #19439 from pcarrier/pcarrier/19438-async-connections-to-fluentd
fluentd logger: support all options besides Unix sockets
2016-03-21 18:09:14 +01:00
Arnaud Porterie
2a4c970aeb Merge pull request #21342 from tonistiigi/cleanup-libcontainer
Convert libnetwork stats directly to api types
2016-03-21 08:54:03 -07:00
David Calavera
be8459c248 Merge pull request #21313 from Microsoft/sjw/logs_fix
Fixing logs file handle leak.
2016-03-21 08:41:31 -07:00
David Calavera
336d585292 Merge pull request #21336 from Microsoft/jjh/fixunmount
Windows: Fix unmount for Hyper-V Containers
2016-03-21 08:40:52 -07:00
Brian Goff
1ae9dcf97d 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>
2016-03-21 11:05:58 -04:00
Sebastiaan van Stijn
722f06dae3 Merge pull request #21353 from Microsoft/jjh/tidylibcontainerdmore
Windows: Tidy after libcontainerd
2016-03-21 11:06:54 +01:00
Pierre Carrier
13086f387b fluentd logger: support all options besides Unix sockets
Mostly useful for docker/docker#19438.

Signed-off-by: Pierre Carrier <pierre@meteor.com>
2016-03-21 10:03:21 +00:00
Sebastiaan van Stijn
02a90d0399 Merge pull request #21345 from duglin/BetterError
Add the name of the exe that's trying to be executed
2016-03-21 10:17:10 +01:00
Doug Davis
7942160638 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>
2016-03-20 18:15:46 -07:00
John Howard
52237787fa Windows: Minimal docker top implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-03-20 16:45:53 -07:00
John Howard
3ca6ad5b9e Windows: Tidy after libcontainerd
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-03-20 15:59:52 -07:00
Pierre Carrier
d89dae6e4b Revert "Added flag to ignore fluentd connect error on container start"
This reverts commit 3cf82ff1ab.

Signed-off-by: Pierre Carrier <pierre@meteor.com>
2016-03-20 16:22:19 +00:00
Mike Goelzer
d1502afb63 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>
2016-03-20 04:30:09 -07:00
Tonis Tiigi
99b16b3523 Reuse profiles/seccomp package
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-19 14:15:39 -07:00
Tonis Tiigi
d36376f86c Convert libnetwork stats directly to api types
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-19 12:56:45 -07:00
John Howard
4461bc45b6 Windows: Fix unmount for Hyper-V Containers
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-03-18 20:43:46 -07:00
Jess Frazelle
b77573f48e Merge pull request #21274 from jfrazelle/fix-variables-that-werent-being-used
fix variables that werent being called
2016-03-18 18:03:15 -07:00
Jess Frazelle
e5a3f86e44 Merge pull request #20662 from tonistiigi/containerd-integration
Containerd integration
2016-03-18 17:21:18 -07:00
Jess Frazelle
06e98f0a5c Merge pull request #21232 from calavera/consolidate_security_opts_format
Consolidate security options to use `=` as separator.
2016-03-18 16:02:38 -07:00
John Howard
94d70d8355 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>
2016-03-18 13:38:41 -07:00
Tonis Tiigi
6eebe85290 Remove execdriver package
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-03-18 13:38:37 -07:00
Tonis Tiigi
9c4570a958 Replace execdrivers with containerd implementation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-03-18 13:38:32 -07:00
Vincent Demeester
6c6363c726 Merge pull request #21269 from mlaventure/inspect-bind-mounts
Update inspect/ps to properly handle bind mounts
2016-03-18 20:52:02 +01:00
Stefan J. Wernli
4570cfd3ba Fixing logs file handle leak.
Docker logs was only closing the logger when the HTTP response writer received a close notification, however in non-follow mode the writer never receives a close. This means that the daemon would leak the file handle to the log, preventing the container from being removed on Windows (file in use error). This change explicitly closes the log when the end of stream is hit.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
2016-03-18 11:00:15 -07:00
Vincent Demeester
ea0025a7e1 Merge pull request #21299 from allencloud/handle-kernel-version-error-in-version-api
handle kernel version error in version api
2016-03-18 18:07:48 +01:00
David Calavera
ae75435dae Merge pull request #20200 from thockin/14282-hostname-domainname-v2
Don't smoosh hostname and domainname in API
2016-03-18 09:08:22 -07:00
David Calavera
8ef56e1f98 Merge pull request #21311 from nalind/journal-race
Fix a couple of races in the journald log reader
2016-03-18 08:53:21 -07:00
Vincent Demeester
9f00b4b79c Merge pull request #21302 from allencloud/fix-typos-in-several-files
fix typos in several files
2016-03-18 14:06:59 +01:00
allencloud
f1d34ac2eb fix typos in several files
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-03-18 12:51:57 +08:00
Kenfe-Mickael Laventure
8451a08ed5 Update filter volume to allow filtering by bind mount source
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-03-17 15:42:45 -07:00