Commit graph

4996 commits

Author SHA1 Message Date
Vincent Demeester
4219156a62 Merge pull request #32687 from runcom/oci-selinux
Switch to using opencontainers/selinux for selinux bindings
2017-04-29 19:05:32 +02:00
Sebastiaan van Stijn
f0bb1d7a4a Merge pull request #32920 from fcrisciani/remote_addr
Change GetRemoteAddress to return an IP list
2017-04-28 15:42:21 -07:00
Flavio Crisciani
441e861095
Change GetRemoteAddr to return all managers
Respect the new provider interface

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-04-28 13:17:34 -07: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
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
Brian Goff
ae0f8c7ba1 Merge pull request #31984 from tonistiigi/remote-context
builder: Refactor remote context
2017-04-27 11:50:18 -04:00
Tõnis Tiigi
5eca7f7c5d Merge pull request #31856 from jim-minter/more_races
Resolve a set of race conditions in logging and attaching code
2017-04-26 16:04:02 -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
Kenfe-Mickaël Laventure
d4bf6ad716 Merge pull request #32574 from mlaventure/add-ctx-to-df-prune
Add ctx to df and prune
2017-04-26 15:42:08 -05: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
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
Tonis Tiigi
d1faf3df27 Refactor remote context parsing
Redefine a better interface for remote context dependency.

Separate Dockerfile build instruction from remote context.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-04-25 14:35:31 -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
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
a3a109d956 Merge pull request #32341 from ripcurld0/tt_rm_ut
Use a test table in the daemon delete unit tests
2017-04-25 10:25:05 +02:00
Antonio Murdaca
abbbf91498
Switch to using opencontainers/selinux for selinux bindings
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-04-24 21:29:47 +02:00
Kenfe-Mickael Laventure
3279ca3c00 Prevent multiple identical parallel pruning operations
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-04-24 09:13:05 -07:00
Kenfe-Mickael Laventure
0dee69799e Honor context cancellation when pruning
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-04-24 09:11:29 -07:00
Kenfe-Mickael Laventure
5a9f2a3ce6 Prevent multiple parallel SystemDiskUsage call
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-04-24 09:11:29 -07:00
Kenfe-Mickael Laventure
cf7d246ab0 Honor context within SystemDiskUsage
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-04-24 09:11:29 -07:00
John Howard
d0ce488d9d Merge pull request #32608 from darrenstahlmsft/WindowsNanoCPUs
Windows: Fix scaling of NanoCPUs (--cpus) on Hyper-V containers
2017-04-24 10:54:14 -05:00
Vincent Demeester
f9311c52ce Merge pull request #31912 from AkihiroSuda/ovl-on-non-swarm
improve error of `docker network create -d overlay` on non-Swarm node
2017-04-24 17:20:48 +02:00
Brian Goff
a709f79c1a Merge pull request #32654 from allencloud/use-make-slice-to-store-swarmkit-objects
use make slice to store cluster objects to improve efficiency
2017-04-22 12:02:34 -04:00
Vincent Demeester
b8e9250b59 Merge pull request #32668 from darrenstahlmsft/CleanupEmpty
Windows: Do not clean empty windowsfilter folder
2017-04-20 14:55:45 +02:00
Jim Minter
4fdb17c777 Prevent ContainerLogs from hanging if container doesn't run for long
Signed-off-by: Jim Minter <jminter@redhat.com>
2017-04-20 12:27:51 +01:00
Jim Minter
68e71aa3e6 Close logger only after StartLogger call
Signed-off-by: Jim Minter <jminter@redhat.com>
2017-04-20 12:27:50 +01:00
Jim Minter
32ca1214fa Fix race on ContainerAttachRaw
Signed-off-by: Jim Minter <jminter@redhat.com>
2017-04-20 12:27:50 +01:00
Boaz Shuster
8f51746997 Use a test table in the daemon delete unit tests
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2017-04-18 10:30:40 +03:00
Darren Stahl
5e4e357f6e Windows: Do not attempt to clean empty windowsfilter folder
Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-04-17 13:10:15 -07:00
Darren Stahl
5cea9a0aa5 Fix tmp folder deletion
Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-04-17 13:09:40 -07: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
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
allencloud
ac245e2845 use make slice to store objects to improve efficiency
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-04-14 11:02:28 +08:00
Tõnis Tiigi
01c80435c6 Merge pull request #32449 from aaronlehmann/cluster-locking
cluster: Allow reentrant calls to methods during shutdown
2017-04-12 18:58:12 -07:00
Darren Stahl
3b5af0a289 Fix scaling of NanoCPUs on Hyper-V containers
Signed-off-by: Darren Stahl <darst@microsoft.com>
2017-04-12 16:54:27 -07:00
Dong Chen
d8b6a35d02 set 1ms as container duration minimum value
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2017-04-12 15:45:29 -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
Evan Hazlett
2aec48f448 Merge pull request #32529 from runcom/relabel-secrets
daemon: relabel secrets path
2017-04-12 08:30:30 -04: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
Akihiro Suda
9c77a4c297 improve error of docker network create -d overlay on non-Swarm node
before: Error response from daemon: datastore for scope "global" is not initialized
after: Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-04-12 05:31:00 +00: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
Evan Hazlett
dc762610ab add service convert tests
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-04-11 14:02:02 -04:00
Evan Hazlett
3a9be92927 return exec.Controller instead of nil
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-04-11 14:02:02 -04: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
Evan Hazlett
e06e2ef107 add support for swarmkit generic runtime
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-04-11 14:02:01 -04:00
Antonio Murdaca
b11af7b2f6
daemon: relabel secrets path
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-04-11 17:43:23 +02:00