Commit Graph

2639 Commits

Author SHA1 Message Date
4ee2b66de5 add 400 status code for build api
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: c81a818b568e892a7fe37552aff84fbc3736a3a4
Component: engine
2017-01-29 00:07:35 +08:00
bc911a640c Merge pull request #28409 from dnephin/swagger-gen-more
Generate more types from the swagger spec
Upstream-commit: a69c4129e086e4e7b86cce7d2682685dfdc6f2d2
Component: engine
2017-01-26 10:35:34 -08:00
a818254bf8 Fix incorrect Scope in network ls/inspect with duplicate network names
This fix tries to address the issue raised in 30242 where the `Scope`
field always changed to `swarm` in the ouput of `docker network ls/inspect`
when duplicate networks name exist.

The reason for the issue was that `buildNetworkResource()` use network name
(which may not be unique) to check for the scope.

This fix fixes the issue by always use network ID in `buildNetworkResource()`.

A test has been added. The test fails before the fix and passes after the fix.

This fix fixes 30242.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 05a831a775be5e8d752deaef620e629deb15cb89
Component: engine
2017-01-25 09:39:55 -08:00
377b3251ff Fix some typos
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 827bbe90a0fc53342a85d2653d96b8ba55658adf
Component: engine
2017-01-19 15:29:28 +08:00
140c56ac38 Merge pull request #28925 from daehyeok/ineffassign
Refactoring ineffectual assignments
Upstream-commit: 5eda0c59477a7364878351c3d311cd3a4c6dd28d
Component: engine
2017-01-18 15:01:57 +01:00
c28bd5178d Merge pull request #29965 from yongtang/29946-networks-api
Return `[]` instead of `null` in case `filterNetworks` returns empty
Upstream-commit: f19a293dd741583c66001799435f784f2af455e0
Component: engine
2017-01-17 18:58:35 +01:00
c249c5ced8 Don't use AutoRemove on older daemons
Docker 1.13 moves the `--rm` flag to the daemon,
through an AutoRemove option in HostConfig.

When using API 1.24 and under, AutoRemove should not be
used, even if the daemon is version 1.13 or above and
"supports" this feature.

This patch fixes a situation where an 1.13 client,
talking to an 1.13 daemon, but using the 1.24 API
version, still set the AutoRemove property.

As a result, both the client _and_ the daemon
were attempting to remove the container, resulting
in an error:

    ERRO[0000] error removing container: Error response from daemon:
    removal of container ce0976ad22495c7cbe9487752ea32721a282164862db036b2f3377bd07461c3a
    is already in progress

In addition, the validation of conflicting options
is moved from `docker run` to `opts.parse()`, so
that conflicting options are also detected when
running `docker create` and `docker start` separately.

To resolve the issue, the `AutoRemove` option is now
always set to `false` both by the client and the
daemon, if API version 1.24 or under is used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0ea7b143b0a8366799c83a955be676aaf1345214
Component: engine
2017-01-15 01:59:57 +01:00
210ffa1f3c Merge pull request #30161 from xulike666/fix-typo-4/36
fix typo in api/types/client.go
Upstream-commit: 728566c4ad93f84469ffa8406b6a3cb4ea9f74a6
Component: engine
2017-01-14 08:24:49 -05:00
1145a3c593 fix typo in api/types/client.go
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
Upstream-commit: c8fd28f12e501c3ba1bea9d380a38f4af8319a41
Component: engine
2017-01-14 15:10:08 +08:00
8a50ed9dc7 fix typo in api/types/time/timestamp.go
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
Upstream-commit: 2859ce6a577a9eac2c1610b76c156a5eb06cee83
Component: engine
2017-01-14 14:16:03 +08:00
3650feec46 Merge pull request #28720 from jlhawn/add_secret_update_method
Add SecretUpdate method to client
Upstream-commit: bd9361b8105518a9331f17d3f5fb2deed6a16c13
Component: engine
2017-01-13 21:28:43 +01:00
29e36c572d Add SecretUpdate docs to api/swagger.yaml
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 1cd5af59bffb6ee38f3599443abdcc30359bd521
Component: engine
2017-01-13 09:51:12 -08:00
af9ca905a5 fix typo in mount.go
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
Upstream-commit: e0621c53af1ac7dfb63f212743db17a0d67ca0e6
Component: engine
2017-01-13 22:36:32 +08:00
287ee51be3 Refactoring ineffectual assignments
This patch fixed below 4 types of code line
1. Remove unnecessary variable assignment
2. Use variables declaration instead of explicit initial zero value
3. Change variable name to underbar when variable not used
4. Add erro check and return for ignored error

Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
Upstream-commit: 6306019d0bad9c4e60ee437e93f2450dfb0b68c0
Component: engine
2017-01-13 00:27:01 -07:00
eb27b9a5c9 Merge pull request #27928 from erikh/fix-docs
api/types/client.go: documentation fix for ImageImportSource
Upstream-commit: 1d40e9cb187640f9369d2bef40d7d9d03b03d493
Component: engine
2017-01-12 17:36:36 +01:00
de94c8e520 Merge pull request #24993 from yongtang/24596-swarm-join-with-drain
Allow swarm join with `--availability=drain`
Upstream-commit: 66aba12df2319b55b04e381189da39a7f35029e5
Component: engine
2017-01-11 17:39:01 +01:00
6fcadc8e19 Return [] instead of null in case filterNetworks returns empty
This fix tries to address the issue raised in 29946 where
listing networks from API will return `null` if the result of
network filter is empty.

The reason for the issue was that inside the `filterNetworks()`,
the return value was initialized as `nil`:
```
 var typeNet []types.NetworkResource
```

This is inconsistent with other places where return value was
initialized with `[]`
```
displayNet := []types.NetworkResource{}
```

This fix addresses the issue by changing `typeNet` to `[]` as well.

This fix fixes 29946.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 6ae709bf10e97c0a0ad8aebb9075f59eaea97ba9
Component: engine
2017-01-11 01:56:11 -08:00
95646d90c7 Merge pull request #29206 from ripcurld0/doc_api_update
Specify content type in the build request
Upstream-commit: 24e9ac15759cc23caf90383b5ea6de79af4363a0
Component: engine
2017-01-11 08:41:39 +01:00
acaf4ba63f Allow swarm init with --availability=drain
This fix adds a new flag `--availability` to `swarm join`.

Related documentation has been updated.

An integration test has been added.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 0f30c644441b3b4150252af1b41db99d4b6e697a
Component: engine
2017-01-10 16:31:51 -08:00
9a5d4b9c8d Allow swarm join with --availability=drain
This fix tries to address the issue raised in 24596 where it was not
possible to join as manager only (`--availability=drain`).

This fix adds a new flag `--availability` to `swarm join`.

Related documentation has been updated.

An integration test has been added.

NOTE: Additional pull request for swarmkit and engine-api will
be created separately.

This fix fixes 24596.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: a8e7e37aa82d1adac67b05836ea97a06fbdfdbf0
Component: engine
2017-01-10 16:31:51 -08:00
b998fced62 plugins: rename DeviceCreation to AllowAllDevices
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: f265727bdf637c717cd8bdc8675aff4d1714963e
Component: engine
2017-01-10 13:50:30 -08:00
8f27f74ad0 Update docs and code to use application/x-tar in the build API
At the "Build image from Dockerfile" section in the API docs
the Content-Type header is missing.
In addition, some parts in the code are still setting the
Content-Type header to application/tar while it was changed
to application/x-tar since 16th September 2015.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: b1996728aaeaa147c2045c8be79373d59ce7117a
Component: engine
2017-01-10 06:40:06 +02:00
701de0a381 Merge pull request #29226 from yongtang/28535-prune-until-follow-up
Add `--filter until=<timestamp>` for `docker container/image prune`
Upstream-commit: f1fdbeca2a39c7189b1ca8db4e4543fe77ff1150
Component: engine
2017-01-09 17:58:01 +01:00
775c5633ef *: use opencontainers/go-digest package
The `digest` data type, used throughout docker for image verification
and identity, has been broken out into `opencontainers/go-digest`. This
PR updates the dependencies and moves uses over to the new type.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 7a855799175b6b984886ef1cfa337d6df1d4c668
Component: engine
2017-01-06 18:48:41 -08:00
0c3b3bfadc Add --filter until=<timestamp> for docker container/image prune
This fix is a follow up for comment
https://github.com/docker/docker/pull/28535#issuecomment-263215225

This fix provides `--filter until=<timestamp>` for `docker container/image prune`.

This fix adds `--filter until=<timestamp>` to `docker container/image prune`
so that it is possible to specify a timestamp and prune those containers/images
that are earlier than the timestamp.

Related docs has been updated

Several integration tests have been added to cover changes.

This fix fixes #28497.

This fix is related to #28535.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 58738cdee327f5de481dcf7d3d377374cbb5f13a
Component: engine
2017-01-04 14:16:42 -08:00
17d62dfc95 replace no-remove by sample-volume-plugin in docs
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: bcead9282e17f51b01c4edfa59221546f02aaa33
Component: engine
2017-01-03 16:03:48 -08:00
2678d8d52e Set expected response headers for Ping.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 17f9f5abf4cdf72ce6b5f8f2f69e5a872c6a3b56
Component: engine
2017-01-03 11:47:47 -05:00
f43a9bc718 Convert ContainerTopOKResponse from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 16bdbaaa3357dc1be7d74a283a3ed8d0d861a461
Component: engine
2017-01-03 11:47:47 -05:00
39aeb042a4 Generate GraphDriver from spec, and fix up image spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 8d5f558de016814ab3629bd0b5b7cc5fd98805b3
Component: engine
2017-01-03 11:47:47 -05:00
c049133b66 Generate ImageDeleteResponse from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 5988b84e4fd9a512e3e8f98b3cfd7c030a4f013e
Component: engine
2017-01-03 11:47:47 -05:00
0a6e02b356 Generate ImageHistory from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b462c93edb44790ca309e3721950cb23be5d7d62
Component: engine
2017-01-03 11:47:44 -05:00
483e5a0688 Generate ContainerChanges from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b83d9bf6a9d92731573631ebd077a00e3f60c0cd
Component: engine
2017-01-03 09:35:40 -05:00
1fc6e0566f API: Delete container can return 409, but that isn't documented. #29796
Signed-off-by: Daniel Zhang <jmzwcn@gmail.com>
Upstream-commit: c0cf14a73c38bf573803be8bc50af95a411732ba
Component: engine
2017-01-01 16:01:56 +08:00
6b3d2b6135 Merge pull request #28631 from likel/master
Don't do format if it's unnecessary
Upstream-commit: d6be0e98027611cfb14a3246ca797bee0936e649
Component: engine
2016-12-30 01:13:12 +01:00
82cdad076c fail fast when network filter invalid
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: ee2925e2f970a83581aadd08704b117b09377d23
Component: engine
2016-12-29 17:34:53 +08:00
22afb90b38 Merge pull request #29752 from allencloud/fix-nits-in-comments
fix nits in comments
Upstream-commit: 9fab262690a1e9c465687b3dc22f84b053c5624f
Component: engine
2016-12-28 08:33:48 -05:00
96e9f269ff Merge pull request #29666 from tonistiigi/client-deps
Clean up client binary dependencies
Upstream-commit: bf6eb855391e166a65db284567686fafbe4a9a0a
Component: engine
2016-12-27 15:01:24 -05:00
0cddfcad2f fix nits in comments
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 6fb05778ba241b344dd9014ff1091e3f70a8b40c
Component: engine
2016-12-27 23:30:50 +08:00
7c2700ecf9 Remove redundant format
Signed-off-by: Ke Li <kel@splunk.com>

Add missing changes

Signed-off-by: Ke Li <kel@splunk.com>

User errors.New to create error

Signed-off-by: Ke Li <kel@splunk.com>
Upstream-commit: 514adcf4580effa4820be8d5e6d2c0ea9825ceb2
Component: engine
2016-12-27 21:46:52 +08:00
c7bd985ccb Merge pull request #29707 from gesellix/delete-plugin-swagger
fix swagger description for `DELETE /plugin/{name}`
Upstream-commit: 55d5c80214481299a1627a3bb2e32c4c1e358700
Component: engine
2016-12-27 12:24:51 +01:00
98d422fce0 Move UAStringKey to dockerversion pkg
Removes grpc dependency from client

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 64981b9f095459ae65954ca80a86c8f4a735ef24
Component: engine
2016-12-26 18:53:22 -08:00
1c2e3ffc9c Define PushResult in api types
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 13222160e84a01db2174c0dbf3000761a756fd72
Component: engine
2016-12-26 18:53:22 -08:00
24535638bb fix swagger description for DELETE /plugin/{name}
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Upstream-commit: e6b2829a7f59b59eb1c3653313bc3c6a56b47b0c
Component: engine
2016-12-26 15:27:59 +01:00
59db12afbb rename clusterProvider to cluster in router
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 0238e9e92bd8a2bdc805578b18bc342b1c482a85
Component: engine
2016-12-26 20:53:13 +08:00
478844dff8 Implement content addressability for plugins
Move plugins to shared distribution stack with images.

Create immutable plugin config that matches schema2 requirements.

Ensure data being pushed is same as pulled/created.

Store distribution artifacts in a blobstore.

Run init layer setup for every plugin start.

Fix breakouts from unsafe file accesses.

Add support for `docker plugin install --alias`

Uses normalized references for default names to avoid collisions when using default hosts/tags.

Some refactoring of the plugin manager to support the change, like removing the singleton manager and adding manager config struct.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 3d86b0c79b16334ce5836c0315e4c310b84c2e17
Component: engine
2016-12-23 13:29:58 -08:00
e6fc7a5576 Merge pull request #29599 from anusha-ragunathan/refcount
Enforce zero plugin refcount during disable, not remove.
Upstream-commit: d1dfc1a5ef95dc5621a07915f9786199442043c7
Component: engine
2016-12-22 15:38:54 -08:00
9eac558235 Enforce zero plugin refcount during disable.
When plugins have a positive refcount, they were not allowed to be
removed. However, plugins could still be disabled when volumes
referenced it and containers using them were running.

This change fixes that by enforcing plugin refcount during disable.
A "force" disable option is also added to ignore reference refcounting.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 8cb2229cd18c53bdbf36301f26db565a50027d6a
Component: engine
2016-12-22 13:26:53 -08:00
433a6ae35a Merge pull request #29314 from vdemeester/no-more-utils
Remove the utils package
Upstream-commit: b9ee31ae027bbd62477fea3f58023c90f051db00
Component: engine
2016-12-22 15:21:05 +01:00
36a05ce983 Move names to package api
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: dba271a42ab4841dbcf2e953491e9ee728cd8e16
Component: engine
2016-12-21 22:42:47 +01:00
97f0ab72fa Merge pull request #29527 from allencloud/change-minor-mistake
change minor mistake of spelling
Upstream-commit: b2e348f2a6ab2d5396acf4bb56aea7e49c3e2097
Component: engine
2016-12-21 13:15:00 -05:00