Commit Graph

182 Commits

Author SHA1 Message Date
Vincent Demeester 3f9924077a Merge pull request #29565 from yuexiao-wang/fix-typo-tls
Change tls to TLS
2016-12-22 12:10:09 +01:00
Brian Goff fe406bb866 Merge pull request #29527 from allencloud/change-minor-mistake
change minor mistake of spelling
2016-12-21 13:15:00 -05:00
WANG Yuexiao fe5937d0a7 Remove unused var 'errTLSConfigUnavailable' (#29626)
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-12-21 06:41:14 -05:00
yuexiao-wang d044b55ee0 Change tls to TLS
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-12-20 22:08:07 +08:00
allencloud 693328f346 change minor mistake of spelling
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-20 21:05:19 +08:00
Tõnis Tiigi 368e309073 Merge pull request #29456 from cpuguy83/fix_client_events_race
Fixes a race condition in client events monitoring
2016-12-16 17:07:43 -08:00
Brian Goff bcb7147ae5 Fixes a race condition in client events monitoring
In cases where there is high latency (ie, not-local network)
`waitExitOrRemoved` was not receiving events for short-lived containers.
This caused the client to hang while waiting for a notification that the
container has stopped.

This happens because `client.Events()` returns immediately and spins a
goroutine up to process events. The problem here is it returns before
the request to the events endpoint is even made.
Even without high-latency issues, there is no guarantee that the
goroutine is even scheduled by the time the function returns.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-12-16 10:11:53 -05:00
Tõnis Tiigi 50d32cdc08 Merge pull request #29104 from duglin/Issue29084
Fix processing of unset build-args during build
2016-12-07 17:18:55 -08:00
Doug Davis 259859289b Fix processing of unset build-args during build
This reverts 26103.  26103 was trying to make it so that if someone did:
  docker build --build-arg FOO .
and FOO wasn't set as an env var then it would pick-up FOO from the
Dockerfile's ARG cmd.  However, it went too far and removed the ability
to specify a build arg w/o any value. Meaning it required the --build-arg
param to always be in the form "name=value", and not just "name".

This PR does the right fix - it allows just "name" and it'll grab the value
from the env vars if set. If "name" isn't set in the env then it still needs
to send "name" to the server so that a warning can be printed about an
unused --build-arg. And this is why buildArgs in the options is now a
*string instead of just a string - 'nil' == mentioned but no value.

Closes #29084

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-12-07 07:41:55 -08:00
Vincent Demeester 7ca372f95e Merge pull request #28535 from yongtang/28497-prune-until
Convert DanglingOnly to Filters for `docker image prune`
2016-12-06 11:03:45 +01:00
Tibor Vass cff6855751 Merge pull request #28963 from vieux/refactor_plugin_install
refactor plugin install
2016-12-05 12:00:29 -08:00
unclejack ee4988f4b2 api/types/container,client: gofmt
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2016-12-05 17:00:36 +02:00
Yong Tang b3c4bacff2 Convert DanglingOnly to Filters for `docker image prune`
This fix convert DanglingOnly in ImagesPruneConfig to Filters,
so that it is possible to maintain API compatibility in the future.

Several integration tests have been added to cover changes.

This fix is related to 28497.

A follow up to this PR will be done once this PR is merged.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-12-02 20:08:49 -08:00
Victor Vieux 7520858943 refactor plugin install
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2016-12-02 15:23:08 -08:00
Yong Tang 47f0fde2cf Support plugins in `docker inspect`
This fix tries to address the proposal raised in 28946
to support plugins in `docker inspect`.

The command `docker inspect` already supports
"container", "image", "node", "network", "service", "volume", "task".
However, `--type plugin` is not supported yet at the moment.

This fix address this issue by adding the support of `--type plugin`
for `docker inspect`.

An additional integration test has been added to cover the changes.

This fix fixes 28946.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-12-02 11:33:29 -08:00
Sebastiaan van Stijn f11c4529cb Merge pull request #29026 from yuexiao-wang/fix-client-test
Optimize the log info for client test
2016-12-01 16:30:07 +01:00
yuexiao-wang 7673aad223 Fix the inconsistent function name for client
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-12-02 04:18:02 +08:00
yuexiao-wang 9a9c077e63 Optimize the log info for client test
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-12-02 03:32:04 +08:00
Akihiro Suda 232944cc15 client: add accessor methods for client.customHTTPHeaders
Added two methods:

 - *Client.CustomHTTPHeaders() map[string]string
 - *Client.SetCustomHTTPHeaders(headers map[string]string)

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-11-29 09:02:52 +00:00
Vincent Demeester 32f410cd35 Fixes ImageList to be retro-compatible with older API
Make sure current client code can talk for ImageList can still talk to
older daemon.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-11-28 22:15:50 +01:00
Sebastiaan van Stijn 36a1664cd4 Merge pull request #28506 from bfirsh/prepare-api-docs-for-swagger-docs
Prepare docs and Swagger definition for automatically generated API docs
2016-11-22 22:47:38 +01:00
Tibor Vass 7cc80114de Merge pull request #28595 from anusha-ragunathan/plugin_timeout
Allow HTTP client timeout to be configurable on plugin enable.
2016-11-22 10:17:10 -08:00
Victor Vieux 4d87ef4432 Merge pull request #28529 from allencloud/update-secret-create-url
fix secret create url for consistency
2016-11-22 09:55:17 -08:00
Ben Firshman 9c9ae79e64 Rename Remote API to Engine API
Implementation of https://github.com/docker/docker/issues/28319

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-22 12:49:38 +00:00
Vincent Demeester 2a9b8737a5 Merge pull request #28651 from YuPengZTE/devMD002
First header should be a top level header
2016-11-22 13:11:37 +01:00
Vincent Demeester 800c0e20ce Merge pull request #28659 from xuzhenglun/master
bugfix: incorrect ErrConnectFailed Comparison
2016-11-22 13:01:05 +01:00
Reficul b35205ed12 fix incorrect ErrConnectFailed comparison
Signed-off-by: Reficul <xuzhenglun@gmail.com>
2016-11-22 10:42:55 +08:00
yupeng 4e4541540f First header should be a top level header
Signed-off-by: yupeng <yu.peng36@zte.com.cn>
2016-11-22 09:33:21 +08:00
Victor Vieux e6dc69b4ee Merge pull request #28504 from runcom/fix-info-route-secopt
api: types: do not remove old SecurityOptions struct
2016-11-21 13:55:07 -08:00
Anusha Ragunathan 43e89b5387 Add HTTP client timeout.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-11-21 13:11:40 -08:00
Zhang Wei 20ded0afd9 Bugfix: set cli.manualOverride when env var not empty
If env var "DOCKER_API_VERSION" is specified by user, we'll set
`cli.manualOverride`, before this, this field is always true due to
wrong logic.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-11-21 17:31:46 +08:00
Antonio Murdaca b4fe4fb42b api: types: keep info.SecurityOptions a string slice
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-11-19 13:21:16 +01:00
Aaron Lehmann b58a973b18 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>
2016-11-18 09:31:31 -08:00
Vincent Demeester e360a30a41 Merge pull request #28540 from lixiaobing10051267/masterNewContainerId
expected new_container_id while testing ContainerCommit
2016-11-18 12:13:30 +01:00
lixiaobing10051267 e98be4c62f expected new_container_id while testing ContainerCommit
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
2016-11-18 10:21:04 +08:00
allencloud 42788cad9c update secret create url for consistency
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-11-18 10:18:21 +08:00
Sebastiaan van Stijn d9a5f6c80e Merge pull request #28512 from anusha-ragunathan/fix_enable
Cleanup after plugin install.
2016-11-17 10:16:47 +01:00
Sebastiaan van Stijn 6e6b37b0a2 Merge pull request #28322 from Microsoft/jjh/api1.26
Bump API to v1.26
2016-11-17 00:01:46 +01:00
Anusha Ragunathan 4749582510 Cleanup after plugin install.
During error cases, we dont cleanup correctly. This commit takes care
of removing the plugin, if there are errors after the pull passed. It
also shuts down the plugin, if there are errors after the plugin in the
enable path.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-11-16 14:45:51 -08:00
John Howard b5b095c01a Bump API to v1.26
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-14 14:24:02 -08:00
wefine 2eb3e2ce0f fix t.Errorf to t.Error in serveral _test.go
Signed-off-by: wefine <wang.xiaoren@zte.com.cn>
2016-11-14 17:54:43 +08:00
Vincent Demeester 85e72de60c 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>
2016-11-11 15:34:01 +01:00
Victor Vieux dc4d7a83ff Merge pull request #28217 from Microsoft/jjh/373engineapifollowup
Tidy GetDockerOS() function
2016-11-10 18:57:56 -08:00
Victor Vieux 1f6f5bec49 move plugins out of experimental
Signed-off-by: Victor Vieux <vieux@docker.com>
2016-11-10 15:51:32 -08:00
Andrea Luzzardi f88c041647 api: Service Logs support
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2016-11-10 13:46:02 -08:00
Victor Vieux 98408aa5c8 Merge pull request #28164 from anusha-ragunathan/plugin-build
Add plugin create functionality.
2016-11-09 17:49:51 -08:00
Aaron Lehmann de1b8f9439 Add unlock key rotation
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-11-09 16:09:01 -08:00
Aaron Lehmann a8dc2ff916 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>
2016-11-09 16:09:00 -08:00
Tonis Tiigi dd81022c23 Add support for swarm init lock and swarm unlock
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-11-09 16:09:00 -08:00
Anusha Ragunathan 3d7a95829e Add plugin create functionality.
Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-11-09 15:23:03 -08:00