Commit Graph

110 Commits

Author SHA1 Message Date
fe241a941a Merge pull request #27564 from mlaventure/add-networks-format-to-ps
Add Networks placeholder to ps --format
Upstream-commit: 85a65c7536
Component: cli
2016-10-20 18:43:46 -07:00
2049cd9e1a Merge pull request #27530 from allencloud/change-join-role-display-judge
change join node role judge
Upstream-commit: 9ef3b7e6ff
Component: cli
2016-10-20 17:46:08 -07:00
7507bdd910 Merge pull request #27516 from allencloud/change-remove-multi-nodes
make every node and plugin removal call api
Upstream-commit: 3affd9570f
Component: cli
2016-10-20 10:10:52 -07:00
b2507ea973 Add Networks placeholder to ps --format
Passing {{.Networks}} to the format parameter will prompt ps to
display all the networks the container is connected to.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 08ac5a3039
Component: cli
2016-10-20 07:41:56 -07:00
3a00f9dfc7 Exec: Add ability to set environment variables
Keeping the current behavior for exec, i.e., inheriting
variables from main process. New variables will be added
to current ones. If there's already a variable with that
name it will be overwritten.

Example of usage: docker exec -it -e TERM=vt100 <container> top

Closes #24355.

Signed-off-by: Jonh Wendell <jonh.wendell@redhat.com>
Upstream-commit: a528b05dab
Component: cli
2016-10-19 12:39:25 -02:00
448fe45059 change join node role judge
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: f2a6d37388
Component: cli
2016-10-19 19:47:42 +08:00
0cbbc04944 make every node and plugin removal call api
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 49512f901c
Component: cli
2016-10-19 06:40:30 +08:00
64a984b1c7 Service update failure thresholds and rollback
This adds support for two enhancements to swarm service rolling updates:

- Failure thresholds: In Docker 1.12, a service update could be set up
  to either pause or continue after a single failure occurs. This adds
  an --update-max-failure-ratio flag that controls how many tasks need to
  fail to update for the update as a whole to be considered a failure. A
  counterpart flag, --update-monitor, controls how long to monitor each
  task for a failure after starting it during the update.

- Rollback flag: service update --rollback reverts the service to its
  previous version. If a service update encounters task failures, or
  fails to function properly for some other reason, the user can roll back
  the update.

SwarmKit also has the ability to roll back updates automatically after
hitting the failure thresholds, but we've decided not to expose this in
the Docker API/CLI for now, favoring a workflow where the decision to
roll back is always made by an admin. Depending on user feedback, we may
add a "rollback" option to --update-failure-action in the future.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 06ebd4517d
Component: cli
2016-10-18 10:09:50 -07:00
cb9c9cdbfa Merge pull request #27476 from yuexiao-wang/fix-typos-volume
Fix some typos
Upstream-commit: 879b4d1fba
Component: cli
2016-10-18 13:50:20 +01:00
1f163ad243 Merge pull request #27478 from allencloud/wrap-line-in-deleted-containers
wrap line in deleted containers when pruning
Upstream-commit: d52f04b7c1
Component: cli
2016-10-18 13:48:44 +01:00
cd9add9cd9 Merge pull request #22566 from yongtang/22471-daemon-shutdown-timeout
Add config parameter to change per-container stop timeout during daemon shutdown
Upstream-commit: 3eeb334ccc
Component: cli
2016-10-18 14:33:09 +02:00
655c82e562 Fix typs from go to Go
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 24d0191a3a
Component: cli
2016-10-18 19:40:16 +08:00
52dbab66cb wrap line in deleted containers when pruning
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 093072cc18
Component: cli
2016-10-18 14:20:12 +08:00
67d2ba7359 Merge pull request #26519 from AkihiroSuda/fix-cli-command-formatter-json-support
Fix broken JSON support in cli/command/formatter
Upstream-commit: 3ab6e03ba3
Component: cli
2016-10-17 22:44:04 +01:00
a195f2d433 Update docker stop and docker restart to allow not specifying timeout and use the one specified at container creation time.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c424fb0e3d
Component: cli
2016-10-17 12:53:35 -07:00
fc18090688 Revert docker volume column name to VOLUME_NAME
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6c3c3a87ba
Component: cli
2016-10-17 20:03:31 +02:00
2039fb87db Merge pull request #27074 from cyli/bump-notary-version
Bump notary version to 0.4.2
Upstream-commit: 6566662d1b
Component: cli
2016-10-17 16:35:57 +02:00
f0fd68b09c Fix broken JSON support in cli/command/formatter
How to test:

    $ docker ps --format '{{json .}}'
    $ docker network ls --format '{{json .}}'
    $ docker volume ls --format '{{json .}}'

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: c11155f0d1
Component: cli
2016-10-17 08:07:17 +00:00
959e595471 Merge pull request #27236 from allencloud/return-nil-when-no-node-or-service
return nil when no node or service to avoid additional api call
Upstream-commit: cfc3b1a3ff
Component: cli
2016-10-16 18:41:31 +02:00
1ce580f929 Fix API incompatibilities between notary v0.3.0 and v0.4.2:
- some function signatures have changed - use the new ones
- re-generate the notary delegation key certs, since notary doesn't allow SHA1
- fix some error message mapping because now if a root rotation fails to validate trusted operations will fail

Signed-off-by: cyli <cyli@twistedmatrix.com>
Upstream-commit: 43d7c0ed9a
Component: cli
2016-10-14 17:53:34 -07:00
da9c666ce4 Allow docker deploy command accept filename with/without extension
This fix tries to address the issue raised in 25855 where the command
`docker deploy` can only accept a STACK without extension of `.dab`.
In other words, `docker deploy hellojavaee.dab` gives an error:
```
Bundle hellojavaee.dab.dab not found. Specify the path with --file
```

This fix updates the way namespace STACK is taken so that in case
`STACK.dab` is provided with `docker deploy`:
```
$ docker deploy STACK.dab
```
The `STACK` is used as namespace (instead of `STACK.dab`).

NOTE: This fix will only allows `.dab` extension in namespace, because
it is not possible to have a namespace with `.` in the middle. In other
words, a namespace `hello.java.ee` will not work anyway (whether the file
`hello.java.ee` exists or not).

An additional integration test has been added to cover the changes.

This fix fixes 25855.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0cb01799e9
Component: cli
2016-10-14 11:44:15 -07:00
cd94ff3934 Merge pull request #27333 from yongtang/27049-ListOpt
Use ListOpt for `docker network create --label` and `docker volume create --label`
Upstream-commit: b2de6e55bd
Component: cli
2016-10-14 00:31:09 -07:00
17ee92cc91 Merge pull request #26819 from ripcurld00d/fix_stats_mutex
Hide the mutex lock in formatter.ContainerStats
Upstream-commit: bfe16dcfe2
Component: cli
2016-10-13 17:38:22 -07:00
939ccb7483 Fix the incorrect description for NewInStream
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: b6fbe832ac
Component: cli
2016-10-13 22:33:09 +08:00
c5a9a16056 Use ListOpt for docker network create --label and docker volume create --label
This fix is related to 27049 and 27047. For `--label` flag, if string slice is
used (like 27047), then quote can not be used in command and will result in
an error :
```
line 1, column 14: bare " in non-quoted-field
```

The issue 27047 has been fixed by 27049.

Recently I found out that both `docker network create --label` and `docker volume create --label`
still use string slice and will return the same error when quotes are used.

This fix fixes `docker network create --label` and `docker volume create --label`
by using `ListOpt` (as 27049) as well.

This fix has been tested and verified manually.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 49e49e8e00
Component: cli
2016-10-12 16:06:34 -07:00
52bff40f0e Merge pull request #27294 from mlaventure/hide-unused-volume-fields
Move types.Volumes optional fields under a new type
Upstream-commit: 2e2f16a621
Component: cli
2016-10-11 23:55:25 +02:00
bf3fe75f3b Move types.Volumes optional fields under a new type
This allows us to hide those fields when they are not filled.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 5018781cab
Component: cli
2016-10-11 11:49:26 -07:00
fcc2ad15e7 return nil when no node or service to avoid additional api call
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 6ef1c7deaf
Component: cli
2016-10-11 10:59:16 +08:00
1c68035702 Hide the mutex in formatter.ContainerStats
The formatter.ContainerStats struct exposes its Mutex.
This is a bad design and should be fixed.

To fix that, I separated the statistics
attributes from ContainerStats to StatsEntry and
hid the mutex. Notice that the mutex protects both
the `err` field and the statistics attributes.

Then, implemented SetStatistics, SetError, GetStatistics
and GetError to avoid races.

Moreover, to make this less granular, I decided to
replace the read-write mutex with the regular mutex and
to pass a StatsEntry slice to formatter.ContainerStatsWrite

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 3bc50c45ba
Component: cli
2016-10-10 21:52:53 +03:00
b9c5442c91 better prune and system df
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 871b692833
Component: cli
2016-10-11 00:42:21 +08:00
879f289e5a Merge pull request #26778 from WeiZhang555/parallel-operations
Support parallel kill,rm
Upstream-commit: 0c6d66b89a
Component: cli
2016-10-10 18:31:10 +02:00
7f7622756e Add the OPTIONS and Fix the links for contain prune
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 80bc917226
Component: cli
2016-10-11 00:13:33 +08:00
9d0867981a Windows: Support credential specs
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: e307da732a
Component: cli
2016-10-06 09:32:22 -07:00
69602c283c Merge pull request #25837 from reaperhulk/support-compressing-build-context
Add support for compressing build context during image build
Upstream-commit: 8691f7c542
Component: cli
2016-10-05 12:57:46 -07:00
55fc58e15f Merge pull request #26108 from mlaventure/data-mngt
New Data Management commands
Upstream-commit: 71ffe11776
Component: cli
2016-10-01 03:17:18 +00:00
ad88944cf1 Add support for compressing build context during image build
When sending a build context to a remote server it may be
(significantly) advantageous to compress the build context. This commit
adds support for gz compression when constructing a build context
using a command like "docker build --compress ."

Signed-off-by: Paul Kehrer <paul.l.kehrer@gmail.com>
Upstream-commit: e25646bbc0
Component: cli
2016-09-30 17:46:08 -05:00
f93c39a901 Merge pull request #27049 from dnephin/fix-label-flag-type
Use ListOpt for build labels
Upstream-commit: ebfd0d6602
Component: cli
2016-09-30 23:40:08 +02:00
326cca001f Add new df subcomand to the system command
This command display the state of the data usage of the docker daemon.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 3f8c4be283
Component: cli
2016-09-30 14:35:23 -07:00
8ba28247b6 Merge pull request #26697 from allencloud/change-service-scale-logic
validate service parameter in client side to avoid api call in `docker service scale`
Upstream-commit: e2870295aa
Component: cli
2016-09-30 18:37:35 +02:00
8d6b5149c7 Use ListOpt for labels.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: d6b5a807d7
Component: cli
2016-09-29 17:59:52 -04:00
c80b266f91 Add subcommand prune to the container, volume, image and system commands
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 6f8bb41ecb
Component: cli
2016-09-29 07:42:53 -07:00
6713fa0784 Update Images() to allow retrieving specific image size data
Those data include:
 - size of data shared with other images
 - size of data unique to a given image
 - how many containers are using a given image

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 82dc15836b
Component: cli
2016-09-29 07:42:53 -07:00
d882807966 add \n in engine labels display in docker node inspect xxx --pretty
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 65b1e54c73
Component: cli
2016-09-29 18:17:54 +08:00
4c5ae70968 Merge pull request #24850 from yongtang/24270-service-tasks-filter
Fix partial/full filter issue in `service tasks --filter`
Upstream-commit: 5ca7909308
Component: cli
2016-09-28 11:50:27 +02:00
cf39dde222 Support parallel rm
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 5c1362ce59
Component: cli
2016-09-28 12:07:18 +08:00
03427eb002 Support parallel kill
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: f612b93d33
Component: cli
2016-09-28 12:03:19 +08:00
a0d7480769 Merge pull request #26951 from AkihiroSuda/update-ut-cli-command-service
Fix cli/command/service/opts_test.go, and add some extra test cases
Upstream-commit: 715d301f12
Component: cli
2016-09-27 20:30:26 -04:00
459d502275 Merge pull request #26255 from Microsoft/jjh/xenon-test-infrastructure
Add isolation to info - enables Hyper-V containers CI bring-up
Upstream-commit: bf824fee21
Component: cli
2016-09-27 18:46:51 +02:00
72959f648d Merge pull request #26906 from allencloud/add-endpoint-mode-in-service-pretty
add endpoint mode in service pretty
Upstream-commit: b322c8e506
Component: cli
2016-09-27 18:28:43 +02:00
841efb11eb Fix cli/command/service/opts_test.go, and add some extra test cases
`m.Set("type=volume,target=/foo,volume-nocopy")` is valid even though it lacks "source"

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 2126d8160d
Component: cli
2016-09-27 15:27:02 +00:00