Commit Graph

424 Commits

Author SHA1 Message Date
Vincent Demeester 1318c8dcb4 Merge pull request #28445 from cpuguy83/28439_fix_client_rm_on_old_daemons
Handle `run --rm` against older daemons on the cli
2016-11-22 14:25:03 +01:00
Vincent Demeester 7d0f584f54 Merge pull request #28659 from xuzhenglun/master
bugfix: incorrect ErrConnectFailed Comparison
2016-11-22 13:01:05 +01:00
Reficul 14770269e8 fix incorrect ErrConnectFailed comparison
Signed-off-by: Reficul <xuzhenglun@gmail.com>
2016-11-22 10:42:55 +08:00
Brian Goff 4632a029d9 Handle `run --rm` against older daemons on the cli
For previous versions of Docker, `--rm` was handled client side, as such
there was no support in the daemon for it.
Now it is handled daemon side, but we still need to handle the case of a
newer client talking to an older daemon.

Falls back to client-side removal when the daemon does not support it.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-11-21 20:39:04 -05:00
Victor Vieux 23c399dd10 Merge pull request #28677 from dnephin/remove-deploy-experimental
Move `docker stack` out of experimental
2016-11-21 14:33:35 -08:00
Victor Vieux 07c896b18e Merge pull request #28328 from aaronlehmann/duration-opts
cli: Add valid suffixes for remaining duration options
2016-11-21 14:03:00 -08:00
Victor Vieux 2d66496a2b Merge pull request #28504 from runcom/fix-info-route-secopt
api: types: do not remove old SecurityOptions struct
2016-11-21 13:55:07 -08:00
Anusha Ragunathan 752a9a7c56 Add HTTP client timeout.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-11-21 13:11:40 -08:00
Vincent Demeester 2d7ef04a57 Merge pull request #28556 from ehazlett/container-secret-store
Fix target reference secrets and container secret store
2016-11-21 21:40:01 +01:00
Daniel Nephin e1b5bdd768 Move docker stack out of experimental
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-21 15:30:25 -05:00
Vincent Demeester 2638cd6f3d Do not panic if network is nil
network is `nil` if the following case:

```
services:
  foo:
    image: nginx
    networks:
      mynetwork:
```

It's a valid compose so we should not panic.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-11-21 17:59:29 +01:00
Vincent Demeester 89703a0196 Merge pull request #28539 from nishanttotla/pin-image-digest-ux
Suppressing digest for docker service ls/ps
2016-11-21 14:06:37 +01:00
Vincent Demeester 4e343ae989 Merge pull request #28294 from vdemeester/compose-swarm-healthcheck
Add support for healthcheck in compose to swarm
2016-11-21 10:28:37 +01:00
Antonio Murdaca 123d33d81d api: types: keep info.SecurityOptions a string slice
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-11-19 13:21:16 +01:00
Sebastiaan van Stijn 82804cc8e5 swap position of "host" and "ip"
the service definition uses the format as defined
in  http://man7.org/linux/man-pages/man5/hosts.5.html
(IP_address canonical_hostname [aliases...])

This format is the _reverse_ of the format used in
the container API.

Commit f32869d956eb175f88fd0b16992d2377d8eae79c
inadvertently used the incorrect order.

This fixes the order, and correctly sets it to;

    IP-Address hostname

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-11-18 22:04:27 +01:00
Nishant Totla 5f1209bf4b Suppressing digest for docker service ls/ps
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2016-11-18 09:39:34 -08:00
Aaron Lehmann b866fa77f4 Return warnings from service create and service update when digest pinning fails
Modify the service update and create APIs to return optional warning
messages as part of the response. Populate these messages with an
informative reason when digest resolution fails.

This is a small API change, but significantly improves the UX. The user
can now get immediate feedback when they've specified a nonexistent
image or unreachable registry.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-11-18 09:31:31 -08:00
Daniel Nephin c682f10a8f Default parallelism to 1.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-18 16:17:08 +01:00
Vincent Demeester e21f4f9996 Add support for healthcheck in composefile v3
`docker stack deploy` now supports a composefile v3 format that have a
healthcheck.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-11-18 15:09:13 +01:00
Vincent Demeester dd8712c634 Merge pull request #28354 from ripcurld00d/tag_creation
Change the docker-tag usage text to be clearer
2016-11-18 13:02:40 +01:00
Boaz Shuster cc36bf62ef Change the docker-tag usage text to be clearer
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2016-11-18 10:34:02 +02:00
Michael Crosby e59facceb7 Merge pull request #28347 from yongtang/28339-ignore-unkwnon-field-template
Use `map[string]bool` for `preProcessor` to ignore unknown fields
2016-11-17 15:13:02 -08:00
Tõnis Tiigi 4e4b58fbcb Merge pull request #28554 from vieux/showhelp
refactor help func in CLI
2016-11-17 14:27:26 -08:00
Evan Hazlett bc542f365c do not force target type for secret references
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

use secret store interface instead of embedded secret data into container

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-17 15:49:02 -05:00
Brian Goff a7987ef105 Merge pull request #28538 from yongtang/11162016-Log-Logf-fix
Fix several issues with `go vet` and `gofmt -s`
2016-11-17 15:21:22 -05:00
Victor Vieux 55908f8a82 refactor help func in CLI
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-11-17 10:54:10 -08:00
Yong Tang d691bce8c9 Fix several issues with `go vet` and `go fmt`
For some reason, `go vet` and `go fmt` validate does not capture
several issues.

The following was the output of `go vet`:
```
ubuntu@ubuntu:~/docker$ go vet ./... 2>&1 | grep -v ^vendor | grep -v '^exit status 1$'
cli/command/formatter/container_test.go:393: possible formatting directive in Log call
volume/volume_test.go:257: arg mp.RW for printf verb %s of wrong type: bool
```

The following was the output of `go fmt -s`:
```
ubuntu@ubuntu:~/docker$ gofmt -s -l . | grep -v ^vendor
cli/command/stack/list.go
daemon/commit.go
```

Fixed above issues with `go vet` and `go fmt -s`

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-17 06:31:28 -08:00
Yong Tang 4488d9f9fb Fix crash caused by `docker service inspect --pretty`
This fix tries to fix the crash caused by `docker service inspect --pretty`,
by performing necessary nil pointer check.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-16 17:26:03 -08:00
Yong Tang 3c56459801 Use `map[string]bool` for `preProcessor` to ignore unknwon field
This fix is an attempt to address the issue raised in 28339. In
`docker ps`, the formatter needs to expose all fields of `types.Container`
to `preProcessor` so that template could be executed.

This direct exposing is unreliable and could cause issues as user may incorrectly
assume all fields in `types.Container` will be available for templating.

However, the purpose of `preProcessor` is to only find out if `.Size`
is defined (so that opts.size could be set accordingly).

This fix defines `preProcessor` as `map[string]bool` with a func `Size()`.
In this way, any unknown fields will be ignored.

This fix adds several test cases to the existing `TestBuildContainerListOptions`.

This fix fixes 28339.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-16 13:23:47 -08:00
Sebastiaan van Stijn 91aed2e673 Merge pull request #28272 from Microsoft/jjh/sequentialscan2
Windows: Perf: Use sequential file access
2016-11-16 00:47:19 +01:00
Sebastiaan van Stijn 66d50e5695 Merge pull request #26868 from Microsoft/jjh/deprecateemail
1.14 deprecation: email from login
2016-11-15 13:08:05 +01:00
John Howard 5723c85b1d Windows: Use sequential file access
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-14 17:41:52 -08:00
Victor Vieux dc2eeb6456 Merge pull request #28340 from cpuguy83/28337_fix_template_opts_ps
Fix issue with missing fields for `ps` template
2016-11-14 14:25:01 -08:00
Anusha Ragunathan f1598f8b82 Add docs for plugin push
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-11-14 09:10:21 -08:00
Brian Goff d3169abc3b Fix issue with missing fields for `ps` template
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-11-12 11:23:21 -05:00
yupeng 0f6af2074c context.Context should be the first parameter of a function
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
2016-11-12 14:14:34 +08:00
Aaron Lehmann 7e7c4eefa4 cli: Add valid suffixes for remaining duration options
A recent PR added `(ns|us|ms|s|m|h)` to the descriptions of some
duration options, but not all. Add it to the remaining options for
consistency.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-11-11 17:44:42 -08:00
John Howard 4088f3bcff Planned 1.13 deprecation: email from login
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-11 17:32:46 -08:00
Vincent Demeester 827b121154 Merge pull request #28306 from ehazlett/service-create-no-secrets
only check secrets for service create if requested
2016-11-11 20:58:40 +01:00
Victor Vieux 460a7e213c Merge pull request #28042 from yongtang/28018-docker-info-swarm-managers
Add information for `Manager Addresses` in the output of `docker info`
2016-11-11 09:30:01 -08:00
Brian Goff 356ff43768 Merge pull request #27872 from vdemeester/images-filter-filters
Add reference filter and deprecated filter param…
2016-11-11 11:24:19 -05:00
Sebastiaan van Stijn 57da27f76c Merge pull request #28297 from vdemeester/compose-swarm-openstdin
Add support for stdin_open in compose to swarm
2016-11-11 17:09:04 +01:00
Yong Tang cd71257cfd Add information for `Manager Addresses` in the output of `docker info`
As is specified in 28018, it would be useful to know the manager's addresses
even in a worker node. This is especially useful when there are many
worker nodes in a big cluster.

The information is available in `info.Swarm.RemoteManagers`.

This fix add the information of `Manager Addresses` to the output
of `docker info`, to explicitly show it.

A test has been added for this fix.

This fix fixes 28018.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-11 07:35:32 -08:00
Evan Hazlett 885c5f1747 only check secrets for service create if requested
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-11 10:07:24 -05:00
Vincent Demeester 3c61af0f76 Add reference filter and deprecated filter param…
… for `docker images`.

This deprecates the `filter` param for the `/images` endpoint and make a
new filter called `reference` to replace it. It does change the CLI
side (still possible to do `docker images busybox:musl`) but changes the
cli code to use the filter instead (so that `docker images --filter
busybox:musl` and `docker images busybox:musl` act the same).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-11-11 15:34:01 +01:00
Vincent Demeester 84a795bf05 Add support for extra_hosts in composefile v3
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-11-11 15:20:02 +01:00
Vincent Demeester f24ff647e1 Add support for stdin_open in composefile v3
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-11-11 15:19:00 +01:00
Vincent Demeester 356421b7da Add support for tty in composefile v3
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-11-11 11:27:21 +01:00
Victor Vieux 19c8941f2f Merge pull request #27955 from mlaventure/runc-docker-info
Add external binaries version to docker info
2016-11-10 21:27:14 -08:00
Tõnis Tiigi 795e487513 Merge pull request #28235 from dmcgowan/fix-registry-authorization-errors
Fix registry authorization errors
2016-11-10 19:39:28 -08:00
Jana Radhakrishnan 148dc157f6 Add support for host port PublishMode in services
Add api/cli support for adding host port PublishMode in services.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-11-10 18:07:55 -08:00
Victor Vieux 7d89ba2d9d Merge pull request #27998 from dnephin/compose-on-swarm
Support `docker stack deploy` from a Compose file
2016-11-10 17:59:57 -08:00
Lei Jitang 005a3037de Merge pull request #28231 from yuexiao-wang/container-exec
Remove redundant parameter and fix typos
2016-11-11 09:55:42 +08:00
Derek McGowan 43bcd982cd Update for distribution vendor
Handle updates to reference package.
Updates for refactoring of challenge manager.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-11-10 17:34:12 -08:00
Victor Vieux 63167f17b0 Merge pull request #28226 from vieux/exit_exp_plugin
move plugins out of experimental
2016-11-10 17:30:54 -08:00
Victor Vieux 32beb80f99 Merge pull request #28031 from yongtang/27902-extra-hosts
Add flag `--host` to `service create` and `--host-add/rm` to `service update`
2016-11-10 16:55:29 -08:00
Victor Vieux f5cea67e33 move plugins out of experimental
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-10 15:51:32 -08:00
Andrea Luzzardi 79e1fd01ce Merge pull request #28089 from aluzzardi/service-logs
service logs
2016-11-10 15:13:41 -08:00
Victor Vieux d04c77bdae Merge pull request #28253 from aaronlehmann/arg-descriptions
cli: Change autolock flag description
2016-11-10 13:59:46 -08:00
Andrea Luzzardi b059cf5286 cli: docker service logs support
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2016-11-10 13:46:02 -08:00
Michael Crosby 6bf79deab5 Merge pull request #27797 from vdemeester/stats-format-names-support
Add support for Names and ID in stats format
2016-11-10 13:26:00 -08:00
Daniel Nephin cb1783590c Implement ipamconfig.subnet and be more explicit about restart policy always.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-10 16:22:31 -05:00
Aaron Lehmann fd5673eeb9 cli: Change autolock flag description
This change incorporates feedback from @thaJeztah in the PR that added
the autolock flag. It changes the descriptions to be different for
"swarm init" and "swarm update" so that the boolean nature so that the
purpose of the flag in both contexts is clearer.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-11-10 12:05:19 -08:00
Yong Tang 6f3ee9c568 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>
2016-11-10 10:20:24 -08:00
Sebastiaan van Stijn 82c10dd9f9 Merge pull request #28243 from andrewhsu/change-context
use "golang.org/x/net/context" instead of "context"
2016-11-10 19:13:56 +01:00
Tibor Vass fb0e903122 Merge pull request #28148 from vieux/rename_plugin_manifest
rename plugin manifest
2016-11-10 09:47:15 -08:00
Daniel Nephin 0333117b88 Handle bind options and volume options
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-10 12:37:17 -05:00
Daniel Nephin 458ffcd2e6 Restore stack deploy integration test with dab
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-10 11:28:19 -05:00
Aanand Prasad 791b687848 Reinstate --bundle-file argument to 'docker deploy'
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-11-10 11:28:18 -05:00
Daniel Nephin d05510d954 Add integration test for stack deploy.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-10 11:28:18 -05:00
Daniel Nephin 3875355a3e Remove bundlefile
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-10 11:28:18 -05:00
Daniel Nephin ef845be6a5 Remove duplication of name mangling.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-10 11:28:18 -05:00
Daniel Nephin d89cb4c62f Always use a default network if no other networks are set.
also add network labels.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-10 11:28:18 -05:00
Daniel Nephin ae8f001829 Send warnings to stderr.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-10 11:28:18 -05:00
Aanand Prasad 25c93d4ebb Default to replicated mode
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-11-10 11:28:18 -05:00
Aanand Prasad dfab8f2bd4 Handle unsupported, deprecated and forbidden properties
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-11-10 11:28:18 -05:00
Daniel Nephin e1b96b6447 Add swarmkit fields to stack service.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-10 11:28:18 -05:00
Aanand Prasad a9fc9b60fe Add support for service-level 'volumes' key
Support volume driver + options
Support external volumes
Support hostname in Compose file

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-11-10 11:28:18 -05:00
Daniel Nephin f702b722d8 Convert deploy to use a compose-file.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-10 11:28:18 -05:00
Andrew Hsu dc32cb6c77 use "golang.org/x/net/context" instead of "context"
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2016-11-10 08:23:19 -08:00
Sebastiaan van Stijn c5fbdc8572 Merge pull request #28186 from yongtang/27567-follow-up-dns-options
Add `--dns-option` to `docker run` and hide `--dns-opt`
2016-11-10 16:20:17 +01:00
Victor Vieux 0ae9598f96 rename plugin manifest
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-10 00:09:23 -08:00
Victor Vieux e876381912 Merge pull request #28224 from vieux/fix_manpages
fix manpages
2016-11-09 23:22:30 -08:00
yuexiao-wang b6fe99530c Remove redundant parameter and fix typos
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-11-10 11:05:31 +08:00
Victor Vieux 1a34843c0c Merge pull request #28164 from anusha-ragunathan/plugin-build
Add plugin create functionality.
2016-11-09 17:49:51 -08:00
Victor Vieux 96c16101dd fix manpages
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-09 17:11:14 -08:00
Aaron Lehmann 65e1e166ee Add unlock key rotation
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-11-09 16:09:01 -08:00
Aaron Lehmann 56b7ad90b1 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>
2016-11-09 16:09:00 -08:00
Tonis Tiigi d006a04357 Add support for swarm init lock and swarm unlock
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-11-09 16:09:00 -08:00
Anusha Ragunathan b825c58ff8 Add plugin create functionality.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-11-09 15:23:03 -08:00
Yong Tang b38ca0f4c3 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>
2016-11-09 12:13:25 -08:00
Evan Hazlett 06666a5a23 use human readable units when listing secrets
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:46 -05:00
Evan Hazlett c7d7b50003 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>
2016-11-09 14:27:45 -05:00
Evan Hazlett 0dc9115006 SecretRequestOptions -> SecretRequestOption
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:45 -05:00
Evan Hazlett 0bda23ec2b support labels for secrets upon creation; review updates
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:45 -05:00
Evan Hazlett b3bbcc1ba6 secrets: support simple syntax --secret foo
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:45 -05:00
Evan Hazlett 9074333957 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>
2016-11-09 14:27:45 -05:00
Evan Hazlett 91c08eab93 move secretopt to opts pkg
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:45 -05:00
Evan Hazlett d22e1a91f6 secrets: enable secret inspect and rm by secret name
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:45 -05:00
Evan Hazlett 15b97a39d7 secrets: use explicit format when using secrets
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:44 -05:00
Evan Hazlett 2b0fa52c09 update to support new target in swarmkit
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:44 -05:00
Evan Hazlett 6bbc35a743 simplify secret lookup on service create
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:44 -05:00
Evan Hazlett ab5f829742 support the same secret with different targets on service create
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:44 -05:00
Evan Hazlett 8554b64b99 add secret support for service update
- add nosuid and noexec to tmpfs

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2016-11-09 14:27:44 -05:00
Evan Hazlett 4e8f1a7dd9 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>
2016-11-09 14:27:43 -05:00
Evan Hazlett 3f9494f1d6 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>
2016-11-09 14:27:43 -05:00
Evan Hazlett 1be644fbcf 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>
2016-11-09 14:27:43 -05:00
Vincent Demeester a11f7b1577 Merge pull request #28196 from allencloud/add-short-flag-for-force
add short flag for force
2016-11-09 18:11:58 +01:00
Sebastiaan van Stijn 45f8ef1668 Merge pull request #28163 from yongtang/11082016-help-ptr
Remove `-ptr` from the help output of `service create`
2016-11-09 17:53:06 +01:00
Kenfe-Mickael Laventure 801167fcec Add expected 3rd party binaries commit ids to info
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-11-09 07:42:44 -08:00
Vincent Demeester 2332454882 Merge pull request #27947 from milindchawre/fix_27798
Fixes #27798 : Update help for --blkio-weight parameter
2016-11-09 15:35:38 +01:00
Vincent Demeester fbbc2d3a6d Merge pull request #28201 from yuexiao-wang/test-func
Update function name for TestCalculBlockIO
2016-11-09 15:34:25 +01:00
Yong Tang 071c746e5e 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>
2016-11-09 06:30:10 -08:00
milindchawre e87262cc2d Fixes #24083 : Improving cli help for flags with duration option
Signed-off-by: milindchawre <milindchawre@gmail.com>
2016-11-09 12:17:28 +00:00
yuexiao-wang 18caa28b66 Update function name for TestCalculBlockIO
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-11-09 17:43:10 +08:00
Vincent Demeester 01de03c7d0 Merge pull request #27997 from aaronlehmann/raft-options
cli: Add options for Raft snapshotting
2016-11-09 10:19:45 +01:00
allencloud 31c5b957e2 add short flag for force
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-11-09 14:40:47 +08:00
Victor Vieux 7fe223b68b Merge pull request #27745 from vieux/cli_backward_compose_api
allow client to talk to an older server
2016-11-08 18:27:23 -08:00
Victor Vieux 3f839084b0 Merge pull request #28088 from aluzzardi/service-ps-task-resolution
service ps: Truncate Task IDs
2016-11-08 17:44:15 -08:00
Victor Vieux f0c8571e5f Merge pull request #27567 from yongtang/24391-dns-setting
Add custom DNS settings to service definition
2016-11-08 17:43:00 -08:00
Andrea Luzzardi 5834d378e0 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>
2016-11-08 16:17:15 -08:00
Victor Vieux 086c47f5ee Merge pull request #27992 from Microsoft/jjh/minapitoinfo
Adds `MinAPIVersion` to docker version
2016-11-08 15:49:33 -08:00
Yong Tang 49e528e18a 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>
2016-11-08 15:41:32 -08:00
Yong Tang f40b12d0f7 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>
2016-11-08 15:41:32 -08:00
Tibor Vass a3d806f0bb Merge pull request #28142 from vieux/plugin_install_args
support settings in docker plugins install
2016-11-08 15:05:39 -08:00
Aaron Lehmann 2af34ea285 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>
2016-11-08 13:14:01 -08:00
Victor Vieux 772dfcbeb1 Merge pull request #28147 from yongtang/27567-service-update-docs-plural-form
Change to plural forms for help output of `docker service update`
2016-11-08 11:14:40 -08:00
Vincent Demeester b04bb19101 Merge pull request #27710 from allencloud/show-num-for-global-service-in-service-ls
support show numbers of global service in service ls command
2016-11-08 18:43:53 +01:00
Yong Tang af8ebf69db 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>
2016-11-08 05:53:56 -08:00
Akihiro Suda c82d5e3c56 Merge pull request #28157 from yuexiao-wang/update-checkpoint
Update for docker checkpoint
2016-11-08 22:36:22 +09:00
Victor Vieux 4ae7176ffb 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>
2016-11-08 04:55:27 -08:00
Vincent Demeester 544b21fb65 Merge pull request #28153 from YuPengZTE/devCtx
context.Context should be the first parameter of a function
2016-11-08 12:40:32 +01:00
yuexiao-wang cd2269a456 Update for docker checkpoint
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-11-08 16:56:29 +08:00
Sebastiaan van Stijn 6edfb7558f Merge pull request #28117 from ping035627/ping035627-patch-1107
Modify to improve code readability
2016-11-08 09:44:45 +01:00
allencloud 7891d349b3 support show numbers of global service in service ls command
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-11-08 16:17:15 +08:00
yupeng 7113bbf2c6 context.Context should be the first parameter of a function
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
2016-11-08 14:51:17 +08:00
Victor Vieux 41513e3051 support settings in docker plugins install
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-07 22:49:22 -08:00
John Howard 089b33edd8 Adds minimum API version to version
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-07 21:20:00 -08:00
Yong Tang 3baa727ed1 Add `--tty` to `docker service create/update`
This fix tries to add `--tty` to `docker service create/update`. As was
specified in 25644, `TTY` flag has been added to SwarmKit and is
already vendored.

This fix add `--tty` to `docker service create/update`.

Related document has been updated.

Additional integration tests has been added.

This fix fixes 25644.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-07 16:42:32 -08:00
WangPing 713c7cd81e modify to improve code readability
Signed-off-by: WangPing <present.wp@icloud.com>

align

Signed-off-by: WangPing <present.wp@icloud.com>

align

Signed-off-by: WangPing <present.wp@icloud.com>
2016-11-08 08:37:44 +08:00
Misty Stanley-Jones 6780c318a3 Merge pull request #28029 from tealtail/27994-add-service-ls-truncate-opt
remove COMMAND column from `service ls` output. closes #27994
2016-11-07 14:39:16 -08:00
Aaron Lehmann 7a50218855 Merge pull request #25974 from kunalkushwaha/mount-add
correct handling of volumes while service update.
2016-11-07 10:34:22 -08:00
Vincent Demeester dd33c288ec Merge pull request #25983 from jhorwit2/jah/ps-refactor
Add -a option to service/node ps
2016-11-07 17:33:10 +01:00
Alicia Lauerman 1491ae50e0 remove COMMAND column from service ls output. closes #27994
Signed-off-by: Alicia Lauerman <alicia@eta.im>
2016-11-06 13:32:44 -05:00
Josh Horwitz 21096cfc05 Add -a option to service/node ps
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
2016-11-06 07:40:39 -05:00
Victor Vieux db706f3c38 Merge pull request #28010 from vieux/fix_experimental_client
always add but hide experimental cmds and flags
2016-11-04 13:49:19 -07:00
Victor Vieux 1e10649f55 update cobra and use Tags
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-04 12:04:14 -07:00
Antonio Murdaca b338ab7c41 cli/info: fix seccomp warning
also reword seccomp warning around default seccomp profile

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-11-04 19:25:51 +01:00
Yong Tang 1cab3b32a6 Add `--cpus` flag to control cpu resources
This fix tries to address the proposal raised in 27921 and add
`--cpus` flag for `docker run/create`.

Basically, `--cpus` will allow user to specify a number (possibly partial)
about how many CPUs the container will use. For example, on a 2-CPU system
`--cpus 1.5` means the container will take 75% (1.5/2) of the CPU share.

This fix adds a `NanoCPUs` field to `HostConfig` since swarmkit alreay
have a concept of NanoCPUs for tasks. The `--cpus` flag will translate
the number into reused `NanoCPUs` to be consistent.

This fix adds integration tests to cover the changes.

Related docs (`docker run` and Remote APIs) have been updated.

This fix fixes 27921.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-04 09:43:10 -07:00
Justin Cormack 4758d72fa3 Merge pull request #26276 from runcom/seccomp-conf
daemon: add a flag to override the default seccomp profile
2016-11-04 15:45:30 +00:00