Commit Graph

3263 Commits

Author SHA1 Message Date
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
860fb4199d make Insecure registries uppercase like other keys in docker info
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: e78884dafd2e9f5378626c4699c6b3b713eecf03
Component: engine
2016-04-25 18:44:34 +08:00
99b21b8879 Merge pull request #22184 from yongtang/22036-label-set
Labels set on the command line don't override labels in Dockerfile
Upstream-commit: 1e9b2355e4f79155566d54308b58d3e87b563986
Component: engine
2016-04-24 08:37:00 -04:00
76284509d6 Merge pull request #22138 from wenchma/deprecated_since_before
Deprecated of docker ps since and before options for v1.12
Upstream-commit: 4e5ad97f5b2d9db237546e67de3049649c5ff5e8
Component: engine
2016-04-24 11:23:21 +02:00
70a36f55d4 Labels set on the command line always override labels in Dockerfile
This fix tries to address the inconsistency in #22036 where labels
set on the command line will not override labels specified in
Dockerfile, but will override labels inherited from `FROM` images.

The fix add a LABEL with command line options at the end of the
processed Dockerfile so that command line options labels always
override the LABEL in Dockerfiles (or through `FROM`).

An integration test has been added for test cases specified in #22036.

This fix fixes #22036.

NOTE: Some changes are from #22266 (@tiborvass).

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 5844736c14b29860ea03b040e9a052e59ad75bfc
Component: engine
2016-04-23 18:49:17 -07:00
95f6733644 Merge pull request #20639 from dnephin/split_client
Split the binary into two: client and daemon
Upstream-commit: 27f44b8af63d563f53c04b342cbafc3b8f27cb45
Component: engine
2016-04-23 14:14:20 -07:00
2b5a31c9fe Add default serveraddress value in remote API /auth
This fix tries to address the issue in #22244 where the remote
API `/auth` will not set the default value of `serveraddress`
if not provided. This behavior happens after only in 1.11.0
and is a regression as in 1.10.3 `serveraddress` will be assigned
with `IndexServer` if no value is provided.

The default value `IndexServer` is assigned to `serveraddress` if
no value provided in this fix.

An integration test `TestAuthApi` has been added to cover this change

This fix fixes #22244.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 93973196f4b4dafae5b94eb541a3b752ea48f66e
Component: engine
2016-04-22 20:00:47 -07:00
dcd6f9747a Build two binaries client and daemon.
Add a proxy to support 'docker daemon'
Fix configFile option, and remove a test that is no longer relevant.
Remove daemon build tag.
Remove DOCKER_CLIENTONLY from build scripts.

Signed-off-by: Daniel Nephin <dnephin@docker.com>

Change docker-daemon to dockerd.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 9e7651db4d464649bc32cf346fdee8c6900ebe0f
Component: engine
2016-04-22 11:26:01 -04:00
0f14718379 Make cpu validation correct
There was an error in validation logic before, should use period
instead of quota, and also add check for negative
number here, if not with that, it would had cpu.cfs_period_us: invalid argument
which is not good for users.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 62cb06a6c1db5599f1f5b9b95b298be83c509860
Component: engine
2016-04-22 01:18:03 +00:00
0c742e4666 Merge pull request #22213 from yongtang/22210-docker-http-panics
Docker http panics caused by container deletion with empty names.
Upstream-commit: 6f67c13d20b207e5ab9a038b04ccc44d337131ed
Component: engine
2016-04-21 10:37:24 -07:00
4e42d86b8b Merge pull request #22172 from cpuguy83/fix_nosapce_test
Containerize `TestDaemonNoSpaceLeftOnDeviceError`
Upstream-commit: 228759fd42fdb2014b2e16e15f4452bb1d5f8227
Component: engine
2016-04-21 09:41:31 -07:00
b0c0884b1f Docker http panics caused by container deletion with empty names.
This fix tries to fix the http panics caused by container deletion
with empty names in #22210.

The issue was because when an empty string was passed, `GetByName()`
tried to access the first element of the name string without checking
the length. A length check has been added.

A test case for #22210 has been added.

This fix fixes #22210.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9d8071a74db20556d0fc1b6ef3270326b3583de9
Component: engine
2016-04-21 07:53:49 -07:00
60ca663014 Merge pull request #22191 from mavenugo/jp
Initialize activateWait for plugins activated by json spec
Upstream-commit: cf03e17c5cfb7617d91aa4177f4bb4a5112496ad
Component: engine
2016-04-20 08:37:20 -07:00
ee5a4917fb Initialize activateWait for plugins activated by json spec
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: de806a672b0810e48facc74e198e6728c1fe2c6d
Component: engine
2016-04-20 05:59:19 -07:00
a8bb60bfa2 Merge pull request #21380 from sainath14/improve_help_text_test_time
Improve the time taken by DockerSuite.TestHelpTextVerify
Upstream-commit: 34cc274a801cd38df3006484b14e4c9671c47b94
Component: engine
2016-04-20 08:03:45 +02:00
2d475a4388 Improve the time taken by DockerSuite.TestHelpTextVerify. This test runs docker <command> --help on all commands supported and also check the output
when it is passed with bad arguments and no arguments. This patch would divide the total number of commands into five sets and runs them in parallel.
Test time is improved from around 9 seconds to around 3 seconds

Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
Upstream-commit: 7f33ec750770ea751f64d516c73ce98dae64b536
Component: engine
2016-04-19 16:46:59 -07:00
9247bf6e84 Merge pull request #22043 from WeiZhang555/remove-start-event-failed-start
Remove start/die event when fail to start container
Upstream-commit: bb91bd3a89d93f74de99ea5158d68a92e4c6cd6a
Component: engine
2016-04-19 19:45:40 -04:00