Commit Graph

3279 Commits

Author SHA1 Message Date
b511f6b16d Merge pull request #22636 from sean-jc/fix-oom-killer-tests
Add the swapMemorySupport requirement to OOM tests
Upstream-commit: 95872b65fb65bcc275b2fa141b6a991ee085a41a
Component: engine
2016-05-12 14:41:55 -07:00
3af8464259 Merge pull request #22445 from yongtang/20936-22443-concurrent-connection
Docker pull/push with max concurrency limits.
Upstream-commit: e9117578a7837eda31d690d5e51d09d43a6a8fca
Component: engine
2016-05-12 08:51:28 -07:00
e20fdf0d4f Merge pull request #22622 from tkopczynski/20784-builder-intg2unit-tests
Reimplement some builder integration tests as unit tests
Upstream-commit: 84a6818b11e6bf74d13222d0df2fe7d1ae811bb6
Component: engine
2016-05-12 10:29:39 +02:00
be88ed49c5 Docker pull/push with max concurrency limits.
This fix tries to address issues raised in #20936 and #22443
where `docker pull` or `docker push` fails because of the
concurrent connection failing.
Currently, the number of maximum concurrent connections is
controlled by `maxDownloadConcurrency` and `maxUploadConcurrency`
which are hardcoded to 3 and 5 respectively. Therefore, in
situations where network connections don't support multiple
downloads/uploads, failures may encounter for `docker push`
or `docker pull`.

This fix tries changes `maxDownloadConcurrency` and
`maxUploadConcurrency` to adjustable by passing
`--max-concurrent-uploads` and `--max-concurrent-downloads` to
`docker daemon` command.

The documentation related to docker daemon has been updated.

Additional test case have been added to cover the changes in this fix.

This fix fixes #20936. This fix fixes #22443.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7368e41c07c21a1e2c6a49abecd1c2fc76404e49
Component: engine
2016-05-11 19:44:54 -07:00
af05fef951 Reimplementing builder integration tests as unit tests
Signed-off-by: Tomasz Kopczynski <tomek@kopczynski.net.pl>
Upstream-commit: 18eeb399852b7efe9459a1d77b0a5032a6b88bba
Component: engine
2016-05-11 22:13:39 +02:00
d3b9fbad27 Merge pull request #22511 from crosbymichael/update-runc-containerd
Update runc and containerd deps
Upstream-commit: af60a9e599543daa70da6d5d3b07343aa780c3ad
Component: engine
2016-05-10 15:06:23 -07:00
3ff3d68824 Add the swapMemorySupport requirement to OOM tests
Add the swapMemorySupport requirement to all tests related to the OOM killer.  The --memory option has the subtle side effect of defaulting --memory-swap to double the value of --memory.  The OOM killer doesn't kick in until the container exhausts memory+swap, and so without the memory swap cgroup the tests will timeout due to swap being effectively unlimited.

Document the default behavior of --memory-swap in the docker run man page.

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Upstream-commit: adabb51311ecac031bd72378c5ed1669d1835d40
Component: engine
2016-05-10 11:28:00 -07:00
bf84b3cfbf Adds a correct error string for network validation
Fixes the negative networking test to include the new error string
from recent Windows builds.

Signed-off-by: Justin Terry <juterry@microsoft.com>
Upstream-commit: 47ef6d7969a3396f6ecc3bb27aac425b1a65b344
Component: engine
2016-05-09 16:37:14 -07:00
dbf25e32d6 Fix containerd proto for connection
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 6889c3276c6895a8440dc8883b8cd608793199f3
Component: engine
2016-05-09 15:17:10 -07:00
496d63e99d Merge pull request #22562 from tonistiigi/fix-loopback-release
Clean loopbacks in TestDaemonNoSpaceLeftOnDeviceError
Upstream-commit: c5e3644f03acb71473a1c19437891f6903aca738
Component: engine
2016-05-09 13:28:08 -04:00
91eda97012 Merge pull request #22574 from yongtang/05072016-remove-deprecated-trust-env
Remove deprecated Docker Content Trust ENV passphrase variables
Upstream-commit: fad0305ee3f697c70654e4ade7dfdd92483eb3e1
Component: engine
2016-05-09 10:10:27 -07:00
9da7afb9c6 Err was never being returned
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 0687d76ab1f54250ee7611822d4194a44217fa83
Component: engine
2016-05-08 05:51:59 -07:00
86911550d2 Remove deprecated Docker Content Trust ENV passphrase variables
Since 1.9, Docker Content Trust Offline key has been renamed to
Root key and the Tagging key has been renamed to Repository key.
The corresponding environment variables
`DOCKER_CONTENT_TRUST_OFFLINE_PASSPHRASE`
`DOCKER_CONTENT_TRUST_TAGGING_PASSPHRASE`
have also been deprecated and renamed to
`DOCKER_CONTENT_TRUST_ROOT_PASSPHRASE`
`DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE`

This fix removed the deprecated ENV passphrase variables for
1.12 and updated the docs.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 1f0d5aba50803ff401197f96f6a830384d0c04c5
Component: engine
2016-05-07 14:25:28 -07:00
003c321b57 Merge pull request #21889 from cpuguy83/logscmd_add_attrs
Add support for reading logs extra attrs
Upstream-commit: 08ec3606f1656962084222412debf2888f15f553
Component: engine
2016-05-07 20:26:33 +02:00
697f71e4f2 Add support for reading logs extra attrs
The jsonlog logger currently allows specifying envs and labels that
should be propagated to the log message, however there has been no way
to read that back.

This adds a new API option to enable inserting these attrs back to the
log reader.

With timestamps, this looks like so:
```
92016-04-08T15:28:09.835913720Z foo=bar,hello=world hello
```

The extra attrs are comma separated before the log message but after
timestamps.

Without timestaps it looks like so:
```
foo=bar,hello=world hello
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: bd9d14a07b9f1c82625dc8483245caf3fa7fe9e6
Component: engine
2016-05-06 20:42:20 -04:00
066d1c9ee5 Clean loopbacks in TestDaemonNoSpaceLeftOnDeviceError
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 47c353eb4694a727e4fe4d6c1c2eedf1dc3c3aa8
Component: engine
2016-05-06 14:19:27 -07:00
9f5c8a18bb Merge pull request #22501 from michael-holzheu/22477-TestApiStatsContainerGetMemoryLimit-add-mem-cgroup-test
TestApiStatsContainerGetMemoryLimit: Add cgroup memory test
Upstream-commit: f65f4dc76103986542bc5472c4ae992ecfa74c07
Component: engine
2016-05-06 09:12:27 +02:00
1ae186f482 Merge pull request #21961 from yongtang/21956-docker-inspect-log-default-options
Docker inspect gave default log options even when the option is emtpy.
Upstream-commit: e9bef66021a29c219c185e98db7f3017513f67a6
Component: engine
2016-05-05 21:02:39 -04:00
83644199c7 Merge pull request #21015 from cpuguy83/add_opaque_mount_id
When calling volume driver Mount, send opaque ID
Upstream-commit: bb125650c9fbff03d57c20fd8e4ecde90b3ec326
Component: engine
2016-05-05 18:00:15 +02:00
e5dc90cedd Merge pull request #22505 from runcom/authz-load-import
integration-cli: test load/import with authz plugins
Upstream-commit: 0d3d8d6416bdadf3a6e018a18cb97f5162da1fb1
Component: engine
2016-05-05 11:37:20 -04:00
576dc33c5e Merge pull request #22508 from Microsoft/jjh/arg
Windows: Support ARG in builder
Upstream-commit: 378a8e71755e86bab0e6c18022bf457a9c79e166
Component: engine
2016-05-05 09:09:55 +02:00
b06eb99229 Windows: Support ARG in builder
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 6b5c83bf18fe406e397c001acb0a1d9d7e147fd9
Component: engine
2016-05-04 14:32:23 -07:00
e7e33c529a Merge pull request #22475 from Microsoft/jjh/twoconcurrentcontainers
Reduce time for TestRunTwoConcurrentContainers
Upstream-commit: e4a4570369d53adbf74b8cb84d8b7301a32689bd
Component: engine
2016-05-04 12:38:13 -07:00
11be2b26e1 TestApiStatsContainerGetMemoryLimit: Add cgroup memory test
Currently on kernels booted without the "cgroup_enable=memory" kernel
parameter the testcase TestApiStatsContainerGetMemoryLimit fails with:

FAIL: docker_api_stats_test.go:231: TestApiStatsContainerGetMemoryLimit.pN52_github_com_docker_docker_integration_cli.DockerSuite

docker_api_stats_test.go:256:
    c.Assert(fmt.Sprintf("%d", v.MemoryStats.Limit), checker.Equals, fmt.Sprintf("%d", info.MemTotal))
... obtained string = "0"
... expected string = "33759145984"

Fix this and skip the testcase if the kernel does not support cgroup memory
limit. In that case the output would be:

SKIP: docker_api_stats_test.go:231:
TestApiStatsContainerGetMemoryLimit.pN52_github_com_docker_docker_integration_cli.DockerSuite
(Test requires an environment that supports cgroup memory limit.)

ChangeLog:
----------
v4: Move TestApiStatsContainerGetMemoryLimit to docker_api_stats_unix_test.go
v3: Use existing "memoryLimitSupport" from requirements_unix.go
v2: Move check to requirements.go

Fixes #22477

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Upstream-commit: 8ba8189ee66fa36f7adb1f2bab6cc4c35ebfd8cd
Component: engine
2016-05-04 20:46:41 +02:00
cd0e933563 integration-cli: test load/import with authz plugins
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 9613acbe5cd517f1fd4c8d405be3cfc24d249562
Component: engine
2016-05-04 18:45:22 +02:00
bbb9555a0a RunSleepingContainer consistency
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 481cc6716fdfda8db4481dd2a3dfde4d3d2edba5
Component: engine
2016-05-03 11:39:29 -07:00
368f007a03 Reduce time for TestRunTwoConcurrentContainers
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 94f1e574b6469021c7c7fd3cad857a011cf93815
Component: engine
2016-05-03 10:55:20 -07:00
a483fc51fe Docker inspect gave default log options even when the option is emtpy.
This fix tries to addess the issue in #21956 where `docker inspect`
will overwrite the log config options with default option even when
the `--log-driver` is not empty and `--log-opt` is empty. In this
situation, `docker inspect` and `docker run` is different.

With the introduction of #21153, the `HostConfig` will always have
the correct log-driver and log-opt values.

However, the previous processing of `docker inspect` was not updated
after the change in #21153. This results in the incorrect behavior.

This fix addresses this issue by updating `docker inspect` to conform
to #21153 so the the behavior of `docker inspect` and `docker run` is
consistent.

A integration test has been added to cover this fix.

This fix fixes #21956. This fix is related to #21153.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 4b5404f15ed2944ca2d994f52618338c52611352
Component: engine
2016-05-02 21:14:42 -07:00
fb1770417a Move implicit pull test to use local registry
Using hub only works for amd64 platforms.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 641c1808e187ed86d8b614e49e8e6da5146201e3
Component: engine
2016-05-02 18:14:13 -07:00
230f115d81 Merge pull request #21153 from mountkin/log-validator
inherit the daemon log options when creating containers
Upstream-commit: 75e63c942ec8d3852f182b9cd9c221411fc74730
Component: engine
2016-05-02 16:12:43 -04:00
31d554228f Merge pull request #22448 from twistlock/authorization_error_code
Fix authorization issue - when request is denied return forbbiden exist code (403).
Upstream-commit: 2f6e3b0ba027b558adabd41344fee59db4441011
Component: engine
2016-05-02 11:04:19 -07:00
b33e8d5489 Fix authorization issue - when request is denied return forbbiden exist code (403).
- Return 403 (forbidden) when request is denied in authorization flows
(including integration test)
- Fix #22428
- Close #22431

Signed-off-by: Liron Levin <liron@twistlock.com>
Upstream-commit: 526abc00b138a168fb248c98efd1b90fdf679036
Component: engine
2016-05-02 19:14:48 +03:00
a97fd7f656 inherit the daemon log options when creating containers
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: 1790980ec68c2579712e97ecffcdb8fa93700bc6
Component: engine
2016-05-02 23:04:04 +08:00
9fb835ad73 Fix #22240 do not pull all the tags implicitely
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 54ebe42de9c359e0c9f171953bd787bb997d719e
Component: engine
2016-05-01 14:46:04 +02:00
6e410ce449 Add "driver" filter for network ls
This add a new filter to 'docker network ls'
to allow filtering by driver-name.

Contrary to "ID" and "name" filters, this
filter only supports an *exact* match.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 23e418b6c966a43a463a064053ce0c741b8e5159
Component: engine
2016-04-29 16:22:26 +02:00
de046a0cf3 When calling volume driver Mount, send opaque ID
This generates an ID string for calls to Mount/Unmount, allowing drivers
to differentiate between two callers of `Mount` and `Unmount`.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 2b6bc294fc7f9e08a9091833b021b7d2a01ad2a6
Component: engine
2016-04-29 09:37:02 -04:00
da56d24b50 Merge pull request #22269 from coolljt0725/skip
Skip TestBuildNotVerboseFailure if no network
Upstream-commit: bf7307558e42e0ad9f41316f397d880e6d4981b6
Component: engine
2016-04-28 11:19:56 +02:00
3cf7d71fdb Merge pull request #21641 from yongtang/21595-discrepancy-on-hostname-validation
API/CLI discrepancy on hostname validation (#21595).
Upstream-commit: 78eb8a5fb932c2b11df47e7a22c05fe485e03adb
Component: engine
2016-04-28 09:25:13 +02:00
600e267c7f Skip TestBuildNotVerboseFailure if no network
TestBuildNotVerboseFailure use a non-exist image busybox1,
it requires network connection to access to Dockerhub, skip
this test if there is no network.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 9ab0aa43365cd648d7681a58b60e91f791bc920a
Component: engine
2016-04-27 21:29:05 -04:00
ff027b364b Add load/save image event support
For every docker load and save operations, it would log related
image events.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 06561057103441fe176910e12674d998b8561b75
Component: engine
2016-04-27 01:11:03 +00:00
8a812459dd Merge pull request #22329 from runcom/fix-tmpfs-order
daemon: reorder mounts before setting them
Upstream-commit: 0147164cfd0645849f2464edb2c64c601a3ab492
Component: engine
2016-04-26 20:23:13 -04:00
7cba2b7aed Merge pull request #22181 from Microsoft/jjh/workdir
Windows: Consistent build workdir handling
Upstream-commit: 2b97201e0cd8301484fde379d2bf7f0ad3f36f10
Component: engine
2016-04-26 16:51:09 -07:00
51ef85c587 Windows: Consistent build workdir handling
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 0433801093f1988db0e210e28352f4af71a0ac81
Component: engine
2016-04-26 15:32:52 -07:00
421a9caea1 Merge pull request #22324 from WeiZhang555/fix-test-case
Fix test case
Upstream-commit: 4925fcbe2e5db8e44d48af0ec12b2badb7af1752
Component: engine
2016-04-26 15:01:02 -04:00
c44b17ce8b Fix test case
"TestRestartContainerwithRestartPolicy" contains some codes that could be
flaky, it's supposed to be fixed in #22256.

This commit removes unnecessary code, make the test case cleaner.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: a7eecd2b61296825f9a0f739dbc06ad65a3d2c5d
Component: engine
2016-04-26 19:22:48 +08:00
64c17a1eca daemon: reorder mounts before setting them
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 6a8ea46c67c3594118c7da41b1cebe062aff3f6a
Component: engine
2016-04-26 11:03:25 +02:00
6ee8d84c70 skip TestAuthApi if no network is available
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2fae3d2693648d1c0f5cc079f37aaba5116ba5f9
Component: engine
2016-04-25 20:12:36 +02:00
3e2f49ebeb Merge pull request #22254 from yongtang/22244-remote-api-auth-behavior
Add default `serveraddress` value in remote API `/auth`
Upstream-commit: e6df098390b286abb40a87b2cb13228a6aebdf79
Component: engine
2016-04-25 10:15:08 -07:00
fa4887efcd Merge pull request #22272 from yongtang/22271-relative-symlinks
Relative symlinks don't work with --device argument
Upstream-commit: 88d1ae148cb27cb685e1d6abf631d48bf3bf7408
Component: engine
2016-04-25 18:10:04 +02:00
4ee918032b Relative symlinks don't work with --device argument
This fix tries to address the issue raised in #22271 where
relative symlinks don't work with --device argument.

Previously, the symlinks in --device was implemneted (#20684)
with `os.Readlink()` which does not resolve if the linked
target is a relative path. In this fix, `filepath.EvalSymlinks()`
has been used which will reolve correctly with relative
paths.

An additional test case has been added to the existing
`TestRunDeviceSymlink` to cover changes in this fix.

This fix is related to #13840 and #20684, #22271.
This fix fixes #22271.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 632b314b239d1cd5e2498f198503a2983233a9f4
Component: engine
2016-04-25 07:22:56 -07:00