Commit Graph

2268 Commits

Author SHA1 Message Date
8c3fcf2de5 Convert docker root command to use pflag and cobra
Fix the daemon proxy for cobra commands.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 0452ff5a4dd1b8fba707235d6f12a4038208f34b
Component: engine
2016-08-25 13:09:03 -04:00
63791b41d4 Merge pull request #26013 from ShawnHe711/correct-nit-in-command-annotation
correct command annotation
Upstream-commit: 7250dd4222fa253807a5b0f30dda65a97299e80a
Component: engine
2016-08-25 10:39:42 -04:00
897e3717eb correct command annotation
Signed-off-by: shawnhe <shawnhe@shawnhedeMacBook-Pro.local>
Upstream-commit: b642282990fe19f1dd7add0313c05cd139c52819
Component: engine
2016-08-25 21:29:59 +08:00
5d21e92692 fix rm plugin arg number to be min 1
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: d5271490649eb60dd705598b072d1bda66d8d16e
Component: engine
2016-08-25 20:53:49 +08:00
4a7de16b5f Merge pull request #25582 from anusha-ragunathan/detect-plugin-mediatype
Make `docker pull` detect plugin content and error out.
Upstream-commit: 3b374a25f2ded96ce46dccaabd1ce3aa50e401c0
Component: engine
2016-08-22 09:29:51 -07:00
83016f7351 Make docker pull detect plugin content and error out.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 9b6dcc8b9d1366d3da3c8f60f89de1a36b087b88
Component: engine
2016-08-20 12:54:35 -07:00
e3afe81751 Merge pull request #23436 from yongtang/23367-out-of-band-volume-driver-deletion
Add `--force` in `docker volume rm` to fix out-of-band volume driver deletion
Upstream-commit: 09b929083d34836a78ce8ee79b22aea082712072
Component: engine
2016-08-19 22:09:57 +02:00
034eb19e73 Merge pull request #25791 from lixiaobing10051267/masterSwarmJoinToken
Modify usage of docker swarm join-token command
Upstream-commit: 80798d28d36936f16fae4dd60af27cd08f54817c
Component: engine
2016-08-19 21:44:42 +02:00
ac9a57031e Remove -run flag from commit command.
This flag has been deprecated in version below 1.10 so it's safe to
remove now, according to our deprecation policy.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 54ed156879352afb06ecb94fa7b6518a39eb5fd2
Component: engine
2016-08-19 13:14:03 +02:00
715ba2d5b3 Modify usage of docker swarm join-token command
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: 9123ca546a49f6738a918b89ba7a41963083be54
Component: engine
2016-08-19 09:44:22 +08:00
a603b90d7f Add --force in docker volume rm to fix out-of-band volume driver deletion
This fix tries to address the issue in raised #23367 where an out-of-band
volume driver deletion leaves some data in docker. This prevent the
reuse of deleted volume names (by out-of-band volume driver like flocker).

This fix adds a `--force` field in `docker volume rm` to forcefully purge
the data of the volume that has already been deleted.

Related documentations have been updated.

This fix is tested manually with flocker, as is specified in #23367.
An integration test has also been added for the scenario described.

This fix fixes #23367.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 6c5c34d50d377d1c5318a255240fb2dc9c23cf92
Component: engine
2016-08-18 18:01:25 -07:00
294f10b578 Don't confuse with empty body
It fails with any (even empty) json request body.

Signed-off-by: Kanstantsin Shautsou <kanstantsin.sha@gmail.com>
Upstream-commit: 57db05cb1031f6a01e1568ceb16434e5809aef81
Component: engine
2016-08-17 02:01:04 +03:00
a0933c7d27 Merge pull request #25721 from cpuguy83/revendor_engine-api
revendor engine-api
Upstream-commit: 37302bbb3f4889e9de2a95d5ea018acdab9e4447
Component: engine
2016-08-16 17:18:43 -04:00
3dcc0abf19 revendor engine-api
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 6d98e344c7702a8a713cb9e02a19d83a79d3f930
Component: engine
2016-08-16 14:16:12 -04:00
a413b2d6cd Merge pull request #25701 from WeiZhang555/update-conflict-rm-restart
Forbid update restart policy of container with AutoRemove flag
Upstream-commit: 9a3e7d9e343938218aac8217c4b8ba4c21b841c4
Component: engine
2016-08-16 10:37:45 -07:00
06f36cfa80 Merge pull request #25337 from jhorwit2/jah/25332
Add --no-trunc to service/node/stack ps output
Upstream-commit: 0c8b0faef8dfb2aa97575bae8afa152e54e63492
Component: engine
2016-08-16 09:25:45 -07:00
cff5a79975 Add --no-trunc to service/node/stack ps output
Signed-off-by: Josh Horwitz <horwitzja@gmail.com>
Upstream-commit: 204c4d39d3241cff1b44f438b99bd0d6484e7b48
Component: engine
2016-08-16 10:19:11 -04:00
4a7e8b4b54 Merge pull request #25720 from thaJeztah/add-missing-label-filter-docs
Add missing docs for volume ls filter=label
Upstream-commit: dcdf2b404ef1859500c169c0a2fdb1d78add3d58
Component: engine
2016-08-16 13:50:56 +02:00
cd9750292a Merge pull request #23808 from AkihiroSuda/formatinfo
add `--format` flag to `docker info`
Upstream-commit: 348f6529b71502b561aa493e250fd5be248da0d5
Component: engine
2016-08-16 12:04:26 +02:00
d1bde01a82 Forbid update restart policy of container with AutoRemove flag
"--restart" and "--rm" are conflict options, if a container is started
with AutoRemove flag, we should forbid the update action for its Restart
Policy.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 4754c64ab5b5bf5ae6f8a3040606296910e6cb19
Component: engine
2016-08-16 15:36:13 +08:00
1b140377f0 add --format flag to docker info
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: dc38c9a04705f0a9ad3e007f7869cfb6a8a3a8b8
Component: engine
2016-08-16 04:03:52 +00:00
b791b365ab Suppress verbose "Sending build context" messages in non tty scenarios
This fix tries to address the issue raised in 25661 where verbose
"Sending build context" messages were not suppressed in non tty (e.g. log file)
sencarios.

This fix suppress the "Sending build context" message (other than the last one)
if the output is not a tty. The last update of the "Sending build context"
message is still sent to the output.

This fix has been tested manually:
```
docker build -t tmp . > build.log
```
The output is (only one "Sending build context"):
```
Sending build context to Docker daemon 249.4 MB
Step 1 : FROM busybox
 ---> 2b8fd9751c4c
Step 2 : RUN echo 'test'
 ---> Using cache
 ---> 7db298b6c493
Successfully built 7db298b6c493
```

This fix fixes 25661.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: b4ba575a2882953781616b6bb273419e829fb791
Component: engine
2016-08-15 18:35:05 -07:00
763cc81465 Add missing docs for volume ls filter=label
This filter option was added in be045ee2da7c2c83e859d86cb496e86ec6de8566,
but didn't update the documentation and
man pages.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5171b8349578a89efca69942f81f7e3c560840b9
Component: engine
2016-08-15 17:42:16 +02:00
1f63571025 tweak logout message
Signed-off-by: Michael Friis <friism@gmail.com>
Upstream-commit: f9443aa2a529553ad0c3227c00980b0e83d457ad
Component: engine
2016-08-12 17:00:06 -07:00
506f438662 Merge pull request #25216 from aanand/deploy-error-when-not-in-swarm-mode
Better error on 'docker deploy' when not in Swarm mode
Upstream-commit: 2a10899c16416ce4802c11ed14db80f803595b24
Component: engine
2016-08-12 14:17:47 -07:00
c6f3cd200c Merge pull request #25070 from yongtang/24881-label-containers-with-stack-name
Label containers with stack name when deploying stack/bundle
Upstream-commit: a86b2376a075b5459b202615667faa6b2980788d
Component: engine
2016-08-12 10:20:06 -07:00
8e29f88e6f Merge pull request #25568 from thaJeztah/enhance-string-truncate
Implement stringutils.Ellipsis()
Upstream-commit: 64f83cee43c6fc0785e2beeacc6432572130714b
Component: engine
2016-08-12 17:19:50 +02:00
720eb363bf Merge pull request #25564 from coolljt0725/fix_inspect_network
Fix inspect network show gateway with mask
Upstream-commit: d8240c8e27b625c6c2b7982e2473cce46e2a9ddc
Component: engine
2016-08-12 11:11:09 +02:00
3ced96b1ad Merge pull request #25557 from yongtang/25529-image-load-api
Return `application/json` for image/load API (quiet=1)
Upstream-commit: 353af0b3ecfe483568fd88754e432c92b0ec088b
Component: engine
2016-08-12 11:07:43 +02:00
42880e91b6 Remove --network-add and --network-rm flags from service update
These flags were not supported (daemon returns an error), and it was an
oversight. They were not present in completion scripts.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 3a7e90c743f6fdccb8aecb9d6d9afd42232fa736
Component: engine
2016-08-11 19:37:21 -07:00
8eacfa50f9 Fix inspect network show gateway with mask
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 096bb5fb0740656b91b3e35f8df23c79270f7f90
Component: engine
2016-08-11 21:08:54 -04:00
a351dde060 Merge pull request #25524 from WeiZhang555/debug-win2lin
Bugfix: client hangs after run container
Upstream-commit: 52286b402ef4c25ac90b35f23a9717680e0f8ff7
Component: engine
2016-08-11 15:43:00 -04:00
fb8424f405 Merge pull request #25428 from yongtang/25375-idempotent-service-update-publish-add
Fix issue in `service update --publish-add`
Upstream-commit: 49cd1680f03f1a388549594373a0717c7fab8b44
Component: engine
2016-08-11 20:11:33 +02:00
b381837a1c Refactor waitExitOrRemoved by mlaventure
Reduce complexity of waitExitOrRemoved.

Signed-off-by: mlaventure
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: eadcb996192e0bded2eaadef842dd86e9013cc27
Component: engine
2016-08-12 00:50:07 +08:00
60e441e430 Implement stringutils.Ellipsis()
This patch implements an Ellipsis utility to
append an ellipsis (...)  when truncating
strings in output.

It also fixes the existing Truncate() utility
to be compatible with unicode/multibyte characters.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 51dc35cf23a5418e93128854bedc2e59d8ca743a
Component: engine
2016-08-11 14:14:06 +02:00
adf210319c Merge pull request #25556 from vieux/plugin_description
add description in docker plugin ls
Upstream-commit: ed1a313d8f03ce1cc2eef56e66644fccb4d61eaa
Component: engine
2016-08-11 14:08:50 +02:00
932aa61090 Idempotent service update --publish-add
This fix tries to address the issue raised in 25375 where
`service update --publish-add` returns an error if the exact
same value is repeated (idempotent).

This fix use a map to filter out repeated port configs so
that `--publish-add` does not error out.

An integration test has been added.

This fix fixes 25375.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: b487497cd2d7586fd7e10affdcc514ca6b7884f6
Component: engine
2016-08-10 18:03:43 -07:00
f7227f216b add description in docker plugin ls
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 16d5fbfd9aa28d6dab250452b30b51b7916b0888
Component: engine
2016-08-10 13:06:18 -07:00
cb1c855c27 Merge pull request #23951 from allencloud/defer-os-file-close
add defer file.Close to avoid potential fd leak
Upstream-commit: 64605d709f9bf5677d513d6ed78d63fffadc697d
Component: engine
2016-08-10 11:07:15 -07:00
77bffbde97 Merge pull request #25427 from yongtang/25404-service-update-env-add
Fix `service update --env-add` issue
Upstream-commit: 59ca493121680212ab119cbf264fcdb75b699adf
Component: engine
2016-08-10 14:07:05 +02:00
6743b7f279 Bugfix: client hangs after run container
New codes introduced a new method to wait container's exit code and
removal via Events API, but it specified a "since" filter based on
client side clock, which sometimes isn't synced up with daemon's clock,
hence leads the client to hang on waiting container's exit status.

This commit brings the Events call before start, and removes the time
filter, so that it can catch daemon events correctly without care of the
clock issue.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: a422813113b3b9a14184766f7f0977ccaaeb661b
Component: engine
2016-08-10 09:36:06 +08:00
139163d715 Return application/json for image/load API (quite=1)
This fix tries to address the issue raised in 25529 wehre the
image/load API returns `application/json` for quiet=0 and
`text/plain` for quite=1.

This fix makes the change so that `application/json` is returned
for both quiet=0 and quite=1.

This fix has been tested manually.

This fix fixes 25529.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 2f27632cde2f0e514bd3a8de77cc1934e5193a83
Component: engine
2016-08-09 17:55:42 -07:00
1c502571ef add defer file.Close to avoid potential fd leak
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 0ead624473b6bddc232b46bc7c76ab4f9c743ff5
Component: engine
2016-08-10 08:36:09 +08:00
aae342284e Merge pull request #25512 from diogomonica/add-created-at
Adding Joined at to node inspect --pretty
Upstream-commit: 41d580c7a610d8111dc63353cbd94319ca854627
Component: engine
2016-08-09 12:56:32 +02:00
2c79262aba Fix service update --env-add issue
This fix tries to address the issue in 25404 where updating environmental
variable in `service update --env-add` will not work.

The issue is because `--env-add` will only append the env, not update if
the same env already exist.

This fix tracks the env variable with a map and update if the variable
is the same.

An integration test has been added.

This fix fixes 25404.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: c6de8add5fd5443aa820adbcd3c9a438df78823f
Component: engine
2016-08-08 19:04:56 -07:00
8c7b924133 Adding Joined at to node inspect
Signed-off-by: Diogo Monica <diogo.monica@gmail.com>
Upstream-commit: d1244abc5ce6382b0ebe034bc604ad0c16d2b628
Component: engine
2016-08-08 16:23:10 -07:00
34a323258f Wait container's removal via Events API
If AutoRemove is set, wait until client get `destroy` events, or get
`detach` events that implies container is detached but not stopped.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 6dd8e10d6ed7a7371c5c1824ad58c4403a7b3bfd
Component: engine
2016-08-08 22:46:53 +08:00
b27f1b6d73 Move --rm to daemon side
`--rm` is a client side flag which caused lots of problems:
1. if client lost connection to daemon, including client crash or be
killed, there's no way to clean garbage container.
2. if docker stop a `--rm` container, this container won't be
autoremoved.
3. if docker daemon restart, container is also left over.
4. bug: `docker run --rm busybox fakecmd` will exit without cleanup.

In a word, client side `--rm` flag isn't sufficient for garbage
collection. Move the `--rm` flag to daemon will be more reasonable.

What this commit do is:
1. implement a `--rm` on daemon side, adding one flag `AutoRemove` into
HostConfig.
2. Allow `run --rm -d`, no conflicting `--rm` and `-d` any more,
auto-remove can work on detach mode.
3. `docker restart` a `--rm` container will succeed, the container won't
be autoremoved.

This commit will help a lot for daemon to do garbage collection for
temporary containers.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 3c2886d8a45d8e79b00ab413d91f1af871b58d0a
Component: engine
2016-08-08 22:46:53 +08:00
f1599dae94 Merge pull request #25455 from abronan/improve_cli_promote_demote_output
swarm: improve cli output on node promote/demote for unchanged role
Upstream-commit: 8615c8b52da0a9dfdd51f1e66f76f09d3db5defa
Component: engine
2016-08-06 09:12:46 +02:00
9d14a49a6b swarm: improve cli output on node promote/demote for unchanged role
As of now promoting (or demoting) a node that has its role
left unchanged will always print a successful message.

This PR fixes the issue by matching the behavior on swarmkit's
swarmctl command and printing a message when desired role is
the current role of the node.

As a result this also avoids calling update when it is not
necessary.

Signed-off-by: Alexandre Beslic <alexandre.beslic@gmail.com>
Upstream-commit: 5479df79c7859d5a09f42c22ddb5fa3e56ceeb7c
Component: engine
2016-08-05 15:51:32 -07:00