Commit Graph

3074 Commits

Author SHA1 Message Date
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
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
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
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
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
98172de036 Update TestPsShowMounts to also test bind mounts
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: cdd7fddfec70cca2cc228519794281988ef2a15a
Component: engine
2016-03-17 15:43:32 -07:00
cb854bf11c Consolidate security options to use = as separator.
All other options we have use `=` as separator, labels,
log configurations, graph configurations and so on.
We should be consistent and use `=` for the security
options too.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: cb9aeb0413ca75bb3af7fa723a1f2e6b2bdbcb0e
Component: engine
2016-03-17 13:34:42 -04:00
3c63753492 Merge pull request #21276 from nerdalert/mcvlan-v6-ci
Remove v6 IT test for experimental macvlan driver
Upstream-commit: 9d62c11ab5e7982836eb94d31f2fd7703fb46c13
Component: engine
2016-03-17 09:50:02 -07:00
f2e4125123 Remove v6 IT test for experimental macvlan driver
-Temporary until we find the source of CI/v6 issue with driver

Signed-off-by: Brent Salisbury <brent@docker.com>
Upstream-commit: 6d43dc99e5e67210ca502ec2eca12ae1ee9c2600
Component: engine
2016-03-17 08:57:52 -04:00
04c0a38220 Fix flaky test TestRunAttachFailedNoLeak in #21247.
The issue of the flaky test is because when the second container
starts, the first container in the detached mode may have only
been created and not yet entering the running state. So the
port 8000 might be used by the second container first.

This fix added a check to make sure the first container is already
in running state, before the second container is invoked.

This fix fixes #21247.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 1a9f5f4c69451c580595d67844f41937b3293069
Component: engine
2016-03-17 03:14:59 +00:00
3b37cd85fb Merge pull request #21212 from runcom/wip-token-service-tests
distribution: errors: do not access the errors slice if it's empty
Upstream-commit: f2b1b44de81ec9c7fd404fb3e0b4eefd83939a94
Component: engine
2016-03-16 13:44:18 -07:00
a5bcba2abf Merge pull request #21203 from HackToday/fixfilter
Add check about filter name for containers
Upstream-commit: bd97e4f95a72b26b59bf42c74f6b221bebbd685c
Component: engine
2016-03-16 14:30:04 +01:00
f9e5200e21 distribution: errors: do not access the errors slice if it's empty
- cherry-pick from 1.10.3 branch: 0186f4d4223a094a050d06f456355da3ae431468
- add token service test suite
- add integration test (missing in 1.10.3 branch)

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 1b5c2e1d722757a55364fb45cf3fcec7f2c75fb4
Component: engine
2016-03-16 09:00:39 +01:00
9042585b0d Merge pull request #21222 from aaronlehmann/pull-with-no-layers
Fix pulling images that contain no layers at all
Upstream-commit: 2b1b235acf9aa029218e1bd5cd97a369c500e4f5
Component: engine
2016-03-15 23:03:42 -07:00
75cce52537 Add check about filter name for containers
Fixes: #21202
We add valid check about filters like network, images,
volumes did.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 8a90e8a19b8108ecdff325fc19dbdf945aa15fad
Component: engine
2016-03-16 03:53:40 +00:00
66aada1792 Fix pulling images that contain no layers at all
The download manager assumed there was at least one layer involved in
all images. This can be false if the image is essentially a copy of
`scratch`.

Fix a nil pointer dereference that happened in this case. Add
integration tests that involve schema1 and schema2 manifests.

Fixes #21213

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 7cf894ce1013e5843d5c151f24520b51d34515d0
Component: engine
2016-03-15 11:10:03 -07:00
8a5b6da14b Merge pull request #21162 from estesp/copyastar-dir-create
Fix CopyWithTar creation of new destination dir as remapped root
Upstream-commit: 6f2d8b411eaaa6b4ea2a46e5164325450259573b
Component: engine
2016-03-15 10:26:30 -07:00
6b75bb519f Merge pull request #20177 from jheiss/12076-net_hostname
Allow --hostname with --net=host
Upstream-commit: 21e531014db65422e1a3000fd3596459f55870c4
Component: engine
2016-03-15 08:17:25 -07:00
2f4ce11dc1 Merge pull request #21196 from LK4D4/detect_leaks_util
integration-cli: move goroutines info helpers to separate funcs
Upstream-commit: daabb45d0ac6c332ef0b54c30f70dfa2b459d362
Component: engine
2016-03-15 12:42:47 +01:00
1f830d0241 integration-cli: move goroutines info helpers to separate funcs
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 0c7c9df8048353f3ff84d88d4311196546ba56cf
Component: engine
2016-03-14 15:52:56 -07:00
32e01227d0 Merge pull request #20111 from twistlock/19995_skip_user_ns
Run privileged containers when userns are specified - feature proposal
Upstream-commit: d8539347bfb9c019a29b56ea36f1538900bc543b
Component: engine
2016-03-14 15:11:55 -07:00
b59f91dbea Merge pull request #21151 from mountkin/optimize-test
optimize slow tests
Upstream-commit: 01f165169b6913320defdc9ce3995614e4c286d1
Component: engine
2016-03-14 16:39:01 -04:00
9694bed63e Merge pull request #21002 from tonistiigi/fix-id-noprefix
Fix docker run for 64 byte hex ID
Upstream-commit: df20b5cfd337bb3093fd87e278501fbca4480d54
Component: engine
2016-03-14 10:17:38 -07:00
1ddccf6e06 Merge pull request #21048 from LK4D4/fix_attach_leak
daemon: fix hanging attaches on initial start failures
Upstream-commit: 8e74cf59d06ce0052193ec8216db5dca7eec4981
Component: engine
2016-03-14 10:16:45 -07:00
9da8efbb67 Merge pull request #21161 from Microsoft/jjh/TestLogsPerformanceProblem
Windows: Improve TestLogsContainers performance
Upstream-commit: 3d42393e7f4434a03002cf6649af79e5405cae07
Component: engine
2016-03-14 13:04:16 -04:00
2f7e1dc6a8 Merge pull request #21159 from runcom/fix-retry-push-bug
distribution: errors: do not retry if no credentials provided
Upstream-commit: 0b962f72a97c5e1cde020cc948704e61ab8dfc0a
Component: engine
2016-03-14 09:47:13 -07:00
e578be78a3 Run privileged containers when userns are specified
Following #19995 and #17409 this PR enables skipping userns re-mapping
when creating a container (or when executing a command). Thus, enabling
privileged containers running side by side with userns remapped
containers.

The feature is enabled by specifying ```--userns:host```, which will not
remapped the user if userns are applied. If this flag is not specified,
the existing behavior (which blocks specific privileged operation)
remains.

Signed-off-by: Liron Levin <liron@twistlock.com>
Upstream-commit: 6993e891d10c760d22e0ea3d455f13858cd0de46
Component: engine
2016-03-14 17:09:25 +02:00
83045d547d Merge pull request #20970 from dmcgowan/login-oauth
OAuth support for registries
Upstream-commit: b9361f02da25108af75238093959634e433d72a0
Component: engine
2016-03-14 15:49:44 +01:00
9fbfb6e6c5 Merge pull request #21134 from tophj-ibm/fix-logtest-on-empty-log
Fix error-checking when looking at empty log
Upstream-commit: 93e04e705a3cdd639b90aef18ca98eb5db9518d3
Component: engine
2016-03-14 10:00:57 -04:00