Commit Graph

12 Commits

Author SHA1 Message Date
76b998fd2d Fix the inconsistent function name for client
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: 16233eb055ef03c760f76c276b4491ee3246c0b4
Component: engine
2016-12-02 04:18:02 +08:00
900e9ed78b Bump API to v1.26
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 9182cf1a8dc592c40d25b628a0a3cfa475c8dcea
Component: engine
2016-11-14 14:24:02 -08: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
a2eb4ad244 Refactor client/request
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: d32ffb72b7a9979448345947b27347f3adfa8460
Component: engine
2016-10-31 17:36:49 -04:00
064957cb0f Windows: Hint to run client elevated
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: dcd242d8a2e6532d18f17e8a9a6f98edd2ca8bc1
Component: engine
2016-10-14 10:42:04 -07:00
96a5105111 client: deterministically resolve http scheme
The docker client has historically used Transport.TLSClientConfig to set
the scheme for the API client. A recent moved the resolution to use the
http.Transport directly, rather than save the TLSClientConfig state on a
client struct. This caused issues when mutliple calls made with a single
client would have this field set in the http package on pre-1.7
installations. This fix detects the presence of the TLSClientConfig once
and sets the scheme accordingly.

We still don't know why this issue doesn't happen with Go 1.7 but it
must be more deterministic in the newer version.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 401778b7e2ccfba31190537de847fcdbce745bd2
Component: engine
2016-10-11 15:53:14 -07:00
30c8a928f4 Merge pull request #26804 from stevvooe/clear-tlsconfig-unix-socket
client: pedantic checking of tlsconfig
Upstream-commit: 9bd8c1d3321d1b264e84ff5fba4dc04730c264f3
Component: engine
2016-10-11 15:47:47 -07:00
8708a9aea8 Updated the client/request.go sendClientRequest method to return a PermissionDenied error if the connection failed due to permissions.
Signed-off-by: Sean Rodman <srodman7689@gmail.com>

Updated the check for the permission error to use os.IsPermission instead of checking the error string. Also, changed the PermissionDenied method to just a new error.

Fixed a typo in client/request.go

Fixed Error name as specified by Pull request builder output.

Worked on making changes to the permissiondenied error.

Fixed typo

Signed-off-by: Sean Rodman <srodman7689@gmail.com>

Updated error message as requested.

Fixed the error as requested

Signed-off-by: Sean Rodman <srodman7689@gmail.com>
Upstream-commit: bec07890aad6c7a6699623ab8a61b37e65a7e63d
Component: engine
2016-10-03 09:02:20 -05:00
d96c693644 client: pedantic checking of tlsconfig
Under the convoluted code path for the transport configuration,
TLSConfig was being set even though the socket type is unix. This caused
other code detecting the TLSConfig to assume https, rather than using
the http scheme. This led to a situation where if `DOCKER_CERT_PATH` is
set, unix sockets start reverting to https. There is other odd behavior
from go-connections that is also reproduced here.

For the most part, we try to reproduce the side-effecting behavior from
go-connections to retain the current docker behavior. This whole mess
needs to ripped out and fixed, as this pile spaghetti is unnacceptable.

This code is way to convoluted for an http client. We'll need to fix
this but the Go API will break to do it.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: dc9f5c2ca3cdf8fef5786a80a0a1b0e7c18d4420
Component: engine
2016-09-27 16:27:48 -07:00
7360a13030 client: remove transport package
This package doesn't really seem to do anything of real interest.
Removing it and replacing with a few helper functions. Most of this was
maintaining a fork of ctxhttp to support a mock that was unnecessary.

We could probably do with a further refactor of the client interface.
There is a lot of confusion of between transport, http layer and
application layer that makes for some awkward code. This change
improves the situation to the point where no breaking changes are
introduced.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 9a072adff3fcd90c4f36214b355ef27b423f0144
Component: engine
2016-09-19 11:19:55 -07:00
015d80b443 client: don't hide context errors
Instead of reformatting error from the request action, we wrap it,
allowing the cause to be recovered. This is important for consumers that
need to be able to detect context errors, such as `Cancelled` and
`DeadlineExceeded`.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 8e5ef8af5c90a3fbc93173cb485d42e044ca56ae
Component: engine
2016-09-08 17:47:43 -07:00
60a22c207c Move engine-api client package
This moves the engine-api client package to `/docker/docker/client`.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 7c36a1af031b510cd990cf488ee5998a3efb450f
Component: engine
2016-09-07 11:05:58 -07:00