Commit Graph

161 Commits

Author SHA1 Message Date
3cad237312 updates for review comments
- runtimeUrl -> type_url
- runtimes -> runtime

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 8c2c69d31ec0ce4a9b125ca3cbf7b04ee81ce579
Component: engine
2017-04-11 14:02:01 -04:00
21134b3d48 filter services by runtime; default to container
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: f71bdc67a21a63b901e484a0650bea36d15eece5
Component: engine
2017-04-11 14:02:01 -04:00
d2aa64e45c Merge pull request #32284 from aaronlehmann/fix-service-defaults
Improve default handling for "service create"
Upstream-commit: a258ef58d8a100467d5d948b026a884ebe58eaf4
Component: engine
2017-04-11 13:06:53 +02:00
108aa4253e Merge pull request #32462 from dperny/service-logs-general-availability
Remove experimental from service logs
Upstream-commit: 17a3e4511d8f20868a051f10dbedabdce7ea2f9c
Component: engine
2017-04-10 18:30:20 -07:00
1dfd61e802 Make the CLI show defaults from the swarmkit defaults package
If no fields related to an update config or restart policy are
specified, these structs should not be created as part of the service,
to avoid hardcoding the current defaults.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: bbe1202410a580b8bdb35e7b50e4e4028e530111
Component: engine
2017-04-10 13:41:18 -07:00
3d267a0dc8 Change "service inspect" to show defaults in place of empty fields
This adds a new parameter insertDefaults to /services/{id}. When this is
set, an empty field (such as UpdateConfig) will be populated with
default values in the API response. Make "service inspect" use this, so
that empty fields do not result in missing information when inspecting a
service.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 1d274e9acfe96b98be3ec956636ff4e5c70e98af
Component: engine
2017-04-10 13:41:16 -07:00
24a0a6b6bb Remove experimental from service logs
Service logs API is now stable. Service logs now support all features,
except retrieving details provided to the log driver.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 306cfecc8c146ea8addb44dd35296808b25916a2
Component: engine
2017-04-10 13:40:45 -07:00
b9faf048c8 Show network names in "docker service inspect --pretty"
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 56f1da77c33dcc5e752dce2694887878f93ffea6
Component: engine
2017-04-07 16:46:25 -07:00
499e804f82 cli: Allow service's networks to be updated
Resolve networks IDs on the client side.

Avoid filling in deprecated Spec.Networks field.

Sort networks in the TaskSpec for update stability.

Add an integration test for changing service networks.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 0f2669a63834844fb0ef5c017f517d8c321ad3c7
Component: engine
2017-04-07 16:46:25 -07:00
137edd889c Merge pull request #32339 from aluzzardi/selinux
services: Add support for Credential Spec and SELinux
Upstream-commit: 091b5e68ea735bf4e8ece708bbc8c413a32eab73
Component: engine
2017-04-08 01:37:17 +02:00
ddc6479238 Merge pull request #32154 from dperny/refactor-logs
Refactor logs and support service logs with TTY 
Upstream-commit: 4a1a64c67768d6fbcf20a1b37ee58212b7e870c6
Component: engine
2017-04-07 18:06:50 -04:00
e41369fcc4 services: Add support for Credential Spec and SELinux
- Defined "normalized" type for Credential Spec and SELinux
- Added --credential-spec to docker service create & update
- SELinux is API only at the time

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: 89a995a9d77cc4f95a29579e0a2b12cb3d805749
Component: engine
2017-04-07 11:30:54 -07:00
334f054f13 refactor logs and support service logs /w tty
Refactor container logs system to make communicating log messages
internally much simpler. Move responsibility for marshalling log
messages into the REST server. Support TTY logs. Pave the way for fixing
the ambiguous bytestream format. Pave the way for fixing details.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 1044093bb0aa12eb8972361a93b9bc8c4ddd857b
Component: engine
2017-04-06 17:54:11 -07:00
1623433ab1 Add support for update order
This parameter controls the order of operations when rolling out an
update task. Either the old task is stopped before starting the new one,
or the new task is started first, and the running tasks will briefly
overlap.

This commit adds Rollout to the API, and --update-order / --rollback-order
flags to the CLI.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 9b54994a8ada6ae15a4d2c3b925568e2061200ad
Component: engine
2017-04-06 17:23:36 -07:00
6f724a82a6 Merge pull request #28938 from elifa/master
Grace period option to health checks.
Upstream-commit: c4010e257f60d4204c5c2f5dc5a8aa5313d1b254
Component: engine
2017-04-06 19:23:56 +02:00
e25f6c5a1b Added start period option to health check.
Signed-off-by: Elias Faxö <elias.faxo@gmail.com>
Upstream-commit: e401f63735d8ebcff387c571d1f61ce52bdea86e
Component: engine
2017-04-06 12:35:34 +02:00
9e0bb0561c cli: Preserve order of environment variables
Unless we are adding or removing environment variables, their order
shouldn't be changed. This makes it look like the service's TaskSpec has
changed relative to the old version of the service, and containers need
to be redeployed.

The existing code always rebuilds the list of environment variables by
converting them to a map and back, but there's no reason to do this if
no environment variables are being added.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: b426741c1504d45d0e1dd6d76ec5144bd95aa480
Component: engine
2017-04-04 18:16:57 -07:00
ac33a30857 Merge pull request #32015 from dperny/service-logs-support-task-logs
Add Support for Service Task Logs
Upstream-commit: 170be9c26745b953dbfc5cafdc63eb3895c2c541
Component: engine
2017-04-04 00:15:13 -07:00
93e346635c Add support for task and arbitrary combo logs
Refactored the API to more easily accept new endpoints. Added REST,
client, and CLI endpoints for getting logs from a specific task. All
that is needed after this commit to enable arbitrary service log
selectors is a REST endpoint and handler.

Task logs can be retrieved by putting in a task ID at the CLI instead of
a service ID.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: d330dc3223df7e6c2b066373718709e34e19efca
Component: engine
2017-04-03 18:40:54 -07:00
e84d96f81f Synchronous service create and service update
Change "service create" and "service update" to wait until the creation
or update finishes, when --detach=false is specified. Show progress bars
for the overall operation and for each individual task (when there are a
small enough number of tasks), unless "-q" / "--quiet" is specified.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 330a0035334871d92207b583c1c36d52a244753f
Component: engine
2017-04-03 09:46:01 -07:00
82e98876ed Add entrypoint flags to service cli.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: d3ea30de1005fdf8fe95e9b0bc9fc5dae9b025b1
Component: engine
2017-03-28 11:24:19 -07:00
b8233dd3d5 Merge pull request #30810 from allencloud/make-secret-ls-support-filter
make secret ls support filters in CLI
Upstream-commit: 4df350b8c7a53dc82d8a6e187882faf8f90ce766
Component: engine
2017-03-28 13:43:19 +02:00
0bc9fdd1d1 make secret ls support filters in CLI
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 3935074016697b14023371b84b68c62fa1f3344e
Component: engine
2017-03-27 10:16:45 +08:00
7cc7eec39f Replace fmt.Errorf() with errors.Errorf() in the cli
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 7b7ea8ab810190018346cb7d84c161bb94f7ca60
Component: engine
2017-03-24 16:58:07 -04:00
bdbc2fdcab Merge pull request #31896 from aaronlehmann/move-secretrequestoption
api: Remove SecretRequestOption type
Upstream-commit: d376b18caf3c9e2f3535399b450dc25004be1ecc
Component: engine
2017-03-16 21:31:15 +01:00
8203424840 api: Remove SecretRequestOption type
This type is only used by CLI code. It duplicates SecretReference in the
types/swarm package. Change the CLI code to use that type instead.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: e7c39f4d5d761f68e6ac432934d8c3910e452855
Component: engine
2017-03-16 11:20:31 -07:00
943990f090 Add missing API version annotations to commands
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e638089622af0448ee0d5d95c45575b63338c938
Component: engine
2017-03-16 13:40:12 +01:00
7a360dfa15 Merge pull request #31775 from erxian/misleading-default-for-update-monitor-duration-flag
misleading default for --update-monitor duration
Upstream-commit: 52143aee95f9464c73bf1bc31f9d8274e5922cd4
Component: engine
2017-03-16 10:13:26 +01:00
9a2da87e18 improve semantics of utility function in cli/command/service
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
Upstream-commit: 1526a99672a707727d9d903cc67c1e3b7150fda2
Component: engine
2017-03-15 13:49:52 -07:00
b73bcff65d misleading default for --update-monitor duration
Signed-off-by: erxian <evelynhsu21@gmail.com>
Upstream-commit: 3e6ff87f692d38ecfabf7508b54c8280333770a4
Component: engine
2017-03-15 14:20:02 +08:00
d136f71978 Merge pull request #31809 from vieux/bump_api
bump API to 1.28
Upstream-commit: 1a24abe42d1ad08b60c406b4cf95956dbc110ed6
Component: engine
2017-03-14 11:53:52 -07:00
9aea8ad976 bump API to 1.28
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: cd173a603003f3b15f4bae13e2e27b7ee1a46942
Component: engine
2017-03-14 09:32:50 -07:00
5fe9aafe47 Merge pull request #31500 from dperny/fix-service-logs-cli
Add tail and since to service logs
Upstream-commit: 1d4608032d95b846418cdf6a718061d20fed7f48
Component: engine
2017-03-14 14:19:29 +01:00
e5626386d5 Add tail and since to service logs
This change adds the ability to do --tail and --since on docker service
logs. It wires up the API endpoints to each other and fixes some older
bugs. It adds integration tests for these new features.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 8dc437bd9b474c24a2cf802c2779dace2f91194a
Component: engine
2017-03-10 14:59:00 -08:00
965d7ccdac Fixed concerns, updated, and rebased PR.
Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 83c34de515e249ede7bc942c1fa4c6b6ac8de7fb
Component: engine
2017-03-08 16:35:58 -08:00
0d35e880ac service logs: Improve formatting
- Align output. Previously, output would end up unaligned because of
longer task names (e.g. web.1 vs web.10)
- Truncate task IDs and add a --no-trunc option
- Added a --no-ids option to remove IDs altogether
- Got rid of the generic ID Resolver as we need more customization.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: 70a4369f5eae45fe1bc94ee4a151a63c9babd6f0
Component: engine
2017-03-08 14:08:04 -08:00
d82df5d4ba Implement server-side rollback, for daemon versions that support this
Server-side rollback can take advantage of the rollback-specific update
parameters, instead of being treated as a normal update that happens to
go back to a previous version of the spec.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: f9bd8ec8b268581f93095c5a80679f0a8ff498bf
Component: engine
2017-03-03 16:33:34 -08:00
ac66308e6c Add support for rollback flags
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 3a88a24d23e6eb1ca521cd9ab6e306d4ba1c1464
Component: engine
2017-03-03 16:33:34 -08:00
0c390668f1 Add support for the "rollback" failure action
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: cc9d04647a68cf49e66bf26f10908387b99dae1a
Component: engine
2017-03-03 16:33:34 -08:00
d4d27bb5d4 Merge pull request #30725 from aaronlehmann/topology
Topology-aware scheduling
Upstream-commit: 3a5a1c3f3d1638c35891ee630ba20eda0bef560f
Component: engine
2017-03-03 15:01:12 +01:00
13f20b59db Merge pull request #30754 from yongtang/25696-stop-signal
Add `--stop-signal` for `service create` and `service update`
Upstream-commit: bb9f19503cbb0153a0da01b1e91691cd63f48dd9
Component: engine
2017-03-01 18:10:57 +01:00
737f03c444 Topology-aware scheduling
This adds support for placement preferences in Swarm services.

- Convert PlacementPreferences between GRPC API and HTTP API
- Add --placement-pref, --placement-pref-add and --placement-pref-rm to CLI
- Add support for placement preferences in service inspect --pretty
- Add integration test

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 17288c611a4f3f75ecb3bbb4533820b1836c55a6
Component: engine
2017-02-27 13:29:54 -08:00
718b046537 Delete dots to align with other commands description
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
Upstream-commit: ec95ad7353b240542f73076dde975e392c281748
Component: engine
2017-02-23 16:46:08 +08:00
5050030ffa Add --stop-signal for service create and service update
This fix tries to address the issue raised in 25696 where
it was not possible to specify `--stop-signal` for `docker service create`
and `docker service update`, in order to use special signal to stop
the container.

This fix adds `--stop-signal` and update the `StopSignal` in `Config`
through `service create` and `service update`.

Related docs has been updated.

Integration test has been added.

This fix fixes 25696.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c2d49ec214649b0025f7060429334893350fbaee
Component: engine
2017-02-21 15:19:45 -08:00
301cc805aa Merge pull request #30814 from YuPengZTE/devSwarmCliExplain
fix the type
Upstream-commit: 25500d56a5f3a94456bd8172a64bf119cc36dd7f
Component: engine
2017-02-21 00:59:58 +01:00
6446421ffd add missing API changes
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: a7e6d2ca1fd30a6122a65558507135e7079ae6a7
Component: engine
2017-02-19 01:33:43 -08:00
b7f72f988d Merge pull request #28213 from yongtang/11062016-service-ps-format
Add `--format` to `docker service ps`
Upstream-commit: b1debf1374ca7be7e7b4d4fcd41eceaf8b7cf153
Component: engine
2017-02-17 10:23:18 -08:00
2da555a6fc Merge pull request #29819 from vdemeester/service-validate-publish-simple-syntax
Make sure we validate simple syntax on service commands
Upstream-commit: f18bc25fa1449ececeac3f8e4691934bd07abb75
Component: engine
2017-02-15 12:31:46 -08:00
a532e48c46 fix the type
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
Upstream-commit: d735972d3150fa4e286ce468f033156fa22fddb7
Component: engine
2017-02-14 09:54:27 +08:00
08e260c901 Add --format to docker service ps
This fix tries to address the issue raised in 27189 where
it is not possible to support configured formatting stored in
config.json.

Since `--format` was not supported in `docker service ps`,
the flag `--format` has also been added in this fix.

This fix
1. Add `--format` to `docker service ps`
2. Add `tasksFormat` to config.json
3. Add `--format` to `docker stack ps`
4. Add `--format` to `docker node ps`

The related docs has been updated.

An integration test has been added.

This fix fixes 27189.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: f8c7c921d905615acf1d2c6577ae1cfb4600bec0
Component: engine
2017-02-10 16:53:04 -08:00