Commit Graph

29043 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
466e8e21b6 Merge pull request #30776 from WeiZhang555/stats-all-format-name-panic-cli
Fix panic of "docker stats --format {{.Name}} --all"
Upstream-commit: f5116c680207a12ecd9c4fa654a1a5707e7ac89c
Component: engine
2017-02-08 11:40:06 -08:00
2eb6289303 Merge pull request #30453 from yongtang/30242-duplicate-network-name-inspect
Return error in case `docker network inspect` is ambiguous
Upstream-commit: 846b7878193a60bedc3be365a1c4937535d827aa
Component: engine
2017-02-08 09:18:31 -08:00
13953f645c Fix typo
Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
Upstream-commit: e27838049d3ff3a8ba6ef360cf141d21ab317dc6
Component: engine
2017-02-08 07:58:46 -08:00
7ad0855c50 Randomly assign pull requests older than two weeks
Add a daily job to randomly assign pull requests which have been opened
for more than two weeks.

Signed-off-by: Arnaud Porterie (icecrime) <arnaud.porterie@docker.com>
Upstream-commit: d4f5fa29dbd29738a7da6e3c75609b033432a84f
Component: engine
2017-02-08 07:58:32 -08:00
54fc6ec2bd add filters for plugin list endpoint in swagger.yml
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 26649de086f38f7a74a0a78782c084c49fe41d89
Component: engine
2017-02-08 14:07:20 +08:00
b520dbb06a Fix panic of "docker stats --format {{.Name}} --all"
This commit fixes panic when execute stats command:

* use --format {{.Name}} with --all when there're exited containers.
* use --format {{.Name}} while stating exited container.

The root cause is when stating an exited container, the result from the
api didn't contain the Name and ID field, which will make format
process panic.

Panic log is like this:

```
panic: runtime error: slice bounds out of range [recovered]
	panic: runtime error: slice bounds out of range

goroutine 1 [running]:
panic(0xb20f80, 0xc420014110)
	/usr/local/go/src/runtime/panic.go:500 +0x1a1
text/template.errRecover(0xc4201773e8)
	/usr/local/go/src/text/template/exec.go:140 +0x2ad
panic(0xb20f80, 0xc420014110)
	/usr/local/go/src/runtime/panic.go:458 +0x243
github.com/docker/docker/cli/command/formatter.(*containerStatsContext).Name(0xc420430160,
0x0, 0x0)
	/go/src/github.com/docker/docker/cli/command/formatter/stats.go:148
+0x86
reflect.Value.call(0xb9a3a0, 0xc420430160, 0x2213, 0xbe3657, 0x4,
0x11bc9f8, 0x0, 0x0, 0x4d75b3, 0x1198940, ...)
	/usr/local/go/src/reflect/value.go:434 +0x5c8
reflect.Value.Call(0xb9a3a0, 0xc420430160, 0x2213, 0x11bc9f8, 0x0, 0x0,
0xc420424028, 0xb, 0xb)
	/usr/local/go/src/reflect/value.go:302 +0xa4
text/template.(*state).evalCall(0xc420177368, 0xb9a3a0, 0xc420430160,
0x16, 0xb9a3a0, 0xc420430160, 0x2213, 0x1178fa0, 0xc4203ea330,
0xc4203de283, ...)
	/usr/local/go/src/text/template/exec.go:658 +0x530
```

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 5a7b3c78e06081fb2d44b6f4296cb416ab91aaff
Component: engine
2017-02-08 10:26:52 +08:00
7a04a9d5d0 Merge pull request #30474 from allencloud/sort-volume-drivers
sort volume drivers  and auth plugins in info response
Upstream-commit: 41650df87e55c0d018c66d0d221920f87c343391
Component: engine
2017-02-07 21:13:21 -05:00
c9ee5a3f47 Return error in case docker network inspect is ambiguous
This fix is partially based on comment
https://github.com/docker/docker/issues/30242#issuecomment-273517205

Currently, `docker network inspect` relies on `FindNetwork()` which
does not take into consideration that multiple networks with the same
name might exist.

This fix propose to return `docker network inspect` in a similiar
fashion like other commands:
1. Lookup full ID
2. Lookup full name
3. Lookup partial ID
If multiple networks exist, an error will be returned.

NOTE: this fix is not a complete fix for the issue raised in
https://github.com/docker/docker/issues/30242#issuecomment-273517205
where SwarmKit is unable to update when multiple networks with the same
name exit.
To fix that issue requires multiple places when `FindNetwork()` is called.
Because of the impact of changing `FindNetwork()`, this fix focus on
the issue in `docker network inspect`.

A separate PR will be created to address
https://github.com/docker/docker/issues/30242#issuecomment-273517205

An integration test has been added.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: abf31ee0837ff80638f10b77df9025b6b6470253
Component: engine
2017-02-07 18:05:29 -08:00
14c3328b3b Merge pull request #30790 from vdemeester/pr-30602
Carry #30602 : Bump go-units
Upstream-commit: 31f172bdb50091be8880caac83046401bb43fc17
Component: engine
2017-02-08 11:04:22 +09:00
ac8bd0a614 Merge pull request #30642 from albers/completion-improve-plugin-enable
Improve bash completion for `docker plugin enable|disable`
Upstream-commit: 1459dc573a04b027826eb69e2f5ba59cd57aade0
Component: engine
2017-02-07 17:58:12 -08:00
6b54bc16cf Merge pull request #30694 from godefroi/26937-fix-rfc5424-log-format-1
Add NILVALUE for STRUCTURED-DATA in RFC5424 logs
Upstream-commit: 14790e4008c030626eeb8886c4578441af561cf0
Component: engine
2017-02-07 23:22:39 +01:00
1b9a800107 Merge pull request #30661 from yongtang/02012017-man-expose-publish-filter
Update API history and man page for `--filter expose/publish`
Upstream-commit: 91f36e4b8ae9040b6d6c425a8263936dc9873691
Component: engine
2017-02-07 14:05:36 -08:00
72f4f526e4 Merge pull request #30638 from albers/completion-ps-filter-by-ports
Add bash completion for `docker ps --filter expose|publish`
Upstream-commit: 9f8a7b6b452278605dabdb14936e0c6f38e98350
Component: engine
2017-02-07 13:38:19 -08:00
4c3e3cc52d Merge pull request #30640 from albers/completion-plugin-ls--filter
Add bash completion for `docker plugin ls --filter`
Upstream-commit: a19ead01bead960053cd8bf9c7660a4ec2c736a7
Component: engine
2017-02-07 13:32:29 -08:00
c355cec53c Merge pull request #30457 from dmcgowan/distribution-reference-update-2
reference: use distribution reference and remove fork
Upstream-commit: 254fc83cba90ed79c78f4cb0cb33aeeaff492798
Component: engine
2017-02-07 22:01:25 +01:00
e1911d98d5 Bump go-units
To include  https://github.com/docker/go-units/pull/23
Fixes a unit test that fails because of it.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: cb89d658dc6dca5f0efa21cac168ae82fea821d1
Component: engine
2017-02-07 21:58:56 +01:00
6df9f2365c Merge pull request #29552 from dnephin/fix-build-with-log-driver
Ignore the daemon log config when building images
Upstream-commit: 1b4e2b7c878fb69c1c96755e21a571e6d7b8e4bb
Component: engine
2017-02-07 15:47:41 -05:00
5eac19d80f Merge pull request #30780 from xulike666/update-vender-for-go-gelf
Update dependency for Graylog2/go-gelf
Upstream-commit: 0daff908a83d92114a51a8294114098ffbcf8fb6
Component: engine
2017-02-07 21:40:08 +01:00
22902a5639 Merge pull request #29563 from yongtang/21845-duplicate-mount-point-volumes-from
Fix duplicate mount points for multiple `--volumes-from` in `docker run`
Upstream-commit: 5381f9f726e50a392d6623973d232b63290789f9
Component: engine
2017-02-07 14:58:51 -05:00
2260389fe6 Use distribution reference
Remove forked reference package. Use normalized named values
everywhere and familiar functions to convert back to familiar
strings for UX and storage compatibility.

Enforce that the source repository in the distribution metadata
is always a normalized string, ignore invalid values which are not.
Update distribution tests to use normalized values.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: 3a1279393faf78632bf169619d407e584da84b66
Component: engine
2017-02-07 11:08:37 -08:00