Commit Graph

10215 Commits

Author SHA1 Message Date
Sebastiaan van Stijn b2de6e55bd Merge pull request #27333 from yongtang/27049-ListOpt
Use ListOpt for `docker network create --label` and `docker volume create --label`
2016-10-14 00:31:09 -07:00
Sebastiaan van Stijn bfe16dcfe2 Merge pull request #26819 from ripcurld00d/fix_stats_mutex
Hide the mutex lock in formatter.ContainerStats
2016-10-13 17:38:22 -07:00
Alexander Morozov 5eef6637ef Merge pull request #27338 from yuexiao-wang/instream-err
Fix the incorrect description for NewInStream
2016-10-13 12:32:43 -07:00
Tõnis Tiigi 1f17f52314 Merge pull request #27276 from yuexiao-wang/func-name
Modify function name from SetDaemonLogLevel to SetLogLevel
2016-10-13 12:10:59 -07:00
yuexiao-wang b6fbe832ac Fix the incorrect description for NewInStream
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-10-13 22:33:09 +08:00
Yong Tang 49e49e8e00 Use ListOpt for `docker network create --label` and `docker volume create --label`
This fix is related to 27049 and 27047. For `--label` flag, if string slice is
used (like 27047), then quote can not be used in command and will result in
an error :
```
line 1, column 14: bare " in non-quoted-field
```

The issue 27047 has been fixed by 27049.

Recently I found out that both `docker network create --label` and `docker volume create --label`
still use string slice and will return the same error when quotes are used.

This fix fixes `docker network create --label` and `docker volume create --label`
by using `ListOpt` (as 27049) as well.

This fix has been tested and verified manually.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-10-12 16:06:34 -07:00
Stephen J Day 4d1a6a43cd 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 bc55f969b0 Merge pull request #26804 from stevvooe/clear-tlsconfig-unix-socket
client: pedantic checking of tlsconfig
2016-10-11 15:47:47 -07:00
Sebastiaan van Stijn 2e2f16a621 Merge pull request #27294 from mlaventure/hide-unused-volume-fields
Move types.Volumes optional fields under a new type
2016-10-11 23:55:25 +02:00
Kenfe-Mickael Laventure 5018781cab Move types.Volumes optional fields under a new type
This allows us to hide those fields when they are not filled.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-10-11 11:49:26 -07:00
yuexiao-wang a0e694d7c0 Modify function name from SetDaemonLogLevel to SetLogLevel
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-10-11 19:35:12 +08:00
yuexiao-wang f4267969c7 Modify function name from SetDaemonLogLevel to SetLogLevel
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-10-11 19:35:12 +08:00
Sebastiaan van Stijn bc50354deb Merge pull request #26894 from thaJeztah/improve-log-level-help
Improve --log-level help text
2016-10-11 12:35:42 +02:00
allencloud 6ef1c7deaf return nil when no node or service to avoid additional api call
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-10-11 10:59:16 +08:00
Sebastiaan van Stijn 0594aa6ac2 Merge pull request #27232 from bfirsh/godoc-client
Add GoDoc for client package
2016-10-10 23:25:34 +02:00
Sebastiaan van Stijn bed046666a Improve --log-level help text
This information was added in
1efc940e6f547760e5e8f4648acb120ff19fdc58,
but removed again in
a271eaeba224652e3a12af0287afbae6f82a9333
to make the help-output fit in a 80-chars
terminal.

This adds the available options again
in the help output, and updates the CLI
reference documentation to match actual
output.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-10-10 23:10:17 +02:00
Boaz Shuster 3bc50c45ba Hide the mutex in formatter.ContainerStats
The formatter.ContainerStats struct exposes its Mutex.
This is a bad design and should be fixed.

To fix that, I separated the statistics
attributes from ContainerStats to StatsEntry and
hid the mutex. Notice that the mutex protects both
the `err` field and the statistics attributes.

Then, implemented SetStatistics, SetError, GetStatistics
and GetError to avoid races.

Moreover, to make this less granular, I decided to
replace the read-write mutex with the regular mutex and
to pass a StatsEntry slice to formatter.ContainerStatsWrite

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2016-10-10 21:52:53 +03:00
allencloud 871b692833 better prune and system df
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-10-11 00:42:21 +08:00
Sebastiaan van Stijn 0c6d66b89a Merge pull request #26778 from WeiZhang555/parallel-operations
Support parallel kill,rm
2016-10-10 18:31:10 +02:00
yuexiao-wang 80bc917226 Add the OPTIONS and Fix the links for contain prune
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-10-11 00:13:33 +08:00
Ben Firshman a41ec7d802 Add GoDoc for client package
- Tightened up copy in README
- Make example in README a bit simpler
- Update README to point at GoDoc

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-10-10 09:27:07 +01:00
Deng Guangxing afb60b86d7 fix typo in client/errors.go comments
Signed-off-by: Deng Guangxing <dengguangxing@huawei.com>
2016-10-08 15:29:32 +08:00
Vincent Demeester 2ba5d3a260 Merge pull request #23389 from Microsoft/jjh/credentialspec
Windows: Support credential specs
2016-10-07 18:32:44 +02:00
John Howard e307da732a Windows: Support credential specs
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-06 09:32:22 -07:00
John Howard 6bc667128a Windows: Support credential specs
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-10-06 09:32:22 -07:00
Alexander Morozov 8691f7c542 Merge pull request #25837 from reaperhulk/support-compressing-build-context
Add support for compressing build context during image build
2016-10-05 12:57:46 -07:00
Sean Rodman a318ab842a 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
Arnaud Porterie 71ffe11776 Merge pull request #26108 from mlaventure/data-mngt
New Data Management commands
2016-10-01 03:17:18 +00:00
Paul Kehrer e25646bbc0 Add support for compressing build context during image build
When sending a build context to a remote server it may be
(significantly) advantageous to compress the build context. This commit
adds support for gz compression when constructing a build context
using a command like "docker build --compress ."

Signed-off-by: Paul Kehrer <paul.l.kehrer@gmail.com>
2016-09-30 17:46:08 -05:00
Sebastiaan van Stijn ebfd0d6602 Merge pull request #27049 from dnephin/fix-label-flag-type
Use ListOpt for build labels
2016-09-30 23:40:08 +02:00
Kenfe-Mickael Laventure 3f8c4be283 Add new df subcomand to the system command
This command display the state of the data usage of the docker daemon.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-09-30 14:35:23 -07:00
Vincent Demeester e2870295aa Merge pull request #26697 from allencloud/change-service-scale-logic
validate service parameter in client side to avoid api call in `docker service scale`
2016-09-30 18:37:35 +02:00
Daniel Nephin d6b5a807d7 Use ListOpt for labels.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-29 17:59:52 -04:00
Kenfe-Mickael Laventure d7efdb095e Add DiskUsage method to SystemApiclient
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-09-29 07:42:53 -07:00
Kenfe-Mickael Laventure 6f8bb41ecb Add subcommand prune to the container, volume, image and system commands
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-09-29 07:42:53 -07:00
Kenfe-Mickael Laventure da8eef56ce Add subcommand prune to the container, volume, image and system commands
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-09-29 07:42:53 -07:00
Kenfe-Mickael Laventure 82dc15836b Update Images() to allow retrieving specific image size data
Those data include:
 - size of data shared with other images
 - size of data unique to a given image
 - how many containers are using a given image

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-09-29 07:42:53 -07:00
allencloud 65b1e54c73 add \n in engine labels display in docker node inspect xxx --pretty
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-09-29 18:17:54 +08:00
Vincent Demeester 5ca7909308 Merge pull request #24850 from yongtang/24270-service-tasks-filter
Fix partial/full filter issue in `service tasks --filter`
2016-09-28 11:50:27 +02:00
Zhang Wei 5c1362ce59 Support parallel rm
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-09-28 12:07:18 +08:00
Zhang Wei f612b93d33 Support parallel kill
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-09-28 12:03:19 +08:00
Brian Goff 715d301f12 Merge pull request #26951 from AkihiroSuda/update-ut-cli-command-service
Fix cli/command/service/opts_test.go, and add some extra test cases
2016-09-27 20:30:26 -04:00
Stephen J Day e7678f3a37 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
Vincent Demeester bf824fee21 Merge pull request #26255 from Microsoft/jjh/xenon-test-infrastructure
Add isolation to info - enables Hyper-V containers CI bring-up
2016-09-27 18:46:51 +02:00
Vincent Demeester b322c8e506 Merge pull request #26906 from allencloud/add-endpoint-mode-in-service-pretty
add endpoint mode in service pretty
2016-09-27 18:28:43 +02:00
Akihiro Suda 2126d8160d Fix cli/command/service/opts_test.go, and add some extra test cases
`m.Set("type=volume,target=/foo,volume-nocopy")` is valid even though it lacks "source"

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-09-27 15:27:02 +00:00
Yong Tang e0f229d2ca Let swarmkit handle cluster defaults in `swarm init` if not specified
This fix tries to address the issue raised in 24958 where previously
`docker swarm init` will automatically fill in all the default value
(instead of letting swarmkit to handle the default).

This fix update the `swarm init` so that initial value are passed only
when a flag change has been detected.

This fix fixes 24958.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-27 04:19:38 -07:00
allencloud cc375fafd0 add endpoint mode in service pretty
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-09-27 18:41:19 +08:00
Yong Tang 2d844ea5c8 Fix partial/full filter issue in `service tasks --filter`
This fix tries to address the issue related to 24108 and 24790, and
also the case from 24620#issuecomment-233715656

The reason for the failure case in the above mentioned issues is that
currently Task names are actually indexed by Service Name
(`e.ServiceAnnotations.Name`)

To fix it, a pull request in swarmkit (swarmkit/pull/1193) has been
opened separately.

This fix adds the integration tests for the above mentioned issues.
Swarmkit revendoring is needed to completely fix the issues.

This fix fixes 24108.
This fix fixes 24790.
This fix is related to 24620.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-09-26 16:01:20 -07:00
Sebastiaan van Stijn 53c51901d7 Merge pull request #23886 from AkihiroSuda/stackcli
add `docker stack ls`
2016-09-26 21:19:04 +02:00