Commit Graph

3098 Commits

Author SHA1 Message Date
6d0a18169c Add "--ipv6" flag in IT for network create when using ipv6 subnets
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: ec77c124de3f57a18d3459ed75c8a286ce14fe32
Component: engine
2016-03-24 16:19:59 -07:00
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
547c60d84c More descriptive error when running a container with a too long hostname (#21445)
This fix tries to fix issues encountered when running a container with a hostname
that is longer than HOST_NAME_MAX(64).

Previously, `could not synchronise with container process` was generated as the
length of the regex check was missing.

This fix covers the length check so that a hostname that is longer than
HOST_NAME_MAX(64) will be given a correct error message.

Several unit tests cases and additional integration test cases are added as well.

This fix closes #21445.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: fa44b4e81ee87f1c2b39ad335a22795415c8cdf2
Component: engine
2016-03-24 17:42:28 +00:00
51e700f816 Merge pull request #21460 from tonistiigi/exec-ulimits
Add ulimit support to libcontainerd addprocess
Upstream-commit: 57575a2695a822eb19bda555b1dbb9451d2c0881
Component: engine
2016-03-24 09:38:21 -04:00
791eed0ff8 Merge pull request #21428 from estesp/reenable-shared-nstests-userns
Re-enable shared namespace tests for userns CI runs
Upstream-commit: 21315589632fadb3a5460ee0a278f2511e6a7d13
Component: engine
2016-03-24 12:31:27 +01:00
e716bd46e9 Add ulimit support to libcontainerd addprocess
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 8891afd8385aeb490f8b7d9db8c3828bc7d24dc1
Component: engine
2016-03-23 19:54:32 -07: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
b6d708cfd3 Merge pull request #21443 from calavera/fix_network_path_issue
Fix network path issue
Upstream-commit: 68674f739f218a45419c33a0c25cb6cbfbd0f4af
Component: engine
2016-03-23 22:27:44 -04: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
676dd1beed Fix Docker core dumps when removing network with special characters (#21401).
This fix tries to fix Docker core dumps when removing network with special
characters. The issue is from the fact that when docker client tries to
pass the command to API, the networkID is not escaped in case of special
characters. This also means other commands (not just `docker network rm`)
may face the same issue (e.g., `docker network connect`).

This fix adds the URL path escape to properly handle it. In addition, an
integration test for network create and delete is added to cover the cases
in #21401.

This fix fixes #21401.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit f8dc5562d0a74792c46b9382181ddf97e5d7cdac)
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: f1542276081aa91396495059638d3ea30d4e5a10
Component: engine
2016-03-23 15:07:14 -04:00
dabb7c86ca test: Do not check error message from hub, it is not needed
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: bbdd34c370949a2db9f139720b4498bc0952e700
Component: engine
2016-03-23 14:11:44 -04:00
dba13cd8af Re-enable shared namespace tests for userns CI runs
Allow --net=container and --ipc=container tests to run when user
namespaces are enabled.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
Upstream-commit: a1d84411178bdf72be83ad292543a1ea70aa3f69
Component: engine
2016-03-23 09:39:24 -04:00
ce07920e99 Add docker- prefix to runc and containerd binaries
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 009399dc8ed8a4b635b0e229bf07b685e286d8d9
Component: engine
2016-03-23 00:52:16 -04: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
fbd88889d1 Merge pull request #21411 from mlaventure/fix-unauth-to-central
Update TestPushToCentralRegistryUnauthorized to match updated hub
Upstream-commit: 7bc052ae0449139bc0d6f2002c62cd849fb098bf
Component: engine
2016-03-22 20:31:10 -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
7429b9c336 Update TestPushToCentralRegistryUnauthorized to match updated hub
The error message was changed from "unauthorized: access to the
requested resource is not authorized" to "unauthorized: authentication
required".

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 37e2103e640861b02a1ea0253df749a527a87e1b
Component: engine
2016-03-22 16:15:29 -07:00
0ff9a3fc56 Merge pull request #21396 from aboch/vnn
Vendoring libnetwork v0.7.0-dev.10
Upstream-commit: 506fb9810c60177b360b9dabab516828b90ffc48
Component: engine
2016-03-22 15:09:42 -07:00
2e2ed4c31e Merge pull request #21303 from riyazdf/notary-vendor-docker1.11
vendor notary for docker1.11
Upstream-commit: 8b8fcb796f85bc8f5146fa61ce667699f0436591
Component: engine
2016-03-22 17:57:17 -04:00
66355ab0dd Merge pull request #21385 from tonistiigi/load-parent-chain
Add parent references support to load/save
Upstream-commit: acaec7f67cc67049182d162d2ac8ed7b5db90559
Component: engine
2016-03-22 14:07:06 -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
26e4c9db49 Vendoring libnetwork v0.7.0-dev.10
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: fbdb3c3a4b15720c0df3a59d4bef0773b365c2b1
Component: engine
2016-03-22 12:36:21 -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
20a8382c82 vendor notary for docker1.11
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: ab3772f72fcb189c742510326069474ea625042f
Component: engine
2016-03-22 11:28:19 -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
288aa38b5e Merge pull request #21046 from cyli/use-notary-cli
Sign all first-level delegation roles when doing a trusted push
Upstream-commit: 666563b190b7c97dc9db334ef03768ee8432b20e
Component: engine
2016-03-22 07:42:21 +01:00
d833f49cea Add parent references support to load/save
Restores the correct parent chain relationship
between images on docker load if multiple images
have been saved.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: faeff5118f710f7c4f6173c309b52aaba24118c9
Component: engine
2016-03-21 19:31:10 -07: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
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
8fe817f6cc Merge pull request #21106 from yongtang/20122-volume-one-character
Fix one-character directory issue in the volume option (#20122).
Upstream-commit: 3ac32cd72e2cbb4201666a260ef8b2b740c6bc78
Component: engine
2016-03-21 16:41:03 -04: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
ffcbf49a63 Pull, Pull-A, and Build will only pull tags from the targets role or the targets/releases role.
It will ignore tags in all other delegation roles.

Signed-off-by: cyli <cyli@twistedmatrix.com>
Upstream-commit: 623ccc2f319ec28929c75a09bba76916c84f0d2b
Component: engine
2016-03-21 10:56:49 -07:00
39ea52c5c0 Add test for targets/releases preference when pulling
Signed-off-by: Riyaz Faizullabhoy <riyaz.faizullabhoy@docker.com>
Upstream-commit: ca57f4e6a8ac7861009d03957e1b508036eac98f
Component: engine
2016-03-21 10:56:42 -07:00
18495acb39 Trusted push now adds the tag to every first level delegation role for which we have keys
and for which the tag conforms to path restrictions.

Signed-off-by: cyli <cyli@twistedmatrix.com>
Upstream-commit: 497a58e6e48277bbee214d701e3d671eb8975797
Component: engine
2016-03-21 10:56:09 -07:00
78405a5d4a Merge pull request #21283 from runcom/update-test
vendor docker/distribution d06d6d3b093302c02a93153ac7b06ebc0ffd1793
Upstream-commit: a05fdd680662d36c6d79add46b07ad5dcee7f6d7
Component: engine
2016-03-21 09:46:28 -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
cd3a202f52 Fix one-character directory issue in the volume option (#20122).
The issue comes from the implementation of volumeSplitN() where a
driver letter (`[a-zA-Z]:`) was assumed to follow either `:`, `/`,
or `\\`.

In Windows driver letter appears in two situations:
a. `^[a-zA-Z]:` (A colon followed  by `^[a-zA-Z]:` is OK as colon is
the separator in volume option)
b. A string in the format like `\\?\C:\Windows\...` (UNC).
Therefore, a driver letter can only follow either a `:` or `\\`

This PR removes the condition of `/` before the driver letter so
that options like `-v /tmp/q:/foo` could be handled correctly. A
couple of tests has also been added.

This PR fixes #20122.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 800a7d513d3b80478a7996cb2c357b72f65e0b09
Component: engine
2016-03-21 02:55:06 +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
6ab75fcf92 distribution: errors: do not retry if no token in response
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 264b5b60832bf1f1342618d059c0ece3358de7e1
Component: engine
2016-03-19 12:20:14 +01:00
2aaa69712c vendor docker/distribution d06d6d3b093302c02a93153ac7b06ebc0ffd1793
- fix and add integration tests

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: c48439af7f33fccc17013ae7f9e64d4c107502f1
Component: engine
2016-03-19 12:19:48 +01: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
8ba16d91c8 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>
Upstream-commit: 9c4570a958df42d1ad19364b1a8da55b891d850a
Component: engine
2016-03-18 13:38:32 -07:00
306477a8ef Merge pull request #21269 from mlaventure/inspect-bind-mounts
Update inspect/ps to properly handle bind mounts
Upstream-commit: 6c6363c726ccfec97d577eff1cc60314f15dc841
Component: engine
2016-03-18 20:52:02 +01:00
d5c972ccf5 Merge pull request #21183 from thaJeztah/fix-flaky-TestUpdateRestartPolicy
Fix flaky TestUpdateRestartPolicy on Windows
Upstream-commit: a30332e705b3c75647859383e86d65a48fa5c412
Component: engine
2016-03-18 17:45:05 +01:00
4bffdb208b Fix flaky test of TestRestartStoppedContainer (#21211).
This fix addressed the issue of test TestRestartStoppedContainer
in #21211. Inside the test, a `docker restart` command is
followed by a `docker logs` command. However, `docker restart`
returns immediately so there is no guarantee that `docker logs`
will wait until the restarted container completes the command
`echo foobar`.

This fix use the check of `{{.State.Running}} = false` to make
sure that the restarted container has already finished, before
invoking the `docker logs` command. The timeout is set to 20s
to make sure it passes WindowsTP4 check.

This fixes #21211.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 48ccdd46aea4bb16925d0a333f792a712f1c11dc
Component: engine
2016-03-18 05:50:23 +00:00