Commit graph

921 commits

Author SHA1 Message Date
Vincent Demeester
fa4b377bbc Merge pull request #32876 from YuPengZTE/devIneffectualAssignment
delete ineffectual assignment
2017-05-03 20:55:57 +02:00
Daniel Nephin
c87d67b0ad Refacator pkg/streamformatter
StreamFormatter suffered was two distinct structs mixed into a single struct
without any overlap.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-05-02 17:38:12 -04:00
Vincent Demeester
1504d51701 Merge pull request #32843 from ehazlett/stack-service-filter
Remove service runtime filter in stack command
2017-05-02 14:10:20 +02:00
Brian Goff
25058d9b0c Merge pull request #32828 from cyli/external-ca-cert
Add the `CACert` parameter to the `ExternalCA` object
2017-04-28 10:30:57 -04:00
Brian Goff
a7519152d9 Merge pull request #32504 from dongluochen/healthcheck_duration
do not allow duration less than 1 ms in healthcheck parameters
2017-04-27 23:54:00 -04:00
yupengzte
5794008b68 delete ineffectual assignment
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
2017-04-28 11:26:38 +08:00
Brian Goff
0307fe1a0b Merge pull request #32717 from fcrisciani/data_path
Data path traffic separation option in swarm mode
2017-04-27 13:00:55 -04:00
Sebastiaan van Stijn
6559abaf47 Merge pull request #31557 from ripcurld0/add_stack_ls
Add the format option to the docker stack ls command
2017-04-26 19:13:33 -07:00
Tõnis Tiigi
22d9eadee2 Merge pull request #32564 from dnephin/compose-file-rel-dir
Set Composefile WorkingDir to dirname of the composefile.
2017-04-26 17:30:33 -07:00
Flavio Crisciani
8dc8cd4719
Inroduce SWARM --data-path-addr flag
This new flag will allow the configuration of an interface that
can be used for data path traffic to be isolated from control
plane traffic. This flag is simply percolated down to libnetwork
and will be used by all the global scope drivers (today overlay)

Negative test added for invalid flag arguments

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-04-26 15:33:15 -07:00
Ying Li
b0401a71f7 Add the CACert parameter to the ExternalCA object in order to match
swarmkit's API type.  Make sure this parameter gets propagated to
swarmkit, and also add an extra option to the CLI when providing
external CAs to parse the CA cert from a file.

Signed-off-by: Ying Li <ying.li@docker.com>
2017-04-26 10:45:12 -07:00
Evan Hazlett
95e6c848b1 remove service runtime filter in stack command
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-04-26 09:11:51 -04:00
Vincent Demeester
08422650be Merge pull request #32829 from aaronlehmann/cli-image-tests-corrections
cli: Correct command/image tests for testify
2017-04-26 11:29:11 +02:00
Kenfe-Mickaël Laventure
e8abe0a69d Merge pull request #32540 from cpuguy83/add_logdrivers_to_info
Add logdrivers to /info
2017-04-25 23:25:30 -05:00
John Howard
d4fb626e36 Merge pull request #32817 from vdemeester/fix-win-it
Fix docker run -it on windows
2017-04-25 20:10:38 -07:00
Aaron Lehmann
acc2d5b7d6 cli: Correct command/image tests for testify
These tests were caught in the crossfire of the transition to testify.
testify has a few subtle differences from the similar custom framework
it replaced:

- Error behaves differently
- Equal takes its arguments in a different order

This PR also takes the opportunity to use a few shorthands from testify,
such as Len, True, and False.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-04-25 16:24:07 -07:00
Evan Hazlett
bb30ab9b5f move service runtime filter to server
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-04-25 15:38:46 -04:00
Vincent Demeester
8c014db302 Fix docker run -it on windows
Signed-off-by: Vincent Demeester <vincent@demeester.fr>
2017-04-25 18:25:05 +02:00
Boaz Shuster
205ec49de9 Add format to docker stack ls
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2017-04-25 16:45:30 +03:00
Vincent Demeester
e1101b1295 Merge pull request #32470 from runcom/remove-init-client
remove --init-path from client
2017-04-25 10:25:58 +02:00
Vincent Demeester
663f0ba1b2 Merge pull request #32248 from icapurro/cli-image-tests
Unit tests for cli/command/image package
2017-04-24 17:01:26 +02:00
John Howard
c22b21fede Merge pull request #32731 from hairyhenderson/one-line-swarm-join-output-32725
Output `docker swarm join` command on a single line when running `docker swarm init`
2017-04-24 09:53:16 -05:00
Ignacio Capurro
b2551c619d Unit tests for cli/commands/image (except build and tag)
Signed-off-by: Ignacio Capurro <icapurrofagian@gmail.com>
2017-04-23 12:27:39 -05:00
Vincent Demeester
bb5dfdb8c5 Merge pull request #32632 from ColinHebert/compose_add_labels_during_build
Add support for labels during build with compose
2017-04-21 10:16:48 +02:00
Dave Henderson
50368e7a0e
Output docker swarm join on a single line
This avoids issues when copy/pasting between different shells on
different OSes, which may not all support `\` as a continuation
character.

Fixes #32725

Signed-off-by: Dave Henderson <dhenderson@gmail.com>
2017-04-20 07:18:25 -05:00
Daniel Nephin
cad32e0111 Set Composefile WorkingDir to dirname of the composefile.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-04-17 15:14:58 -04:00
Vincent Demeester
3f676c1918
Fix formatter unit test (moving to testify)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-04-17 17:32:52 +02:00
Daniel Nephin
1eec7b5583 Merge pull request #32614 from aaronlehmann/testify
Remove pkg/testutil/assert in favor of testify
2017-04-17 11:07:08 -04:00
Sebastiaan van Stijn
a3ab46361e Merge pull request #30962 from TheHipbot/30431-implement-format-for-history-with-docs
30431 implement format for history with docs
2017-04-16 10:34:41 -07:00
Colin Hebert
bddd9cce40 Regenerate schema with the correct libraries
Signed-off-by: Colin Hebert <hebert.colin@gmail.com>
2017-04-15 13:00:23 +10:00
Colin Hebert
0ee58cb3b9 Run go generate github.com/docker/docker/cli/compose/schema
Signed-off-by: Colin Hebert <hebert.colin@gmail.com>
2017-04-15 10:57:43 +10:00
Colin Hebert
1d1defa399 Add support for labels during build with compose
Signed-off-by: Colin Hebert <hebert.colin@gmail.com>
2017-04-15 05:31:28 +10:00
Aaron Lehmann
6052f2b396 Remove pkg/testutil/assert in favor of testify
I noticed that we're using a homegrown package for assertions. The
functions are extremely similar to testify, but with enough slight
differences to be confusing (for example, Equal takes its arguments in a
different order). We already vendor testify, and it's used in a few
places by tests.

I also found some problems with pkg/testutil/assert. For example, the
NotNil function seems to be broken. It checks the argument against
"nil", which only works for an interface. If you pass in a nil map or
slice, the equality check will fail.

In the interest of avoiding NIH, I'm proposing replacing
pkg/testutil/assert with testify. The test code looks almost the same,
but we avoid the confusion of having two similar but slightly different
assertion packages, and having to maintain our own package instead of
using a commonly-used one.

In the process, I found a few places where the tests should halt if an
assertion fails, so I've made those cases (that I noticed) use "require"
instead of "assert", and I've vendored the "require" package from
testify alongside the already-present "assert" package.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-04-14 12:03:21 -07:00
Aaron Lehmann
8a27758364 Hide zero-valued timestamps from service JSON
It was possible to see output like this:

        "UpdateStatus": {
            "State": "updating",
            "StartedAt": "2017-04-14T17:10:03.226607162Z",
            "CompletedAt": "1970-01-01T00:00:00Z",
            "Message": "update in progress"
        }

The timestamp fields were already changed to pointers, and left nil if
the timestamp value was zero. However the zero-value of a timestamp from
gRPC is different from the value Go considers to be zero. gRPC uses the
Unix epoch instead of Go's epoch. Therefore, check that the timestamp
does not match the Unix epoch.

Also, add " ago" to the timestamps as shown in "docker service inspect
--pretty", as they are shown as relative times.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-04-14 10:44:24 -07:00
Sebastiaan van Stijn
0b35ab1965 Merge pull request #31482 from ripcurld0/add_format_to_system_df
Add format to the docker system df command
2017-04-13 10:08:11 -07:00
Dong Chen
5fc912d2c8 do not allow duration less than 1 ms in healthcheck parameters
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2017-04-12 10:48:31 -07:00
Anusha Ragunathan
d40a17ffc2 Merge pull request #28923 from erikh/fix-copy
Fix copy API (`docker cp`, etc) uid/gid handling
2017-04-12 08:21:17 -07:00
Erik Hollensbe
8a7ff5ff74 daemon/archive.go: Fix copy routines to preserve UID.
This changes the long-standing bug of copy operations not preserving the
UID/GID information after the files arrive to the container.

Signed-off-by: Erik Hollensbe <github@hollensbe.org>
2017-04-12 10:33:19 +00:00
Anusha Ragunathan
3343653edb Merge pull request #32030 from ehazlett/any-runtime
Support Swarmkit Generic Task Runtime
2017-04-11 17:53:20 -07:00
Brian Goff
17abacb894 Add logdrivers to /info
This is required for swarmkit to be able to filter based on log driver.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-04-11 18:07:15 -04:00
Vincent Demeester
8a8c1961b5 Merge pull request #32059 from seriousben/support-dns-stack-file
add support for dns nameservers and search domains in stack files
2017-04-11 21:32:52 +02:00
Evan Hazlett
8c2c69d31e updates for review comments
- runtimeUrl -> type_url
- runtimes -> runtime

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-04-11 14:02:01 -04:00
Evan Hazlett
f71bdc67a2 filter services by runtime; default to container
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-04-11 14:02:01 -04:00
Sebastiaan van Stijn
a258ef58d8 Merge pull request #32284 from aaronlehmann/fix-service-defaults
Improve default handling for "service create"
2017-04-11 13:06:53 +02:00
Victor Vieux
18ae574cab Merge pull request #32496 from tonistiigi/build-target
builder: add an option for specifying build target
2017-04-10 19:02:21 -07:00
Victor Vieux
17a3e4511d Merge pull request #32462 from dperny/service-logs-general-availability
Remove experimental from service logs
2017-04-10 18:30:20 -07:00
Victor Vieux
3a9572ca14 Merge pull request #32110 from adshmh/30977-stack-rm-should-accept-multiple-labels
stack rm should accept multiple arguments
2017-04-10 18:19:59 -07:00
Benjamin Boudreau
6b60a60729
Adding support for dns in stack files
Signed-off-by: Benjamin Boudreau <boudreau.benjamin@gmail.com>
2017-04-10 20:46:33 -04:00
Tonis Tiigi
33e07f41ad builder: add an option for specifying build target
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-04-10 16:21:43 -07:00
Sebastiaan van Stijn
ec207ce186 Merge pull request #32116 from mkumatag/inspect_template
Adopt text/template in node inspect
2017-04-10 23:02:26 +02:00