Commit Graph

244 Commits

Author SHA1 Message Date
cd96217228 Merge pull request #28243 from andrewhsu/change-context
use "golang.org/x/net/context" instead of "context"
Upstream-commit: 02918908af98d95652668f015275747907e78c68
Component: engine
2016-11-10 19:13:56 +01: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
136327ac5a use "golang.org/x/net/context" instead of "context"
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 2de83a430d5d3f82346cafa15f4bd1f7c47dde12
Component: engine
2016-11-10 08:23:19 -08: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
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
be247ad0fb Merge pull request #28224 from vieux/fix_manpages
fix manpages
Upstream-commit: d286734b41cf3811021c5347412b8094638c0adc
Component: engine
2016-11-09 23:22:30 -08:00
62ec0be101 Merge pull request #28164 from anusha-ragunathan/plugin-build
Add plugin create functionality.
Upstream-commit: 28a1ea342d1f227664ad30ffd05eaaab8c9ef93e
Component: engine
2016-11-09 17:49:51 -08:00
c27b5695c1 fix manpages
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 8e701f0bd7f6be30d8b23010b2a7daf8e15981ec
Component: engine
2016-11-09 17:11:14 -08:00
2394a196a1 Add unlock key rotation
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: a6030a50c95cd4e8b39b5f4d5705bb23ebdb28c5
Component: engine
2016-11-09 16:09:01 -08:00
0827ead1b6 Revise swarm init/update flags, add unlocking capability
- Neither swarm init or swarm update should take an unlock key
- Add an autolock flag to turn on autolock
- Make the necessary docker api changes
- Add SwarmGetUnlockKey API call and use it when turning on autolock
- Add swarm unlock-key subcommand

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 0f9fc54df9274327ed22f4e07f0981a648e0278a
Component: engine
2016-11-09 16:09:00 -08:00
2874df7efa Add support for swarm init lock and swarm unlock
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b4a667c8c4f536445d35e8914a58e8c749f16ea6
Component: engine
2016-11-09 16:09:00 -08:00
948055475e Add plugin create functionality.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 5b6e1bc9e551ba56b44c3f409fd5d48f8a54ce1d
Component: engine
2016-11-09 15:23:03 -08: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
807eb50cc6 use human readable units when listing secrets
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 880e8be1eea086ee83e5ad22f953696365c5b799
Component: engine
2016-11-09 14:27:46 -05:00
bd20a72add more review updates
- return err instead of wrap for update secret
- add omitempty for data in secret spec

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 427c70d97779566b2b3ea3a9141bb9bf3dd05dd8
Component: engine
2016-11-09 14:27:45 -05:00
5cd25dda5d SecretRequestOptions -> SecretRequestOption
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 5b2230a38b357a3e2725fc56be9c07c01fd1203e
Component: engine
2016-11-09 14:27:45 -05:00
19e0a8c065 support labels for secrets upon creation; review updates
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 583c013a8735031f4e5090bb1699effb64daf950
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
e093728442 review updates
- use Filters instead of Filter for secret list
- UID, GID -> string
- getSecrets -> getSecretsByName
- updated test case for secrets with better source
- use golang.org/x/context instead of context
- for grpc conversion allocate with make
- check for nil with task.Spec.GetContainer()

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: b2e4c7f3b5b30fc6940768ec41836d708a48b463
Component: engine
2016-11-09 14:27:45 -05:00
3e01794690 move secretopt to opts pkg
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: c00138748daeef52d353dda66c7b89322b7708fc
Component: engine
2016-11-09 14:27:45 -05:00
c28de44f7a secrets: enable secret inspect and rm by secret name
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: e0e65b9a3baab6bb3f35eddb6ed3d52654184029
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
e9ea5a5560 update to support new target in swarmkit
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 88dea0e06e0e94a8ab4cb5fe852e26bff309261a
Component: engine
2016-11-09 14:27:44 -05:00
f3ba87649b simplify secret lookup on service create
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: dce2afbd81945056aa955079fac04e28ab96e703
Component: engine
2016-11-09 14:27:44 -05:00
994d3dafef support the same secret with different targets on service create
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 111e497dc6be6a1211e446d6a91bfb6e1c14e4c2
Component: engine
2016-11-09 14:27:44 -05:00
a28c910916 add secret support for service update
- add nosuid and noexec to tmpfs

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 00237a96249739dbf426d81672a904e9f4c5e702
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
9dbbc071d5 secrets: secret management for swarm
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

wip: use tmpfs for swarm secrets

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

wip: inject secrets from swarm secret store

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

secrets: use secret names in cli for service create

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

switch to use mounts instead of volumes

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

vendor: use ehazlett swarmkit

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

secrets: finish secret update

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 3716ec25b423d8ff7dfa231a7b3cf0154726ed37
Component: engine
2016-11-09 14:27:43 -05:00
6b90362056 Merge pull request #28196 from allencloud/add-short-flag-for-force
add short flag for force
Upstream-commit: fe77fc5bf11157391c937748b68fffe1c758c60a
Component: engine
2016-11-09 18:11:58 +01:00
4a16b71589 Merge pull request #28163 from yongtang/11082016-help-ptr
Remove `-ptr` from the help output of `service create`
Upstream-commit: 01f5c52a591d4d27b45db81f2899c18f68c76a66
Component: engine
2016-11-09 17:53:06 +01:00
9c6b6dc40c Merge pull request #27947 from milindchawre/fix_27798
Fixes #27798 : Update help for --blkio-weight parameter
Upstream-commit: 4f7083a04f1ad7ce84a30a412ee374c2a92afc95
Component: engine
2016-11-09 15:35:38 +01:00
0993a3cf62 Merge pull request #28201 from yuexiao-wang/test-func
Update function name for TestCalculBlockIO
Upstream-commit: 103641f5c6f1afee9c8f3d44d15f21ac950bc015
Component: engine
2016-11-09 15:34:25 +01:00
f06ad7a360 Remove -ptr from the help output of service create
This fix is based on the comment:
https://github.com/docker/docker/pull/28147#discussion_r86996347

Previously the output string of the `DurationOpt` is `duration-ptr`
and `Uint64Opt` is `uint64-ptr`. While it is clear to developers,
for a normal user `-ptr` might not be very informative.

On the other hand, the default value of `DurationOpt` and `Uint64Opt`
has already been quite informative: `none`. That means if no flag
provided, the value will be treated as none.
(like a ptr with nil as the default)

For that reason this fix removes the `-ptr`.

Also, the output in the docs of `service create` has been quite
out-of-sync with the true output. So this fix updates the docs
to have the most up-to-date help output of `service create --help`.

This fix is related to #28147.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: beafc7c7d97e76135cfa4e17980d274be7a3ff5e
Component: engine
2016-11-09 06:30:10 -08:00
3cf5c6ee9d Fixes #24083 : Improving cli help for flags with duration option
Signed-off-by: milindchawre <milindchawre@gmail.com>
Upstream-commit: ecb59a2283be35b2dba2951ed1542afe4e896d8a
Component: engine
2016-11-09 12:17:28 +00:00
a66c2a4dd3 Update function name for TestCalculBlockIO
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 5ffe496a2233a0620099906e1cf2de24d5dfb56d
Component: engine
2016-11-09 17:43:10 +08:00
7198214971 Merge pull request #27997 from aaronlehmann/raft-options
cli: Add options for Raft snapshotting
Upstream-commit: 29a38a4fe8caebbad9ea72ca0d4b4fc80118df3c
Component: engine
2016-11-09 10:19:45 +01:00
0d66e8de2c add short flag for force
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 955c35b6a62f26e7ca36fa6378110ce7af8916a4
Component: engine
2016-11-09 14:40:47 +08: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
fc16f27149 Merge pull request #28088 from aluzzardi/service-ps-task-resolution
service ps: Truncate Task IDs
Upstream-commit: 383a2f046b16c9f79d2fb800844e6550cc784871
Component: engine
2016-11-08 17:44:15 -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
e52aa72e3a service ps: Truncate Task IDs
- Refactored to move resolution code into the idresolver
- Made `ps` output more bearable by shortening service IDs in task names

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: d296f7a391b54cc5a0b0a80a9d735e7e47a96c86
Component: engine
2016-11-08 16:17:15 -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
f7b4103706 cli: Add options for Raft snapshotting
Add the following options to "swarm init" and "swarm update":

- --max-snapshots: Retain this many old Raft snapshots in addition
  to the latest one

- --snapshot-interval: Number of log entries between Raft snapshots

These options already existed in SwarmKit and the Docker API but were
never exposed in the CLI. I'm adding them here to fix this oversight.

--max-snapshots may be useful for debugging purposes and more
conservative users who want to store rolling backups of old versions of
the Raft state.

--snapshot-interval is most useful for performance tuning. The default
value of 10000 may not be ideal for some setups.

There is also a LogEntriesForSlowFollowers option that is not exposed. I
decided not to expose it along with these others because I don't think
it's generally useful (and I'm not sure what I would call the CLI flag).
But if people want, I can expose it for the sake of completeness.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 842d11f44cede2d7e9488e54f8ac8de89d8f4cd4
Component: engine
2016-11-08 13:14:01 -08:00
05466ddbca Merge pull request #28147 from yongtang/27567-service-update-docs-plural-form
Change to plural forms for help output of `docker service update`
Upstream-commit: fb9aca312802870add3a88d45d7a1c45f7fab327
Component: engine
2016-11-08 11:14:40 -08:00
5433abf008 Merge pull request #27710 from allencloud/show-num-for-global-service-in-service-ls
support show numbers of global service in service ls command
Upstream-commit: a70b1d74a040e2c17bba1fe553ccbd293a64703a
Component: engine
2016-11-08 18:43:53 +01:00
533d6e45ea Change to plural forms for help output of docker service update
This fix is based on the comment in
https://github.com/docker/docker/pull/27567#discussion_r86910604

Basically, in the help output of `docker service update`, the `--xxx-add`
flags typically have plural forms while `--xxx-rm` flags have singular
forms.

This fix updates the help output for consistency.

This fix also updates the related docs in `service_update.md`.
The help output in `service_update.md` has been quite out-of-sync
with the actual output so this fix replaces the output with the
most up-to-date output.

This fix is related to #27567.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 1b42d9d0db4f1eadf0a70424ff829bb3346f7bd9
Component: engine
2016-11-08 05:53:56 -08:00