Commit Graph

31631 Commits

Author SHA1 Message Date
15ed05f7fc Merge pull request #30905 from allencloud/remove-redudant-code-in-unlock-and-better-error-msg
remove redundant code and better error msg
Upstream-commit: 9a6ebf08e75c35a2041a18bcc6e0883021dc65b5
Component: engine
2017-02-11 20:13:31 +09:00
b2b138d38f Ignore some functions in the Go template when header is rendered
This fix ignore some functions in the Go template when header is
redendered, so that `--format "{{truncate .ID 1}}"` will still
be able to redener the header correctly.

Additional test cases have been added to the unit test.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8b165cad1aa8ce00ecc293ac0be82dd01392e548
Component: engine
2017-02-10 19:34:50 -08:00
5915ac4ad4 Allow --format to use different delim in table format
This fix is an attempt to address
https://github.com/docker/docker/pull/28213#issuecomment-273840405

Currently when specify table format with table `--format "table {{.ID}}..."`,
the delimiter in the header section of the table is always `"\t"`.
That is actually different from the content of the table as the delimiter
could be anything (or even contatenated with `.`, for example):
```
$ docker service ps web --format 'table {{.Name}}.{{.ID}}' --no-trunc

NAME                ID
web.1.inyhxhvjcijl0hdbu8lgrwwh7
 \_ web.1.p9m4kx2srjqmfms4igam0uqlb
```

This fix is an attampt to address the skewness of the table when delimiter
is not `"\t"`.

The basic idea is that, when header consists of `table` key, the header section
will be redendered the same way as content section. A map mapping each
placeholder name to the HEADER entry name is used for the context of the header.

Unit tests have been updated and added to cover the changes.

This fix is related to #28313.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: ea61dac9e6d04879445f9c34729055ac1bb15050
Component: engine
2017-02-10 19:34:50 -08:00
fee80945cc remove redundant code and better error msg
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 5c0ea56d56065ee737557650fa797a61f52e8378
Component: engine
2017-02-11 09:22:07 +08:00
97ab54822f Additional experimental features in non-experimental mode error handling
This fix is the follow up of the last commit.
In this fix:
1. If any of the parents of a command has tags, then this command's
`Args` (Args validation func) will be wrapped up. The warpped up func
will check to see if the feature is supported or not. If it is not supported,
then a not supported message is generated instead.

This fix is related to 28626.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8421fc634907a68889b0f20c13b0cf135f0817c6
Component: engine
2017-02-10 17:05:10 -08:00
3662885f94 Improve error handling of experimental features in non-experimental mode
This fix tries to address several issues raised in 28626 where
run against a non-experimental daemon may not generate correct
error message:
1. Incorrect flags were not checked against the supported features:
   ```
   $ docker stack --nonsense
   unknown flag: --nonsense
   ```
2. Subcommands were not checked against the supported features:
   ```
   $ docker stack ls
   Error response from daemon: This node is not a swarm manager...
   ```

This fix address the above mentioned issues by:
1. Add a pre-check for FlagErrorFunc
2. Recursively check if a feature is supported for cmd and its parents.

This fix fixes 28626.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9f6fea8e7bd3e64edab2bc5bac337b4118ea97df
Component: engine
2017-02-10 16:54:19 -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
fde87ec134 Merge pull request #30889 from aaronlehmann/addreference-tag-digest
reference: Handle combination of tag and digest in AddReference
Upstream-commit: 584e399d9632200e6c8a636339c8aa6347a57fca
Component: engine
2017-02-10 13:27:12 -08:00
a02b030327 Fix #303111: dockerd leaks ExecIds on failed exec -i
Signed-off-by: Dmitry Shyshkin <dmitry@shyshkin.org.ua>
Upstream-commit: 3cc0d6bb0475551687d89e7925b09f864c866a71
Component: engine
2017-02-10 21:13:00 +02:00
229ad1c063 Merge pull request #30903 from allencloud/remove-unused-headers-in-secret-create
remove unused headers in secret_create.go
Upstream-commit: be6481041df951e75d079fde68fd8536c309dab2
Component: engine
2017-02-10 14:10:31 -05:00
a0d5e6c8ea Merge pull request #30839 from yongtang/02082017-swarmkit-update
Update SwarmKit to ed384f3b3957f65e3111bd020f9815f3d4296fa2
Upstream-commit: 1eb284133451a85725d51935572267b6e83bd339
Component: engine
2017-02-10 10:14:30 -08:00
cee0fd1068 Merge pull request #30901 from xulike666/fight-for-readability
Fix some easy typos in cmd/* :D
Upstream-commit: 69be892c9d417a32d94235d0b111699c7df4d4ed
Component: engine
2017-02-10 13:09:25 -05:00
796599868e Merge pull request #29559 from mstanleyjones/define_bridge
Define bridge networks
Upstream-commit: c621fbce04ec845d5f9254bc59b11dfe06fff0e0
Component: engine
2017-02-10 09:25:29 -08:00
768202d8c3 Use 2 seconds instead of 2000 milliseconds
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: cbf2f4d2816b20df307a270d4267557618708c3f
Component: engine
2017-02-10 11:30:07 -05:00
434f430a26 split docker_api_swarm_test.go into multiple files
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 69afd30444e87b3d0c4fe1ed4079466f629b0c33
Component: engine
2017-02-11 00:18:01 +08:00
439a3c18ed add link query in container rm api doc
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 2972b99f1b0c615d5a6e3ee1645ed104cfb8fe94
Component: engine
2017-02-11 00:17:37 +08:00
46de6776e3 remove unused headers in secret_create.go
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 31d9ce6f5c6afed4d76ee70533871944b754e869
Component: engine
2017-02-11 00:16:48 +08:00
355bed80d8 Merge pull request #30896 from Microsoft/jjh/emitcommit
Windows: make.ps1 emit commit ID
Upstream-commit: bade08a0637faebda4642cbe03185a461830cbff
Component: engine
2017-02-10 09:56:02 -05:00
dad963ca8c Merge pull request #30893 from Microsoft/jjh/disabletesttemporarily
Windows: Temporarily disable TestBuildLastModified
Upstream-commit: eaffb3099a4ed2701fc0934b39b7dcdd1ca62219
Component: engine
2017-02-10 11:38:56 +00:00
1b40ee8f6b Merge pull request #30885 from vieux/restore_join_token
print 'worker' join token after swarm init
Upstream-commit: b847fe563af6c00531b08e00a9b44e6b43cb9bd9
Component: engine
2017-02-10 00:12:06 -08:00
b0ef747023 review code about cmd/* and fix some easy typos :D
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
Upstream-commit: 437e81cd69bf1649d45650a335e121d9dfb2ddf7
Component: engine
2017-02-10 15:52:33 +08:00
a30a294780 Add = before the value of PublishedPort
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
Upstream-commit: e9a85c59097a61f85dabe3fd059b89739636a0e7
Component: engine
2017-02-10 14:53:18 +08:00
047d70f9ee Windows: make.ps1 emit commit ID
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: f48f1ff34c72c97bb000dbf235d9d6c4173384e1
Component: engine
2017-02-09 20:01:23 -08:00
82400e723b Windows: Temporarily disable TestBuildLastModified
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 8eb0af1a0c396a8363bdd348af74eafc51ab66b0
Component: engine
2017-02-09 18:13:20 -08:00
d927b05cf2 reference: Handle combination of tag and digest in AddReference
With the switchover to the unified reference package, AddReference no
longer does the right thing when passed a reference that has both a
digest and a tag. It would put both the digest in the tag in the
reference stored in the repositories.json file, which isn't the right
format, and would mean that neither "docker run" nor docker services
could locate the image. This meant that a simple "docker service create"
command like "docker service create --name foo busybox top" would create
a service that immediately went into a restart loop, because it couldn't
use the image that had been pulled.

Fix AddReference to strip out the tag when both a tag and digest are
specified. We do this because we don't necessarily want to overwrite the
tag - when both a digest and tag are specified, the tag is only
advisory.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: b7a2d85316314112809e8e2f6abf84bb10428f38
Component: engine
2017-02-09 16:30:46 -08:00
36658c604f add 1.13.x CHANGELOG to master
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: ce29081d80b2893be84d495c61fba7ba4f7b8c3c
Component: engine
2017-02-09 15:11:06 -08:00
9c4fa985c0 print 'worker' join token after swarm init
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 18adec5c89420186a2d7320db0b1e76696c9f552
Component: engine
2017-02-09 14:54:05 -08:00
acf51a7fb9 Do group lookup in listeners package
This used to be handled by go-connections, but now it only takes a group
ID (int).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: bdf4cad1d1af6c6493440074d4007dcca7e7b8ae
Component: engine
2017-02-09 16:38:52 -05:00
3f7b7dd1ae Convert socket group to int
Sockets interface has been updated to take in a the group
id as an integer rather than a string.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: e5d77c64a2030fe4c5c1413b69b45f40a2347358
Component: engine
2017-02-09 16:10:38 -05:00
a855d6e84c Update go-connections package
fixes #30450

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 4f223337a5da48591119daf51269d77910f00b49
Component: engine
2017-02-09 16:10:38 -05:00
3f0eef5bfa Merge pull request #30146 from tonistiigi/update-net
vendor: update golang/net to c427ad74c
Upstream-commit: 7efc2865181ad3fd6fd36f383e110994949916c9
Component: engine
2017-02-09 12:41:08 -05:00
99d3239faa Merge pull request #30702 from allencloud/update-api-docs-about-filters
add missing filter type in swagger.yml and sort filter type in alphabets
Upstream-commit: 10c0af083544460a2ddc2218f37dc24a077f7d90
Component: engine
2017-02-09 10:33:49 -05:00
935c4823a4 Merge pull request #30849 from vieux/bump_api_1.27
bump engine API to 1.27
Upstream-commit: cff32a411a7f1253a772a8f7a348be5364ffb3ac
Component: engine
2017-02-09 13:48:43 +00:00
69f6ce22d2 Fix bash completion for start --checkpoint
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 33d9b584722aac273473682ef84a6315d0ed2c47
Component: engine
2017-02-09 14:41:50 +01:00
de40765bd5 Merge pull request #30864 from icecrime/fix_poule_config
Fix poule configuration
Upstream-commit: f86283fc32666c255b601fe04061781630ab2dbc
Component: engine
2017-02-09 01:40:17 -08:00
ae9b1598c4 Fix poule configuration
Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
Upstream-commit: 3bf1922333c9e80f21181721388c4ec05743de31
Component: engine
2017-02-09 01:37:53 -08:00
1b1c293b02 add test case check connect.EndpointConfig not nil
Signed-off-by: chchliang <chen.chuanliang@zte.com.cn>
Upstream-commit: fd74940304c86e43d8e8d44d0d8315086d5596c4
Component: engine
2017-02-09 11:26:20 +08:00
50715b9350 Send "Name" and "ID" when stating stopped containers
When `docker stats` stopped containers, client will get empty stats data,
this commit will gurantee client always get "Name" and "ID" field, so
that it can format with `ID` and `Name` fields successfully.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: eb3a7c232908377f4d4c0b0ec6fd35b0be138fdd
Component: engine
2017-02-09 09:46:59 +08:00
5368ec5552 Merge pull request #30804 from mstanleyjones/cli_fixups
Cli fixups
Upstream-commit: 40dbbd3f9b631a0745e596072675729018378a75
Component: engine
2017-02-08 17:07:43 -08:00
7196026b57 Standardized formatting of CLI reference commands
Command name should be a H1

Only Description, Examples, and Related Commands should be H2

Changed 'Related information' heading to 'Related commands' since 99% it is only linking commands

Added some examples where relevant

Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 52df69f00d966904ba230dc2e3a0646cc52b7688
Component: engine
2017-02-08 16:57:58 -08:00
1ecb43d9ed Removed unused image
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 80ee21e533e6c88dcdc293d5e88b330f777acee2
Component: engine
2017-02-08 16:38:31 -08:00
6966820198 Add info about the relationship between swarm leave and node rm
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: e2ce8703711b5b07e60eb5e09c18214a74b6d041
Component: engine
2017-02-08 16:38:31 -08:00
a1ed21a63b Build the docker-engine RPM for Amazon Linux
Signed-off-by: Iliana Weller <iweller@amazon.com>
Upstream-commit: 0b0216b67bc4721bf1baad139577c10342b8252c
Component: engine
2017-02-08 16:19:22 -08:00
388cfd9d1a bump engine API to 1.27
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 6bad3fc9fbcdef48b3b0b2fbb5cbaf530cc4db56
Component: engine
2017-02-08 16:14:58 -08:00
5b20abeadf Merge pull request #29906 from allencloud/update-events-related-things
update events related doc and swagger.yml
Upstream-commit: dea528e8cd044de6ca08f7c9bb2e7581774743d6
Component: engine
2017-02-08 14:13:37 -08:00
e0d975b4ca Define bridge networks
Signed-off-by: Misty Stanley-Jones <misty@docker.com>
Upstream-commit: 1e74df3637c1497f7adc3bd7aebd95baaa4c8e22
Component: engine
2017-02-08 13:33:34 -08:00
e374d6ebb2 Merge pull request #30835 from icecrime/update_poule
Randomly assigned pull requests after 2 weeks
Upstream-commit: f19bfbbf8cc9869a0311ec03b92393a428aff627
Component: engine
2017-02-08 22:23:24 +01:00
cb75ffb99b Update SwarmKit to ed384f3b3957f65e3111bd020f9815f3d4296fa2
This fix updates SwarmKit to ed384f3b3957f65e3111bd020f9815f3d4296fa2.
Notable changes since last update (3ca4775ba4a5519e2225c3337c7db8901ec39d26):

1. Fix duplicated ports allocation with restarted swarm. (Docker issue #29247)
2. Topology-aware scheduling (Docker PR #30725)

Docker issue #29247 was labeled 1.13.1, though it is advised that
related SwarmKit changes only to be merged to master
(based on the feedback https://github.com/docker/swarmkit/pull/1802#issuecomment-274143500)

This fix fixes #29247 (master only).
This fix is related to #30725.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 6fb3a9d33c08069cd9b5182b70b403a671385ed2
Component: engine
2017-02-08 11:59:13 -08:00
e552136043 Merge pull request #30802 from anusha-ragunathan/debug_docs
Add plugin debug docs.
Upstream-commit: d4be5a2f677ddfee92c794503c7119d0a2de7a89
Component: engine
2017-02-08 11:49:11 -08:00
47d6168303 Add plugin debug docs.
Doc fix for #30761

Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
Upstream-commit: 94c40a30747ce77dc2191627645fec9c71a90a99
Component: engine
2017-02-08 11:46:24 -08:00