Commit Graph

4092 Commits

Author SHA1 Message Date
ca36766d89 Merge pull request #27998 from dnephin/compose-on-swarm
Support `docker stack deploy` from a Compose file
Upstream-commit: 750d634d62689bf45ecbb4ae34094ad6a5a7fce5
Component: engine
2016-11-10 17:59:57 -08:00
3baa399d95 Merge pull request #28226 from vieux/exit_exp_plugin
move plugins out of experimental
Upstream-commit: acd6e0d9b25c9c8ee4e9a39a69a2a2ac8c1125ec
Component: engine
2016-11-10 17:30:54 -08:00
3213314d62 Merge pull request #28031 from yongtang/27902-extra-hosts
Add flag `--host` to `service create` and `--host-add/rm` to `service update`
Upstream-commit: bed96ce922da5fa9df98b826ff0e4ad4bf375a31
Component: engine
2016-11-10 16:55:29 -08:00
fadae43674 move plugins out of experimental
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: c410222e42fb9195909390337bc129c6481e2453
Component: engine
2016-11-10 15:51:32 -08:00
0d1faa11e0 Merge pull request #28089 from aluzzardi/service-logs
service logs
Upstream-commit: 5f9fe54b35cf64181c62a8faec8651c6a25fcc95
Component: engine
2016-11-10 15:13:41 -08:00
1039b39798 Merge pull request #27116 from cpuguy83/22564_fix_volume_unmount
Fix uneccessary calls to `volume.Unmount()`
Upstream-commit: f3864bcd3406c963395f6de9cdc7172c0daa1f5d
Component: engine
2016-11-10 13:48:44 -08:00
050cbb7ecd cli: docker service logs support
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: c7995fdc7760c23cdbed0fa4ca229517c71dba82
Component: engine
2016-11-10 13:46:02 -08:00
3c13ce07e7 Fix an issue in the swarm unlock-key rotate test where we were never updating the
previous generation unlock key.

Signed-off-by: cyli <cyli@twistedmatrix.com>
Upstream-commit: 81f3e699c30fe412de0fa48dfa2885181f5d5002
Component: engine
2016-11-10 11:48:39 -08:00
1689aa276d Fix uneccessary calls to volume.Unmount()
Fixes #22564

When an error occurs on mount, there should not be any call later to
unmount. This can throw off refcounting in the underlying driver
unexpectedly.

Consider these two cases:

```
$ docker run -v foo:/bar busybox true
```

```
$ docker run -v foo:/bar -w /foo busybox true
```

In the first case, if mounting `foo` fails, the volume driver will not
get a call to unmount (this is the incorrect behavior).

In the second case, the volume driver will not get a call to unmount
(correct behavior).

This occurs because in the first case, `/bar` does not exist in the
container, and as such there is no call to `volume.Mount()` during the
`create` phase. It will error out during the `start` phase.

In the second case `/bar` is created before dealing with the volume
because of the `-w`. Because of this, when the volume is being setup
docker will try to copy the image path contents in the volume, in which
case it will attempt to mount the volume and fail. This happens during
the `create` phase. This makes it so the container will not be created
(or at least fully created) and the user gets the error on `create`
instead of `start`. The error handling is different in these two phases.

Changed to only send `unmount` if the volume is mounted.

While investigating the cause of the reported issue I found some odd
behavior in unmount calls so I've cleaned those up a bit here as well.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 9a2d0bc3adc0c21c82cd1974be45ea0449f9f224
Component: engine
2016-11-10 14:04:08 -05:00
6e2afbaf59 Add flag --host to service create and --host-add/--host-rm to service update
This fix tries to address 27902 by adding a flag `--host`
to `docker service create` and `--host-add/--host-rm` to
`docker service update`, so that it is possible to
specify extra `host:ip` settings in `/etc/hosts`.

This fix adds `Hosts` in swarmkit's `ContainerSpec` so that it
is possible to specify extra hosts during service creation.

Related docs has been updated.

An integration test has been added.

This fix fixes 27902.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: ea9a23ccdbd3a861e4cfa3441482b448fd1c17a5
Component: engine
2016-11-10 10:20:24 -08:00
7b76246b62 Merge pull request #28148 from vieux/rename_plugin_manifest
rename plugin manifest
Upstream-commit: 89cc35447d96f6dbd5503d76883c33742076ca10
Component: engine
2016-11-10 09:47:15 -08:00
80cefc6683 Restore stack deploy integration test with dab
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: bd8de8d8be9e367af9e045d0fdead4462fed490c
Component: engine
2016-11-10 11:28:19 -05:00
3a6b62c164 Add integration test for stack deploy.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: eefccc25c5cda96947978c503d5764aa48aacd7d
Component: engine
2016-11-10 11:28:18 -05:00
8bb2169ed5 Merge pull request #28186 from yongtang/27567-follow-up-dns-options
Add `--dns-option` to `docker run` and hide `--dns-opt`
Upstream-commit: 33af4dd505aac709d607d26fc19a16d3dffdd66e
Component: engine
2016-11-10 16:20:17 +01:00
becc27c95f Merge pull request #28220 from tophj-ibm/test-killing-with-stop-signals
[integration-cli] fix race condition in kill tests
Upstream-commit: 7df0ed49d7f6e0cbcdef39dbae8900f882d785cb
Component: engine
2016-11-10 10:51:38 +01:00
6949dd3368 rename plugin manifest
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 49ca91fbebbea80587ce3c0814bba3b41cce14a0
Component: engine
2016-11-10 00:09:23 -08:00
3d84cacc07 Merge pull request #28138 from dmcgowan/handle-overlay2-copy-up-bug
Use naive diff for overlay2 when opaque copy up bug present
Upstream-commit: a3b0ade34685f4f25875a0a485814d1acf373af3
Component: engine
2016-11-09 22:29:19 -05:00
486562b02a Merge pull request #27967 from aaronlehmann/encryption
Encryption at rest of manager keys and raft data
Upstream-commit: 18a07f599127f9aa6743de372f0384ffe31fd872
Component: engine
2016-11-09 17:49:26 -08:00
f3d621f988 Lock/unlock integration tests
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: c3c70c4bcd775d20e2d4a4989733f7ad6b2b90b2
Component: engine
2016-11-09 16:09:01 -08:00
6a03ee3d4e Add integration tests for encrypted swarm
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 8b1f72ad44f03d4786cb3e881b480c94a143885f
Component: engine
2016-11-09 16:09:00 -08:00
75a25a369f Merge pull request #27915 from rhvgoyal/graph-create-opts
Pass all graphdriver create() parameters in a struct
Upstream-commit: f11ac963af5a94ae0c36aaa2a67a671c6a313e59
Component: engine
2016-11-10 01:07:41 +01:00
174f2a0d72 Merge pull request #28025 from vdemeester/swarm-mode-templating
Add support for swarm mode templating
Upstream-commit: 8ffd1a370c447db92a67d17f900ccd453dbcedee
Component: engine
2016-11-09 15:57:52 -08:00
9bafbfb322 Add restart policy to restart policy tests
Fixes two tests that tested containers restart policy without
actually having a restart policy

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: de1dad7074c84f56dd8f29bca0de29ba1e4ae6ce
Component: engine
2016-11-09 17:13:42 -06:00
4d951615ba [integration-cli] fix race condition in kill tests
Fixes a race condition in the kill tests where the container
would be killed but inspected before it's state changed. Fixes
this by waiting for a state change instead.

Signed-off-by: Christopher Jones <tophj@linux.vnet.ibm.com>
Upstream-commit: ff42a1ab5348944c6d675575b00959b87b2c4032
Component: engine
2016-11-09 17:00:01 -06:00
9549c6b9d6 Add support for swarm mode templating
Wire templating support of swarmkit for the engine, in order to be used
through services.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6212ea669b4e92b3aa3985857f827ee9b95271fd
Component: engine
2016-11-09 23:28:06 +01:00
5656296e4b Use naive diff for overlay2 when opaque copy up bug present
When running on a kernel which is not patched for the copy up bug
overlay2 will use the naive diff driver.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 64b43ed5ecf3e805bd72bd6a9493c8c5d08478aa
Component: engine
2016-11-09 13:42:10 -08:00
459e915b2e Pass all graphdriver create() parameters in a struct
This allows for easy extension of adding more parameters to existing
parameters list. Otherwise adding a single parameter changes code
at so many places.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: b937aa8e6968d805527d163e6f477d496ceb88d7
Component: engine
2016-11-09 15:59:58 -05:00
a8a11f6c62 Add --dns-option to docker run and hide --dns-opt
This fix is a follow up to #27567 based on:
https://github.com/docker/docker/pull/27567#issuecomment-259295055

In #27567, `--dns-options` has been added to `service create/update`,
together with `--dns` and `--dns-search`. The `--dns-opt` was used
in `docker run`.

This fix add `--dns-option` (not `--dns-options`) to `docker run/create`, and hide
`--dns-opt`. It is still possible to use `--dns-opt` with
`docker run/create`, though it will not show up in help output.

This fix change `--dns-options`to --dns-option` for `docker service create`
and `docker service update`.

This fix also updates the docs and bash/zsh completion scripts.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9b6b3c2076911ea0a510548943180ac9d1b8c286
Component: engine
2016-11-09 12:13:25 -08:00
f6d1323726 add integration tests for secret create with labels
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: e077f701dbd0cda8eaf4c96628e145c2cf450995
Component: engine
2016-11-09 14:27:45 -05:00
d31e5eafbe secrets: support simple syntax --secret foo
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: a257f674ba22d325e7ad59541723c3ee4e9adc27
Component: engine
2016-11-09 14:27:45 -05:00
9c2b1fd34a secrets: use explicit format when using secrets
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 2adbdcdf5a83b45b4e191413d3aa14158535085b
Component: engine
2016-11-09 14:27:44 -05:00
6984dffbb5 update tests for service create and update
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: ca6b6535519881357c9e3bba5fe0d8965ce8077c
Component: engine
2016-11-09 14:27:44 -05:00
da6add7ce9 secrets: add service create and update integration tests
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 76b33fdb99a6395670b8b466a5ef65a8b928be94
Component: engine
2016-11-09 14:27:44 -05:00
854a5e1eb7 secrets: add secret create and delete integration tests
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: e63dc5cde4c0dd52c3a54bb007259a4b8878b7df
Component: engine
2016-11-09 14:27:44 -05:00
848c015ac1 more review updates
- use /secrets for swarm secret create route
- do not specify omitempty for secret and secret reference
- simplify lookup for secret ids
- do not use pointer for secret grpc conversion

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 189f89301e0abfee32447f2ca23dacd3a96de06d
Component: engine
2016-11-09 14:27:43 -05:00
dde21cf7dc review changes
- fix lint issues
- use errors pkg for wrapping errors
- cleanup on error when setting up secrets mount
- fix erroneous import
- remove unneeded switch for secret reference mode
- return single mount for secrets instead of slice

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 857e60c2f943a09e3ec0ac0f236821b797935900
Component: engine
2016-11-09 14:27:43 -05:00
72ae55dd14 Merge pull request #28037 from crosbymichael/tini
Replace grimes with tini for default init shipped in Docker
Upstream-commit: 93e837d1d2d3a24b0219ccadc1fdf170d242c137
Component: engine
2016-11-09 09:29:42 -05:00
fef442cb37 Merge pull request #28098 from yongtang/25099-oom_score_adj-empty-env
Fix `/proc/<pid>/oom_score_adj: invalid argument` error caused by empty env name
Upstream-commit: c025049c27c2cc8a6f1f978769c89a1fdf07a6f3
Component: engine
2016-11-09 10:39:18 +01:00
0fd78d838a Merge pull request #27745 from vieux/cli_backward_compose_api
allow client to talk to an older server
Upstream-commit: d3c780bb90cb5a087fdbffbb8be14fa5eaacca10
Component: engine
2016-11-08 18:27:23 -08:00
cc2d08fb86 Merge pull request #27567 from yongtang/24391-dns-setting
Add custom DNS settings to service definition
Upstream-commit: 462e57f05eba94cacad2c5e1383d94baf8fe090b
Component: engine
2016-11-08 17:43:00 -08:00
5a46073d11 Merge pull request #28086 from vieux/delete_rootfs_plugin
delete plugin rootfs on `docker plugin rm`
Upstream-commit: 4b63ad33ec77dbf15879da8ce8a7870d58f562bd
Component: engine
2016-11-08 17:03:01 -08:00
df125f380f Merge pull request #27992 from Microsoft/jjh/minapitoinfo
Adds `MinAPIVersion` to docker version
Upstream-commit: 2d4203222574623b10d94817b9959a08698f516b
Component: engine
2016-11-08 15:49:33 -08:00
647428d26f Add custom DNS settings to service update
This fix adds `--dns-add`, `--dns-rm`, `--dns-opt-add`, `--dns-opt-rm`,
`--dns-search-add` and `--dns-search-rm` to `service update`.

An integration test and a unit test have been added to cover the changes in this fix.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: a39c0cf00780c021e98f638ab7edf151a8adb789
Component: engine
2016-11-08 15:41:32 -08:00
6fb775ea79 Add custom DNS settings to service definition
This fix tries to fix the issue raised in 24391 about allowing
custom DNS settings to service definition.

This fix adds `DNSConfig` (`Nameservers`, `Options`, `Search`) to
service definition, as well as `--dns`, `--dns-opt`, and `dns-search`
to `service create`.

An integration test has been added to cover the changes in this fix.

This fix fixes 24391.

A PR in swarmkit will be created separately.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9e8adbecf505620a1cb3a840189b59450493a00b
Component: engine
2016-11-08 15:41:32 -08:00
08da55efb1 Merge pull request #28142 from vieux/plugin_install_args
support settings in docker plugins install
Upstream-commit: c33fb1013d9a06c0efd5f29efa2aaa5a412476f2
Component: engine
2016-11-08 15:05:39 -08:00
f7a65041fc Convert err description to lower
Convert this to lower before checking the message of the error.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 47637b49a0fbd62a25702859f0993666c63ff562
Component: engine
2016-11-08 14:42:54 -08:00
64d7644ec8 Replace grimes with tini
There is no reason to duplicate efforts and tini is well built and
better than grimes.  It is a much stronger option for the default init
and @krallin has done a great job maintaining it and helping make
changes so that it will work with Docker.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: d58b47623b252803f5cd12f6d9ca584d1587ab22
Component: engine
2016-11-08 14:42:54 -08:00
dc4e39cec4 Merge pull request #28130 from tophj-ibm/change-jq-syntax-for-old-version-support
[integration-cli] changes syntax to support older version of jq
Upstream-commit: 3a5a0ef1d4df99452da3f21955030abaf29a2642
Component: engine
2016-11-08 14:00:59 +00:00
d0ebaa81e8 always add but hide experimental cmds and flags
Signed-off-by: Victor Vieux <vieux@docker.com>

update cobra and use Tags

Signed-off-by: Victor Vieux <vieux@docker.com>

allow client to talk to an older server

Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: e98e4a71110fd33852bb755a9b8b4ebc9df904db
Component: engine
2016-11-08 04:55:27 -08:00
2153863109 delete plugin rootfs on plugin rm
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 586b7cc19ef289b0f60a859ca75ec6a9eb97120d
Component: engine
2016-11-08 03:30:37 -08:00