1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

11 commits

Author SHA1 Message Date
John Howard
9182cf1a8d Bump API to v1.26
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-14 14:24:02 -08:00
Victor Vieux
e98e4a7111 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>
2016-11-08 04:55:27 -08:00
Daniel Nephin
d32ffb72b7 Refactor client/request
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-31 17:36:49 -04:00
John Howard
dcd242d8a2 Windows: Hint to run client elevated
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-14 10:42:04 -07:00
Stephen J Day
401778b7e2
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>
2016-10-11 15:53:14 -07:00
Aaron Lehmann
9bd8c1d332 Merge pull request #26804 from stevvooe/clear-tlsconfig-unix-socket
client: pedantic checking of tlsconfig
2016-10-11 15:47:47 -07:00
Sean Rodman
bec07890aa 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>
2016-10-03 09:02:20 -05:00
Stephen J Day
dc9f5c2ca3
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>
2016-09-27 16:27:48 -07:00
Stephen J Day
9a072adff3
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>
2016-09-19 11:19:55 -07:00
Stephen J Day
8e5ef8af5c
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>
2016-09-08 17:47:43 -07:00
Michael Crosby
7c36a1af03 Move engine-api client package
This moves the engine-api client package to `/docker/docker/client`.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-09-07 11:05:58 -07:00