Commit Graph

822 Commits

Author SHA1 Message Date
50f0cb2e24 AcceptedFilters in router/network/filter.go should not be exported
It's not used elsewhere and doesn't need to be exported.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: e517d7975eb7e4dec8326b181e5fcc81b7871575
Component: engine
2016-11-28 14:14:50 +01:00
08d6a8b3d7 Merge pull request #28691 from aluzzardi/service-logs-no-follow
[experimental] service logs: Support no-follow mode
Upstream-commit: c025d5650433de503f0b415b7b5e120cfcd35b17
Component: engine
2016-11-22 13:48:14 -08:00
419cdb27d7 Merge pull request #28595 from anusha-ragunathan/plugin_timeout
Allow HTTP client timeout to be configurable on plugin enable.
Upstream-commit: 677e14643c79184ca9d8123dd3e91e0444b1cac3
Component: engine
2016-11-22 10:17:10 -08:00
3aef405305 Merge pull request #28529 from allencloud/update-secret-create-url
fix secret create url for consistency
Upstream-commit: 772a423e08d6da2dbfebb22382270ea9d075a9a9
Component: engine
2016-11-22 09:55:17 -08:00
abd795e582 service logs: Support no-follow mode
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: c2d435e4f05d262aaa3d4d5cc2fe8965377eebdf
Component: engine
2016-11-21 18:02:13 -08:00
c21adc5da9 Add HTTP client timeout.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 83ca993c154d56e03d6f95a3f8351c48b3ed3e29
Component: engine
2016-11-21 13:11:40 -08:00
36b43dcc24 api: types: keep info.SecurityOptions a string slice
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 514ca09426e5d023753101ffa6ac3a21b0e0efb5
Component: engine
2016-11-19 13:21:16 +01:00
68a4c9aae2 Merge pull request #28524 from aluzzardi/experimental-routes
router: Return explicit error rather than 404 for experimental.
Upstream-commit: c3fab6d47345f0d79efd88d0ea0495dd70f0e9f5
Component: engine
2016-11-18 18:49:15 -08:00
2efd6e2078 Return warnings from service create and service update when digest pinning fails
Modify the service update and create APIs to return optional warning
messages as part of the response. Populate these messages with an
informative reason when digest resolution fails.

This is a small API change, but significantly improves the UX. The user
can now get immediate feedback when they've specified a nonexistent
image or unreachable registry.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 948e60691e523022f88e7f8129f02106a0f8826c
Component: engine
2016-11-18 09:31:31 -08:00
5d1129c013 fix typo
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 1f039a66ac55c937f5dfa281a04009626d191f83
Component: engine
2016-11-18 15:51:36 +08:00
b0d2847574 update secret create url for consistency
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 86d768284303665bf137ac4766a623167a605c76
Component: engine
2016-11-18 10:18:21 +08:00
84fb1a0844 router: Return explicit error rather than 404 for experimental.
Instead of not adding experimental routes at all, fail with an explicit
message if the daemon is not running in experimental mode.

Added the `router.Experimental` which does this automatically.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: 3976a33c1a578827da3726bec3927cc058fe326a
Component: engine
2016-11-17 15:51:47 -08:00
ba96408498 Merge pull request #28532 from stevvooe/disabled-swarm-service-unavailable
api/server/httputils: service unavailable for disable swarm
Upstream-commit: bbac9eeae68a2d1084961dc3b0adc4e9e729647c
Component: engine
2016-11-17 15:16:23 -08:00
e3739bc965 Merge pull request #28383 from zteBill/fix-useless-var
Remove needless var
Upstream-commit: 6969c98a3c9ca90616d88c6a57543ccd5724e6fb
Component: engine
2016-11-17 16:18:07 -05:00
781fc7e6b4 api/server/httputils: service unavailable for disable swarm
When swarm-mode is disabled, we need to return an error indicating this.
406 was chosen for the "Not Acceptable" verbiage, but this code has
specific semantics in relation to the `Accept` header, which aren't
applicable here.

We now use a 503 for this case. While it is not a perfect match, it does
make it clear that the particular "service" (read: API endpoint) is not
available. The body of the message provides the user with enough
information to take action on it by enabling swarm-mode and ensuring the
service is available.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 1d90d7604881e29b71819af9c092d565513aeeec
Component: engine
2016-11-17 11:43:45 -08:00
2b31c00bf1 make each return explicitly
Signed-off-by: zteBill <bi.zhenkun@zte.com.cn>
Upstream-commit: 4b3a1bbda5613ee12d4e94f7797fca51139109a6
Component: engine
2016-11-17 17:13:25 +08:00
1d59d8efa7 Merge pull request #28530 from stevvooe/derandom-error-codes
api/server/httputils: ensure consistent status code
Upstream-commit: e93bd7b8ce01802df25bb83af801a2a45c148cc4
Component: engine
2016-11-16 23:52:52 -08:00
3c5187452a api/server/httputils: ensure consistent status code
Error code resolution is powered by string matching. Not the greatest
thing in the world and I hope no one is proud of this code, but it
works. However, because a map is used, the iteration order of the map is
random, such that if an error matches two of the snippets, it may return
a different error code depending on the seed of the hashmap. This change
converts it to use a slice instead.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 3484e02590117d175d9c1ab24c583390b4e94a55
Component: engine
2016-11-16 18:58:55 -08:00
e75f2fc3c8 Add reference filter and deprecated filter param…
… for `docker images`.

This deprecates the `filter` param for the `/images` endpoint and make a
new filter called `reference` to replace it. It does change the CLI
side (still possible to do `docker images busybox:musl`) but changes the
cli code to use the filter instead (so that `docker images --filter
busybox:musl` and `docker images busybox:musl` act the same).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 820b809e70df8b9c7af00256182c48d935972a5c
Component: engine
2016-11-11 15:34:01 +01:00
1a60835f0f rectify type defination for swarmRouter
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: ac5d86a672c9b46f2c26540690fcbd92c25715dc
Component: engine
2016-11-11 10:45:48 +08:00
4d22d82151 api: Service Logs support
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: 819d0159bbda1b3ae53bdaa9a3e62ac98497e24c
Component: engine
2016-11-10 13:46:02 -08:00
62ec0be101 Merge pull request #28164 from anusha-ragunathan/plugin-build
Add plugin create functionality.
Upstream-commit: 28a1ea342d1f227664ad30ffd05eaaab8c9ef93e
Component: engine
2016-11-09 17:49:51 -08:00
2394a196a1 Add unlock key rotation
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: a6030a50c95cd4e8b39b5f4d5705bb23ebdb28c5
Component: engine
2016-11-09 16:09:01 -08:00
0827ead1b6 Revise swarm init/update flags, add unlocking capability
- Neither swarm init or swarm update should take an unlock key
- Add an autolock flag to turn on autolock
- Make the necessary docker api changes
- Add SwarmGetUnlockKey API call and use it when turning on autolock
- Add swarm unlock-key subcommand

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 0f9fc54df9274327ed22f4e07f0981a648e0278a
Component: engine
2016-11-09 16:09:00 -08:00
2874df7efa Add support for swarm init lock and swarm unlock
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b4a667c8c4f536445d35e8914a58e8c749f16ea6
Component: engine
2016-11-09 16:09:00 -08:00
3e9922773f Merge pull request #28078 from sanimej/inspect
Show peer nodes in network inspect for swarm overlay networks
Upstream-commit: 5ef5a4216a83421122461c90b7aa1ca1d709c4c8
Component: engine
2016-11-09 15:33:13 -08:00
948055475e Add plugin create functionality.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
Upstream-commit: 5b6e1bc9e551ba56b44c3f409fd5d48f8a54ce1d
Component: engine
2016-11-09 15:23:03 -08:00
6c7506b25f Show peer nodes in network inspect for swarm overlay networks
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
Upstream-commit: dd9944aa644c717009a85ab85e00894ef3d3b20f
Component: engine
2016-11-09 13:58:04 -08:00
bd20a72add more review updates
- return err instead of wrap for update secret
- add omitempty for data in secret spec

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 427c70d97779566b2b3ea3a9141bb9bf3dd05dd8
Component: engine
2016-11-09 14:27:45 -05:00
e093728442 review updates
- use Filters instead of Filter for secret list
- UID, GID -> string
- getSecrets -> getSecretsByName
- updated test case for secrets with better source
- use golang.org/x/context instead of context
- for grpc conversion allocate with make
- check for nil with task.Spec.GetContainer()

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: b2e4c7f3b5b30fc6940768ec41836d708a48b463
Component: engine
2016-11-09 14:27:45 -05:00
848c015ac1 more review updates
- use /secrets for swarm secret create route
- do not specify omitempty for secret and secret reference
- simplify lookup for secret ids
- do not use pointer for secret grpc conversion

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 189f89301e0abfee32447f2ca23dacd3a96de06d
Component: engine
2016-11-09 14:27:43 -05:00
b7893465b0 more review changes
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 669a9dbe7f260f2d9e18d80e8f604012122054f7
Component: engine
2016-11-09 14:27:43 -05:00
9dbbc071d5 secrets: secret management for swarm
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

wip: use tmpfs for swarm secrets

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

wip: inject secrets from swarm secret store

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

secrets: use secret names in cli for service create

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

switch to use mounts instead of volumes

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

vendor: use ehazlett swarmkit

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

secrets: finish secret update

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 3716ec25b423d8ff7dfa231a7b3cf0154726ed37
Component: engine
2016-11-09 14:27:43 -05:00
d0ebaa81e8 always add but hide experimental cmds and flags
Signed-off-by: Victor Vieux <vieux@docker.com>

update cobra and use Tags

Signed-off-by: Victor Vieux <vieux@docker.com>

allow client to talk to an older server

Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: e98e4a71110fd33852bb755a9b8b4ebc9df904db
Component: engine
2016-11-08 04:55:27 -08:00
9254ca1e2c Merge pull request #27923 from vieux/plugin_set_gogogo
support env for docker plugin set
Upstream-commit: 03da822ee9afa1713fe28c3996b0872a0e228c28
Component: engine
2016-11-07 17:07:14 -08:00
a773a75547 support env for docker plugin set
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: efbed4500e30ff1a0eef4ff71fd46a58363d041b
Component: engine
2016-11-07 16:59:29 -08:00
fbe06c3bd1 api: add Info struct for v1.24
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 667315576fac663bd80bbada4364413692e57ac6
Component: engine
2016-11-07 10:01:14 +01:00
250cd5b7d2 daemon: add a flag to override the default seccomp profile
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: b237189e6c8a4f97be59f08c63cdcb1f2f4680a8
Component: engine
2016-11-02 21:41:29 +01:00
50046511ff Merge pull request #27948 from WeiZhang555/consistent-filters
Replace all "Filter" field with "Filters" for consistency
Upstream-commit: f96d45dc8ac21db1f082230e2f828a86e15cad46
Component: engine
2016-11-02 00:53:15 -07:00
c7c95dc226 Adds ability to squash image after build
Allow built images to be squash to scratch.
Squashing does not destroy any images or layers, and preserves the
build cache.

Introduce a new CLI argument --squash to docker build
Introduce a new param to the build API endpoint `squash`

Once the build is complete, docker creates a new image loading the diffs
from each layer into a single new layer and references all the parent's
layers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 362369b4bbea38881402d281ee2015d16e8b10ce
Component: engine
2016-11-01 13:41:59 -04:00
9cb45952e0 Replace all "Filter" field with "Filters" for consistency
In file `api/types/client.go`, some of the "*Options{}" structs own a
`Filters` field while some else have the name of `Filter`, this commit
will rename all `Filter` to `Filters` for consistency. Also `Filters`
is consistent with API with format `/xxx?filters=xxx`, that's why
`Filters` is the right name.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 89a6966726941b4b7f0431ab214013cf9c655c25
Component: engine
2016-11-01 23:09:30 +08:00
2c5782817e Generate ContainerWait response from the swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 181562c2e54225d6ce737d98b03d3157451a5dbc
Component: engine
2016-10-31 11:19:53 -04:00
bc7bcb9601 generate AuthResponse type from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 2732b8a9bb3edb92121d0b0dcc144e5f557e2fbf
Component: engine
2016-10-31 11:16:03 -04:00
1b85879c03 Generate container update response from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f196cf6a090556ccb42198043a71d133482b510d
Component: engine
2016-10-31 11:16:02 -04:00
1759ab5e8b Use IDResponse for container create response.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: c8d5e7203e1ae140a5cca312b6699063b521cf83
Component: engine
2016-10-31 11:16:02 -04:00
01541139a5 Add an IDResponse type
Generated from a swagger spec and use it for container exec response

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 01883c136d9ef06962d80aa81e27d1d90eb6d199
Component: engine
2016-10-31 11:16:02 -04:00
913e9a48c1 Generate container create response from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: bad849fc826b410c3aeb753a8c7f6b38f7ae12b0
Component: engine
2016-10-31 11:16:02 -04:00
dc10e9a664 Use a config to generate swagger api types
Moves the resposne types to a package under api/types

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 29df3bdb117a058ae040686dd0f2565ae9ad743a
Component: engine
2016-10-31 11:13:41 -04:00
52c74e2725 Update to inline comments.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 8f81bb92a3e528d0b5facadd55738aefc279caf8
Component: engine
2016-10-31 11:13:41 -04:00
d19255532a Generate VolumesCreateRequest from the swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 5c2498fd3c41f4badb1788665886d30772537f73
Component: engine
2016-10-31 11:13:41 -04:00