Commit Graph

4190 Commits

Author SHA1 Message Date
25481985f3 Use check in params so we don't ignore errors
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: bcad3d5212641237fe97c9ea2668869805e3bce8
Component: engine
2016-12-08 10:56:29 +01:00
ed60722124 not export errors and forbid leave when unlocked
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 7bdd1a4f9c06ab4af8e652b7483104456e72c442
Component: engine
2016-12-07 13:25:34 +08:00
37fb30ac29 Fix docker inspect <unkown object> issue on Windows
This fix tries to address the issue raised on 29185 where
`docker inspect <unknown object>` on Windows will return:
```
Error response from daemon: plugins are not supported on this platform
```

The reason was that in case `--type` is not specified, `docker inspect`
will iterate through different types `container`, `image`, `network`,
`plugin` etc. The `plugin` object is the last type to check.

However, as `plugin` is not supported on Windows yet, the error message
is not very informative for `plugins are not supported on this platform`.

This fix tries to fix the issue by return a `not found` error on unsupported
platforms as well.

An integration test has been added to cover the changes for Windows/Linux.

This fix fixes 29185.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 88fcdb0a825da040ef2b1f9c191af480f0f2cc90
Component: engine
2016-12-06 12:05:59 -08:00
d262373ee7 Merge pull request #28907 from tonistiigi/cluster-refactor
Switch cluster locking strategy
Upstream-commit: eefbf1ddd3ee4e6b6e6dc7e938e77a96ceb40163
Component: engine
2016-12-06 10:02:23 -08:00
78547424d3 Merge pull request #28823 from AkihiroSuda/ensure-dev-pts-readonly
add a test for ensuring the behavior of read-only /dev/shm
Upstream-commit: 11702c66cfce350ff710d5170921a83b9748d4bf
Component: engine
2016-12-06 08:39:43 -05:00
9603ca0d08 Merge pull request #28896 from yongtang/28884-secret-name-mask-ID
Fix issue where secret ID is masked by name
Upstream-commit: 57d77cc205768624c36b4bd7fb98d9924925087e
Component: engine
2016-12-06 11:05:30 +01:00
92a14fe836 Merge pull request #28535 from yongtang/28497-prune-until
Convert DanglingOnly to Filters for `docker image prune`
Upstream-commit: 745795ef2e0089c5001e5a2fc7ba8c1ab0234857
Component: engine
2016-12-06 11:03:45 +01:00
050e2993f5 Merge pull request #28974 from AkihiroSuda/test-service-logs
improve TestServiceLogs for the goroutine issue #28915
Upstream-commit: 08f0100d5025e32d1392fab3493d5c0436ccdd2c
Component: engine
2016-12-06 10:58:57 +01:00
c6dacdbe65 Merge pull request #29096 from cyli/fix-swarmjoinpromote-test
Fix DockerSwarmSuite.TestSwarmJoinPromoteLocked flakiness
Upstream-commit: 67131bde6d6e5511ce76b0e1dafdbe7293eaa1ab
Component: engine
2016-12-06 10:19:36 +01:00
cc8d5c0801 improve TestServiceLogs for the goroutine issue #28915
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: f8a93d0c9d157dddc4e4d4d9c43a6fe7c7c0c242
Component: engine
2016-12-06 03:44:49 +00:00
cecb5272ed add a test for ensuring the behavior of read-only /dev/shm
The test ensures that `docker run --read-only -v /var/empty:/dev/shm:ro`
makes /dev/shm read-only

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 46ade6acb5b6cdb80287a83afd16c20c6a8b4dff
Component: engine
2016-12-06 03:44:02 +00:00
b729d1ae5d Fix typo in integration-cli (#29160)
Signed-off-by: xianwei <xianwei.zw@alibaba-inc.com>
Upstream-commit: 2dfb57b6706daee8e0855319bc2b121bf970267a
Component: engine
2016-12-05 22:23:41 -05:00
690bfc6638 In DockerSwarmSuite.TestSwarmJoinPromoteLocked, actually wait for the node to
finish being demoted before restarting it and ensuring it isn't locked anymore
to reduce test flakiness.

Signed-off-by: cyli <cyli@twistedmatrix.com>
Upstream-commit: e831a7cdb7a2e60f38e6de8a5e6be4d681181f42
Component: engine
2016-12-05 13:21:27 -08:00
4d3934c3e5 Merge pull request #28967 from yongtang/28946-support-plugin-docker-inspect
Support plugin type in `docker inspect`
Upstream-commit: 24ffa2fa7751e2f1fbdd7e0d5a640f24e8a5b803
Component: engine
2016-12-04 18:30:38 -08:00
085088f73e Fix issue where secret ID is masked by name
This fix tries to address the issue in 28884 where
it is possible to mask the secret ID by name.

The reason was that searching a secret is based on name.
However, searching a secret should be done based on:
- Full ID
- Full Name
- Partial ID (prefix)

This fix addresses the issue by changing related implementation
in `getCliRequestedSecretIDs()`

An integration test has been added to cover the changes.

This fix fixes 28884

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 3638ca4d14bcca9bc924f21314e4a1020cd5172f
Component: engine
2016-12-02 20:24:29 -08:00
35037b78fd Convert DanglingOnly to Filters for docker image prune
This fix convert DanglingOnly in ImagesPruneConfig to Filters,
so that it is possible to maintain API compatibility in the future.

Several integration tests have been added to cover changes.

This fix is related to 28497.

A follow up to this PR will be done once this PR is merged.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: a6be56b54e871c4e7a6e72881770a64676c27c3c
Component: engine
2016-12-02 20:08:49 -08:00
c0aa09b760 Merge pull request #28988 from vdemeester/28985-dont-validate-hostname
Remove hostname validation as it seems to break users
Upstream-commit: 3cb310c21049f652dd00d20899cb1ece1ee9aa8f
Component: engine
2016-12-02 21:16:56 -05:00
cc93b75a69 Merge pull request #29064 from vdemeester/29005-revert-builder-comments-line
Revert "Fix dockerfile parser with empty line after escape"
Upstream-commit: 6dff86f8b342c92e7686673fece7f31adf1bf836
Component: engine
2016-12-02 17:11:18 -08:00
6be6989ae5 Merge pull request #28994 from cpuguy83/allow_vol_recreate_for_same_driver
Fix out-of-band vol delete+create for same driver
Upstream-commit: 42aafe725ff20c6a97f7e4e06b3ec5ee9e615fb3
Component: engine
2016-12-02 15:12:13 -08:00
34d513c5af Merge pull request #29075 from cpuguy83/29070_fix_tmpfs_opts
Fix issue where TmpfsOptions are not sent to swarm
Upstream-commit: 0fb0d67008157add34f1e11685e23a691db92644
Component: engine
2016-12-02 13:40:20 -08:00
8d0b8ac112 Support plugins in docker inspect
This fix tries to address the proposal raised in 28946
to support plugins in `docker inspect`.

The command `docker inspect` already supports
"container", "image", "node", "network", "service", "volume", "task".
However, `--type plugin` is not supported yet at the moment.

This fix address this issue by adding the support of `--type plugin`
for `docker inspect`.

An additional integration test has been added to cover the changes.

This fix fixes 28946.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 90bb2cdb9f15a9b1b9a4e2ea4242882665daac4e
Component: engine
2016-12-02 11:33:29 -08:00
653a60cf01 Merge pull request #29039 from thaJeztah/fix-restart-limit-validation
Fix restartpolicy max-retry validation
Upstream-commit: 6e023ac7486edf7a2584cb918249b7e5fdaf91d2
Component: engine
2016-12-02 09:19:54 -08:00
1689338c62 Merge pull request #28789 from yongtang/28735-plugin-inspect-id-or-name
Allow `docker plugin inspect` to search based on ID or name
Upstream-commit: 57ace38103e1c9fc13e40c57b0fc77361e389f54
Component: engine
2016-12-02 08:46:47 -08:00
0f9b87c8d5 Fix issue where TmpfsOptions are not sent to swarm
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: a5b3649bfaca5958b25e42ab4f2fc5aa30929521
Component: engine
2016-12-02 11:43:47 -05:00
e8c489744e Revert "Fix dockerfile parser with empty line after escape"
This reverts commit 3e1b539e8d0ed4abf695b0a8c42346fba6d5a6b0.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6e0666e622a8b1fc19c19eb490d218eebca15edc
Component: engine
2016-12-02 14:15:55 +01:00
9e849b264c Fix restartpolicy max-retry validation
the restart policy validation was moved from
the client to the daemon in 94e95e4711643640701bd614902e75a2d01f12c5

As part of that change, retry-counts < 1
were marked as "invalid".

However, the default is 0 (unlimited), causing

    docker run -d --restart=on-failure nginx

To fail.

This changes the validation to only invalidate
retry-counts < 0.

A test was added, and other tests renamed
to allow running just these tests :)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9db5d649aea1c3d4728d0159bb5175a49f77748e
Component: engine
2016-12-02 02:39:16 +01:00
de12023423 Merge pull request #28997 from cyli/fix-flakey-test
Update the `TestSwarmLockUnlockCluster` test to be less flakey.
Upstream-commit: 0020398c74e8a08dc6b37a946e025324a3c823be
Component: engine
2016-12-01 11:32:30 -08:00
2ac57c6dcf Allow docker plugin inspect to search based on ID or name
This fix tries to address the issue raised in discussion of
PR 28735 where it was not possible to manage plugin based on
plugin ID. Previously it was not possible to invoke
`docker plugin inspect` with a plugin ID (or ID prefix).

This fix updates the implementation of `docker plugin inspect`
so that it is possbile to search based on a plugin name, or a
plugin ID. A short format of plugin ID (prefix) is also possible,
as long as there is no ambiguity.

Previously the check of `docker plugin inspect` was mostly done
on the client side. This could potentially cause inconsistency
between API and CMD. This fix move all the checks to daemon side
so that API and CMD will be consistent.

An integration test has been added to cover the changes.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0ce6e070f7d1e4b1b478d52b4464f8480dbfd9b7
Component: engine
2016-12-01 10:44:17 -08:00
bcb5d5d669 Switch cluster locking strategy
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b7ea1bdb0227a789a15e23821b8db4d5ddceb26e
Component: engine
2016-11-30 14:59:12 -08:00
c2f7699391 Merge pull request #28917 from erxian/correct-secret-remove-http-return-code
correct the http return code of secret remove
Upstream-commit: 457d562af128a765b48389681399903ca0e679cf
Component: engine
2016-11-30 22:47:28 +01:00
afd7b14845 Update the swarm cluster lock/unlock tests to be less flakey.
Signed-off-by: cyli <cyli@twistedmatrix.com>
Upstream-commit: 6a5b8a640a81aa27acda64221f95f02032a43ce5
Component: engine
2016-11-30 13:00:36 -08:00
cefbd9b7e9 Merge pull request #28885 from vdemeester/revert-service-ps-all
Revert "Add -a option to service/node ps"
Upstream-commit: 53d69aeb74962709464e0888f4a5c755be2c8e4d
Component: engine
2016-11-30 12:02:34 -08:00
a66f1eed5f Merge pull request #28838 from AkihiroSuda/remove-run-mount
[Revert #26825] cli: remove `--mount` from `docker run`
Upstream-commit: caaa52c124539acb396c0b711ab95bc7ed459540
Component: engine
2016-11-30 11:56:42 -08:00
c46ac53d0a Remove hostname validation as it seems to break users
Validation is still done by swarmkit on the service side.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: ef39256dfb711f8382a5c021b85d6c7d613282b0
Component: engine
2016-11-30 19:22:07 +01:00
45d64c96a6 Fix out-of-band vol delete+create for same driver
Fix issue where out-of-band deletions and then a `docker volume create`
on the same driver caused volume to not be re-created in the driver but
return as created since it was stored in the cache.

Previous fix only worked if the driver names did not match.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d8ce4a6e108f4f870228912f105eed8218e087e4
Component: engine
2016-11-30 12:19:03 -05:00
741407c1aa Merge pull request #28725 from Microsoft/jjh/builderenvcaseinsensitive
Windows: Builder case insensitive env
Upstream-commit: 4a0e295cd1702c36d883b0d2e52c039f407097a2
Component: engine
2016-11-30 08:33:29 -05:00
cfe1223c49 correct the http return code of secret remove
Signed-off-by: erxian <evelynhsu21@gmail.com>
Upstream-commit: 21768933fbf61d1481e303ee7a3a5ecc57fc3838
Component: engine
2016-11-30 19:45:45 +08:00
a0d0f09c52 Merge pull request #28566 from cyli/more-swarm-encryption-tests
Add extra swarm lock/unlock tests that ensure that all the managers are locked with the same key
Upstream-commit: 1b6352996aa71e678ac2c84324f785c424090777
Component: engine
2016-11-29 18:32:32 -08:00
5acbd9b212 Run overlay attachable test on a single daemon
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: e42d1bb4b229b825a388490f24885f06a7afc401
Component: engine
2016-11-29 14:05:12 -08:00
c0fecf9b2a Merge pull request #28721 from dongluochen/attachable_network
Fix network attachable option
Upstream-commit: 4fae94f6637bfbbeba809f930f2ecf1e36748882
Component: engine
2016-11-29 11:04:49 -08:00
7517d3b3a5 Merge pull request #28717 from yongtang/28684-duplicate-docker-plugin-create
Fix issue caused by duplicate `docker plugin create` with same names
Upstream-commit: 82b35dd997f46ff430cb084c962089c40f5bc96a
Component: engine
2016-11-29 08:22:40 -08:00
0e6be54ce9 Fix network attachable option.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: abcb699ad175859ee192388c001f55df5f88e8cd
Component: engine
2016-11-28 16:54:56 -08:00
fc0f081a42 Reject unspecified advertise addr on swarm init
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: eeac8719466dbc42de7a9919d4f549863944aa19
Component: engine
2016-11-28 15:44:06 -08:00
c06179cb55 Fix issue caused by duplicate docker plugin create with same names
This fix tries to fix the issue raised in 28684:
1. Duplicate plugin create with the same name will override the old plugin reference
2. In case an error happens in the middle of the plugin creation, plugin directories
   in `/var/lib/docker/plugins` are not cleaned up.

This fix update the plugin store so that `Add()` will return an error if a plugin
with the same name already exist.

This fix also will clean up the directory in `/var/lib/docker/plugins` in case
an error happens in the middle of the plugin creation.

This fix fixes 28684.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 662d456928e47162a3af5931356cb05b6a3f9918
Component: engine
2016-11-28 12:37:49 -08:00
52fcb6e953 Align output of docker version again
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: dfeaf7a959cf619f5460c88e7bc1fe5ce40d50a7
Component: engine
2016-11-28 11:38:58 -08:00
f53ec9c3d1 Windows: Builder case insensitive env
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 49f392ff6b528d571eac538f5365bd51c4c83e5c
Component: engine
2016-11-28 10:30:45 -08:00
ae5687c23e Merge pull request #28514 from Microsoft/jjh/workdir
Refix COPY file . after WORKDIR (now always created)
Upstream-commit: 937027a0cbaf256ca32664d8d64d1c8eda16eaa6
Component: engine
2016-11-28 12:58:17 -05:00
871ee3d12b Revert "Add -a option to service/node ps"
This reverts commit 139fff2bf0ebe12b61871ba8ec8be8d51c2338db.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: eb55d03f3c321e31c8da993233b2679f47d5b4e1
Component: engine
2016-11-28 18:08:45 +01:00
89a9795d2b Merge pull request #28710 from miaoyq/eliminate-redundant-parameters
Eliminate the redundant parameter
Upstream-commit: 76a0dfaa8e77fc04d97357fcb999d669b6485db2
Component: engine
2016-11-26 14:37:17 +01:00
8f7e98f07f cli: remove --mount from docker run
This commit reverts 273eeb813c1db0f42c2ad5e053972eeb00907568 (#26825).
For the discussion so far, please refer to #28527.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: e6d9b7de649c0b3b59c7d9b698af1c58f6dce289
Component: engine
2016-11-26 04:55:28 +00:00