Commit Graph

663 Commits

Author SHA1 Message Date
072232e704 Merge pull request #32289 from adshmh/add-unit-tests-for-cli-command-secret-package
add unit tests for package cli/command/secret
Upstream-commit: 8b9d54c084c951f57219de706ddb45fc2305ca89
Component: engine
2017-04-07 15:26:40 +02: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
d9412325fb Merge pull request #32364 from aaronlehmann/preserve-env-order
cli: Preserve order of environment variables
Upstream-commit: f5d881b835fbc12fdb4b0840ab26333170c705f3
Component: engine
2017-04-06 14:25:29 +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
ed86f7c60d Merge pull request #32251 from AkihiroSuda/run-mount
cli: add `--mount` to `docker run`
Upstream-commit: 945a119c8a52118ebee6c53f46e9846ea9e76c5e
Component: engine
2017-04-05 22:34:47 +02:00
6c1668c7bd cli: add --mount to docker run
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 77fe35b3b903831bd9cfb60a806d056195dc14b6
Component: engine
2017-04-05 04:52:08 +00: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
964a70f1c3 Add hidden placeholder of .Self for docker node ls --format
This commit adds a hidden placeholder of `.Self` for
`docker node ls --format` so that if the node is the same
as the current docker daemon, then a `*` is outputed.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7328ae12cc3e14b3eb6ab01f09f6d94a82a44066
Component: engine
2017-04-04 12:46:44 -07:00
3692f9bbbf added unit tests for package cli/command/secret
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 243a8e69ff6141a27fb2e56e1101fb2e70822ab4
Component: engine
2017-04-04 15:35:08 -04:00
c7270d4d81 Add --format for docker node ls
This fix tries to address the comment https://github.com/docker/docker/pull/30376#discussion_r97465334
where it was not possible to specify `--format` for `docker node ls`. The `--format` flag
is a quite useful flag that could be used in many places such as completion.

This fix implements `--format` for `docker node ls` and add `nodesFormat` in config.json
so that it is possible to specify the output when `docker node ls` is invoked.

Related documentations have been updated.

A set of unit tests have been added.

This fix is related to #30376.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 32e21ecbfe3af9a8b5762ad1a549518221c4939e
Component: engine
2017-04-04 11:26:35 -07:00
a23d7a9c18 Merge pull request #30813 from yongtang/30232-service-ls-ports
Add `PORTS` field for `docker service ls` (`ingress`)
Upstream-commit: fe4d7db1eceae8aad6a27d0ce4164ae4bf974346
Component: engine
2017-04-04 17:04:27 +02: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
881ae30412 Add PORTS field for docker service ls (ingress)
This fix is related to 30232 wherw `docker service ls`
does not show `PORTS` information like `docker service ps`.

This fix adds `PORTS` fields for services that publish
ports in ingress mode.

Additional unit tests cases have been updated.

This fix is related to 30232.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c877c7b2bf0ed20ff9054dcbec98362d9e88c145
Component: engine
2017-04-03 18:40:15 -07:00
84fd8f0bc0 Merge pull request #31144 from aaronlehmann/synchronous-service-commands
Synchronous service create and service update
Upstream-commit: 21ec12b9676f95aaa69c3082b97d0b10031cc90a
Component: engine
2017-04-03 17:44:03 -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
a2c8d31405 Merge pull request #31989 from aaronlehmann/node-ps-outside-swarm-mode
cli: Wrong error message from "node ps" outside swarm mode
Upstream-commit: d9c3c1928d6089f0bc064cd0032b82505133231d
Component: engine
2017-04-03 16:15:24 +02:00
1156f2a813 Merge pull request #32282 from mstanleyjones/improve-attach-desc
Clarify meaning of docker attach
Upstream-commit: 571e4031685e730ba7cb0c49620e9f9580fdabc6
Component: engine
2017-04-01 20:52:26 +02:00
e0362b90f0 Merge pull request #31022 from jmzwcn/issue30994
docker version output is not consistent when there are downgrades or incompatibilities #30994
Upstream-commit: 3dfce9fbb813511a0dbfea1fa3bc80a37e7072c4
Component: engine
2017-03-31 15:55:03 -07:00
1d7af76811 Merge pull request #31800 from ripcurld0/checkpoint_ls
Use formatter in docker checkpoint ls
Upstream-commit: e45483964fc26116afa754fc9defcf1ab1dbca26
Component: engine
2017-03-31 15:54:22 -07:00
aa11c20963 Clarify meaning of docker attach
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 1922eac4cc7190e1f3fa98796e7613c3e5b8b2bd
Component: engine
2017-03-31 13:22:21 -07:00
8ae037ac7f Merge pull request #31599 from ripcurld0/diff_cmd_format
Use formatter in docker diff
Upstream-commit: 3d31198cda7d1230415b37970172480b5190c1e3
Component: engine
2017-03-31 11:19:41 -07:00
61743ec730 Merge pull request #32124 from vdemeester/system-inspect-secret
Add support for `--type=secret` in `docker inspect`
Upstream-commit: ee61f28cc37d78cd40943c37c24716e5a0a635d9
Component: engine
2017-03-30 17:01:57 +02:00
d3486384e9 Use formatter in docker diff
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 3dad39b957a008127890ddf9037c063d69b99347
Component: engine
2017-03-30 10:33:40 +03:00
2fba778d82 Docker version output is not consistent when there are downgrades or incompatibilities.
Signed-off-by: Daniel Zhang <jmzwcn@gmail.com>
Upstream-commit: 50aa1e5b2819ea739beaa58bfe7836c2c8b4b9ff
Component: engine
2017-03-29 21:53:19 +08:00
487d9cf34a Merge pull request #31830 from dnephin/refactor-cli-state
Small cleanup now that we have multiple details about the server stored on the cli
Upstream-commit: bce494f7a2ce0e1a2c6563b2e32e5a8bacb128ba
Component: engine
2017-03-29 13:36:32 +02:00
dbb9dec606 Merge pull request #32186 from aaronlehmann/cluster-omitempty
api: Omit Cluster, Nodes, and Managers from swarm info when unavailable
Upstream-commit: 4180211d808c74682636f98ed16cd1990c842fc2
Component: engine
2017-03-29 10:38:52 +02:00
65370eec05 api: Omit Cluster, Nodes, and Managers from swarm info when unavailable
Currently these fields are included in the response JSON with zero
values. It's better not to include them if the information is
unavailable (for example, on a worker node).

This turns Cluster into a pointer so that it can be left out.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 3894254dddc56bf283d7361dc88953a167a3be1f
Component: engine
2017-03-28 14:20:25 -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
3f0713bbb1 Add support for --type=secret in docker inspect
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 71129f6be6c143b8210636f8bbb11a7c86b42cb6
Component: engine
2017-03-28 10:48:48 +02:00
69182c0d50 Merge pull request #31709 from dnephin/better-errors
Replace fmt.Errorf() with errors.Errorf() in the cli
Upstream-commit: 99aaf6b9233d0a0a577e79f536288bca36794c50
Component: engine
2017-03-28 10:17:46 +02:00
d247c210cb Merge pull request #32128 from vdemeester/30836-set-alias-to-servicename
Set the alias to the service name instead of the network name
Upstream-commit: 4155343f444c2fc6204447d0102a640425636e6c
Component: engine
2017-03-28 09:46:05 +02:00
5f5b8fe9f6 Manually reorganize import paths to segregate stdlib and 3rd-party packages
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: febbe3879695c46d243ce806713038e0c1582806
Component: engine
2017-03-27 18:21:59 -07:00
51025ebc27 Merge pull request #31714 from aboch/cingr
Allow user to replace ingress network
Upstream-commit: 04295d26df3034a9a92da8400418f843d7c48780
Component: engine
2017-03-27 07:30:42 -07:00
333f4f4d72 Set the alias to the service name instead of the network name
This makes it work a little closer to compose part and it is more
correct 👼

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: ee08c8542aed078e06f1d9c559d62560e97f371d
Component: engine
2017-03-27 11:42:15 +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
d79afa43f8 Allow user to modify ingress network
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: d59d19c32818ed73cc6b4d153f2858c4fe97f50e
Component: engine
2017-03-26 15:46:18 -07:00
ee135bdc50 Merge pull request #31976 from Microsoft/jjh/csbooboo
Windows: Remove --credentialspec flag
Upstream-commit: ab08a571d1181833c5598ed3d27f9d2a924762d0
Component: engine
2017-03-26 12:44:27 +02: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
50d77b4c9e Windows: Remove --credentialspec flag
Signed-off-by: John Howard (VM) <jhoward@ntdev.microsoft.com>
Upstream-commit: 53d6aadda5f5bef3af7fb1f9362dbd81189e8374
Component: engine
2017-03-23 10:01:04 -07:00
e1610cddb8 Merge pull request #31986 from Microsoft/jjh/fix28267
Windows: Don't close client stdin handle to avoid hang
Upstream-commit: ad530ffee09a4ca6b87a2b009f86b4651653e29a
Component: engine
2017-03-23 16:35:54 +01:00
b53e61fcff Return proper exit code on builder panic
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 385f1174ff6905243c51d97d641d815a520229ff
Component: engine
2017-03-21 19:09:23 -07:00
042f28b7a4 cli: Wrong error message from "node ps" outside swarm mode
"docker node ps" behaves strangely outside swarm mode:

    $ docker node ps
    ID                  NAME                IMAGE               NODE                DESIRED STATE       CURRENT STATE       ERROR               PORTS
    Error: No such node:

It should explain that the node is not a swarm manager.

The reason this happens is that the argument to "docker node ps" defaults
to "self". The first thing the command does is try to resolve "self" to
a node ID using the /info endpoint. If there is no node ID, it tries to
use the empty string as an ID, and tries to GET /nodes/, which is not a
valid endpoint.

Change the command to check if the node ID is present in the /info
response. If it isn't, a swarm API endpoint can supply a useful error
message.

Also, avoid printing the column headers if the only following text is an
error.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: ad1c96c6a72a503df956b220b3f8752683bc0896
Component: engine
2017-03-21 17:01:07 -07:00
8df09e0187 Windows: Don't close client stdin handle to avoid hang
Signed-off-by: John Howard (VM) <jhoward@microsoft.com>
Upstream-commit: 91e971c0feeb507fdf728db1c10bd7c5e328e007
Component: engine
2017-03-21 16:00:17 -07:00
392ffd1e6e Merge pull request #31705 from cyli/bump-go-connections
Use either a system pool or custom CA pool when connecting from client->daemon (+go-connections version bump)
Upstream-commit: afe1c5c2ebbe2d5448668761f722b0f5d2def9a5
Component: engine
2017-03-21 10:36:41 -07:00
bd926fecd3 Merge pull request #31621 from dnephin/cleanup-container-run-command
Some cleanup of container run command
Upstream-commit: f965aab5e95b52a5c44f4b4412bb0202adcf3174
Component: engine
2017-03-21 16:01:11 +01:00
730ccc302a Merge pull request #31552 from ripcurld0/add_format_secretls
Add format to secret ls
Upstream-commit: 1ec77baed9f87c9c7cb64ddd2ad203d800ba7efa
Component: engine
2017-03-20 20:20:45 +01:00
5ed1f03370 Create a new ServerType struct for storing details about the server on the client.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 41522439859b5d62651e71a424c03f96be26aec3
Component: engine
2017-03-20 12:48:25 -04:00