Commit Graph

3231 Commits

Author SHA1 Message Date
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
87b210ea47 Containerize TestDaemonNoSpaceLeftOnDeviceError
Why? Because the `mount` here will sometimes fail when run in
`debian:jessie`, which is what the environrment hosting the test suite
is running if run from the `Makefile`.
Also, why the heck not containerize it, all the things.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 59b83d8aae106cdc4042c29c900069fc804b2b68
Component: engine
2016-04-19 17:16:18 -04:00
2f96f680c7 Merge pull request #22153 from vdemeester/update-engine-api-again
Update engine api again for CopyToContainer and versions
Upstream-commit: eab65e438ecc406baf935c8df544982164cff72f
Component: engine
2016-04-19 11:05:27 -07:00
4ebf703e54 Merge pull request #21495 from HackToday/addnetworkfilter
Add network label filter support
Upstream-commit: 75cc2c926b3296ed07af130a91ed2409f823ff70
Component: engine
2016-04-19 19:15:14 +02:00
03d17b8c5f Update code for latest engine-api
- Update CopyToContainer uses
- Use engine-api/types/versions instead of pkg/version

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 7534f17261d0bb74557ca2f7cd893d5b7b531d49
Component: engine
2016-04-19 16:56:54 +02:00
c026bc562f Merge pull request #21901 from mavenugo/sid
Add container's short-id as default network alias
Upstream-commit: 8adc8c3a686be09212a894cc91dcd974b830f330
Component: engine
2016-04-19 08:16:41 -04:00
dbfba75d3e Merge pull request #22122 from Microsoft/jjh/defaultdir
Windows: Set default directory
Upstream-commit: 42a7efd69171e94063f0be2b1ad88262ee6bad81
Component: engine
2016-04-19 07:27:13 -04:00
f5ac686743 Deprecated of docker ps since and before options for v1.12
Deprecated note https://github.com/docker/docker/blob/master/docs/deprecated.md#docker-ps-before-and-since-options

Signed-off-by: Wen Cheng Ma <wenchma@cn.ibm.com>
Upstream-commit: 91b715706493059d39c9f8b1d01c9d80ce1799d9
Component: engine
2016-04-19 18:13:55 +08:00
f8a8c81f4e Merge pull request #21657 from vdemeester/update-engine-api
Update engine api with required arguments
Upstream-commit: 7fd53f7c711474791ce4292326e0b1dc7d4d6b0f
Component: engine
2016-04-18 19:47:22 -07:00
430ab207ac Windows: Set default directory
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c2d183426ba2fb4e850dc006d3ad3cc3bd86cc24
Component: engine
2016-04-18 15:59:41 -07:00
7e0d42a8a5 Add container's short-id as default network alias
link feature in docker0 bridge by default provides short-id as a
container alias. With built-in SD feature, providing a container
short-id as a network alias will fill that gap.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: ea531f061d3c511e376753f9863cb41f1b96d87e
Component: engine
2016-04-18 14:45:16 -07:00
1beaa5c119 Add network label filter support
This patch did following:

1) Make filter check logic same as `docker ps ` filters

Right now docker container logic work as following:
when same filter used like below:
 -f name=jack -f name=tom
it would get all containers name is jack or tom(it is or logic)

when different filter used like below:

 -f name=jack -f id=7d1
it would get all containers name is jack and id contains 7d1(it is and logic)

It would make sense in many user cases, but it did lack of compliate filter cases,
like "I want to get containers name is jack or id=7d1", it could work around use
(get id=7d1 containers' name and get name=jack containers, and then construct the
final containers, they could be done in user side use shell or rest API)

2) Fix one network filter bug which could include duplicate result
when use -f name=  -f id=, it would get duplicate results

3) Make id filter same as container id filter, which means match any string.
not use prefix match.

It is for consistent match logic

Closes: #21417

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: f812b55692f5d50d427684216ad6c806bac5a702
Component: engine
2016-04-18 00:38:48 +00:00
145eac88d4 Merge pull request #20835 from cpuguy83/handle_stats_client_errors
Do not remove containers from stats list on err
Upstream-commit: 5314296c693d0d4d7f622940b48bc15e400032e3
Component: engine
2016-04-16 10:20:58 +01:00
8d9f1bcb22 Merge pull request #21939 from calavera/events_until_past
Get events until a time in the past.
Upstream-commit: 19a453e6b40177af31703f107131aae5ca81adf2
Component: engine
2016-04-15 15:33:41 -04:00
df2eec1c61 Merge pull request #22050 from tophj-ibm/increase-timeout-stdin-close-test
Fix flaky test TestRunExitOnStdinClose
Upstream-commit: d2851cc7e313aa3a56591b69ccc952bbfab0d0f7
Component: engine
2016-04-15 10:46:31 -07:00
23c1fd9d95 Merge pull request #21006 from cpuguy83/volume_inspect_meta
Allow volume drivers to provide a `Status` field
Upstream-commit: e40e5b97c1ad540aa0be568467546f27932ef3a5
Component: engine
2016-04-15 18:53:39 +02:00
a683195dbd Merge pull request #21726 from aaronlehmann/tarsum-filename-normalization
Fix build cache false positives when build context tar contains unnormalized paths
Upstream-commit: 1a14bbc61e35fd2ca412e07fa6c456095756f892
Component: engine
2016-04-15 09:45:26 -07:00
ed92db4f93 Allow volume drivers to provide a Status field
The `Status` field is a `map[string]interface{}` which allows the driver to pass
back low-level details about the underlying volume.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 36a1c56cf555f8fe9ceabeebb8fc956e05863fc7
Component: engine
2016-04-15 10:56:38 -04:00
d95baeb192 Fix flaky test TestRunExitOnStdinClose
This test was flaky on ppc64le, where the average time to close was
around 1 second. This bumps that timeout to 60 seconds which should be
plently.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: f84cabd3b8a737e7539d71773b842daa8f0dc66b
Component: engine
2016-04-15 09:33:51 -04:00
b48cb728b8 Update client code with api changes
Using new methods from engine-api, that make it clearer which element is
required when consuming the API.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b9c94b70bf2f703f260844b3862a61f93dee6337
Component: engine
2016-04-15 12:48:01 +02:00
9cdf9be514 Remove start/die event when fail to start container
If contaner start fail of (say) "command not found", the container
actually didn't start at all, we shouldn't log start and die event for
it, because that doesnt actually happen.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 5548966c37147875fb5e07f4ba7f633dd882c782
Component: engine
2016-04-15 13:02:34 +08:00
b1c3afb97e Fix build cache false positives when build context tar contains unnormalized paths
If a build context tar has path names of the form 'x/./y', they will be
stored in this unnormalized form internally by tarsum. When the builder
walks the untarred directory tree and queries hashes for each relative
path, it will query paths of the form 'x/y', and they will not be found.

To correct this, have tarsum normalize path names by calling Clean.

Add a test to detect this caching false positive.

Fixes #21715

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 8691a77e441996fef96019b94f299a11b7244080
Component: engine
2016-04-14 17:57:45 -07:00
b6c2e57eab Merge pull request #21172 from yongtang/20909-seccomp-in-docker-info
Show "seccomp" in docker info (#20909).
Upstream-commit: bc0c8828e9afc32f1660a1f679ed523376c7d3d2
Component: engine
2016-04-15 01:24:54 +02:00
de95cbad37 Get events until a time in the past.
This change allow to filter events that happened in the past
without waiting for future events. Example:

docker events --since -1h --until -30m

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 55053d3537100eaeaad9c83b43e31f22d14fde7b
Component: engine
2016-04-14 16:22:16 -07:00
a6fa28fbfa Merge pull request #21634 from cpuguy83/add_beter_logging_for_TestDaemonNoSpaceleftOnDeviceError
More logs for `TestDaemonNoSpaceleftOnDeviceError`
Upstream-commit: 8011228b53ead375cf7645bf4e7f686324e6e9d6
Component: engine
2016-04-14 22:06:49 +02:00
858159027f Merge pull request #21879 from WeiZhang555/fix-kill-nonexist
Fix bug that can't kill an restarting container
Upstream-commit: cb87b6eb6a955e5a66b17e0a15557f37f76b85c0
Component: engine
2016-04-13 22:50:19 -07:00
925ceebdbf Merge pull request #21970 from cpuguy83/use_cached_path_on_ls
Fix N+1 calling `Path()` on `volume ls`
Upstream-commit: 7cd420d63a708c7763bceff231873c4e73b29c31
Component: engine
2016-04-13 22:47:53 -07:00
90af4a019b Do not remove containers from stats list on err
Before this patch, containers are silently removed from the stats list
on error. This patch instead will display `--` for all fields for the
container that had the error, allowing it to recover from errors.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: ff08036cc0d1b393106570a8c141e909d894f7d3
Component: engine
2016-04-13 16:36:34 -04:00
05c398dfb7 Merge pull request #21953 from Microsoft/jjh/containerapipostcontainerstop
Windows: Fix deamon deadlock in docker stop
Upstream-commit: d954097c0b9e48010f980217167af6b40cf97e58
Component: engine
2016-04-13 13:28:59 -04:00
2a0b94972b Merge pull request #19265 from rhatdan/netsysctl
Add support for setting sysctls
Upstream-commit: 988508a2b5aa18c04fd3db143b4e4f5f207ea15e
Component: engine
2016-04-13 18:36:30 +02:00
da8ff9f6e7 Merge pull request #21959 from coolljt0725/fix_21957
Fix docker load progressbar, fixes #21957
Upstream-commit: 348d90276802aac6c76126f2fe6866c521190ecd
Component: engine
2016-04-13 00:31:27 -04:00
94711fe63a Fix docker load progressbar, fixes #21957
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 96d7db665b06cc0bbede22d818c69dc5f6921f66
Component: engine
2016-04-12 22:45:42 -04:00