Commit Graph

4974 Commits

Author SHA1 Message Date
580f2ecac8 Merge pull request #32540 from cpuguy83/add_logdrivers_to_info
Add logdrivers to /info
Upstream-commit: e8abe0a69d0d6838412a63d7170b9b92877ec3a2
Component: engine
2017-04-25 23:25:30 -05:00
74bc2c5808 move service runtime filter to server
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: bb30ab9b5f8ebbe412148ae380e69af6e3503d34
Component: engine
2017-04-25 15:38:46 -04:00
7ee17f3128 Merge pull request #32470 from runcom/remove-init-client
remove --init-path from client
Upstream-commit: e1101b1295f05ef3c6f1a684a51cd508b3c7874c
Component: engine
2017-04-25 10:25:58 +02:00
1a70cac422 Merge pull request #32341 from ripcurld0/tt_rm_ut
Use a test table in the daemon delete unit tests
Upstream-commit: a3a109d9569ffb8896bc27d9b8fc6ac946071b94
Component: engine
2017-04-25 10:25:05 +02:00
fa19ecf48f Merge pull request #32608 from darrenstahlmsft/WindowsNanoCPUs
Windows: Fix scaling of NanoCPUs (--cpus) on Hyper-V containers
Upstream-commit: d0ce488d9d420ebc7a448a51a58e4aa14041da7e
Component: engine
2017-04-24 10:54:14 -05:00
be541248e1 Merge pull request #31912 from AkihiroSuda/ovl-on-non-swarm
improve error of `docker network create -d overlay` on non-Swarm node
Upstream-commit: f9311c52cee8ddc13e69862b2f060013eeb82aba
Component: engine
2017-04-24 17:20:48 +02:00
8cc7c79d45 Merge pull request #32654 from allencloud/use-make-slice-to-store-swarmkit-objects
use make slice to store cluster objects to improve efficiency
Upstream-commit: a709f79c1a98c3661f12397fe61f0e6a46f1dbb3
Component: engine
2017-04-22 12:02:34 -04:00
9019dbd01c Merge pull request #32668 from darrenstahlmsft/CleanupEmpty
Windows: Do not clean empty windowsfilter folder
Upstream-commit: b8e9250b59de8619b94f7532c0fc182913028f1e
Component: engine
2017-04-20 14:55:45 +02:00
b70b785207 Use a test table in the daemon delete unit tests
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 8f51746997e4ea26fdc80703d3e9c881b87816f2
Component: engine
2017-04-18 10:30:40 +03:00
347c2cd583 Windows: Do not attempt to clean empty windowsfilter folder
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 5e4e357f6e53ed9aeb0d4988d8c780acd5da3ed5
Component: engine
2017-04-17 13:10:15 -07:00
1053121285 Fix tmp folder deletion
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 5cea9a0aa557401447d440ce2286be19f8fe3cc2
Component: engine
2017-04-17 13:09:40 -07:00
d44cde780d Merge pull request #32614 from aaronlehmann/testify
Remove pkg/testutil/assert in favor of testify
Upstream-commit: 1eec7b5583662d82c39510e54e050b21ebf11a18
Component: engine
2017-04-17 11:07:08 -04:00
142883d5b3 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>
Upstream-commit: 6052f2b3969feadb01662d8e2f30337d9c7f61af
Component: engine
2017-04-14 12:03:21 -07:00
62078c31fe 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>
Upstream-commit: 8a27758364a151d9497cbb507463e81898579c37
Component: engine
2017-04-14 10:44:24 -07:00
fb1eb48bd3 use make slice to store objects to improve efficiency
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: ac245e28453f321a8b0f4d1f6415f1de685907bb
Component: engine
2017-04-14 11:02:28 +08:00
9b0f3956d8 Merge pull request #32449 from aaronlehmann/cluster-locking
cluster: Allow reentrant calls to methods during shutdown
Upstream-commit: 01c80435c6cef5730e51fa848b5771232b40e143
Component: engine
2017-04-12 18:58:12 -07:00
fabe67a25e Fix scaling of NanoCPUs on Hyper-V containers
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 3b5af0a289d76366790092439e53d3983f342472
Component: engine
2017-04-12 16:54:27 -07:00
866adfbbee Merge pull request #28923 from erikh/fix-copy
Fix copy API (`docker cp`, etc) uid/gid handling
Upstream-commit: d40a17ffc2f6592396a3dfc0f5ebe396c2107536
Component: engine
2017-04-12 08:21:17 -07:00
4d6ef8b711 Merge pull request #32529 from runcom/relabel-secrets
daemon: relabel secrets path
Upstream-commit: 2aec48f44843016d13dfe4b5f53d29d0226fc769
Component: engine
2017-04-12 08:30:30 -04:00
1386ad9dee 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>
Upstream-commit: 8a7ff5ff746a77e0be601c11540562341b2228c1
Component: engine
2017-04-12 10:33:19 +00:00
b106d15a5c 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>
Upstream-commit: 9c77a4c2973a62beb5e6cc57b1970e97edca97d8
Component: engine
2017-04-12 05:31:00 +00:00
62eff90f69 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>
Upstream-commit: 17abacb8946ed89496fcbf07a0288fafe24cb7b0
Component: engine
2017-04-11 18:07:15 -04:00
3323cc5ab7 add service convert tests
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: dc762610ab538bb7909eeb6ca13ada83e3d409b4
Component: engine
2017-04-11 14:02:02 -04:00
26d7ec7da8 return exec.Controller instead of nil
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 3a9be929272d089d57745350b8888760a18b2526
Component: engine
2017-04-11 14:02:02 -04:00
3cad237312 updates for review comments
- runtimeUrl -> type_url
- runtimes -> runtime

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 8c2c69d31ec0ce4a9b125ca3cbf7b04ee81ce579
Component: engine
2017-04-11 14:02:01 -04:00
21134b3d48 filter services by runtime; default to container
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: f71bdc67a21a63b901e484a0650bea36d15eece5
Component: engine
2017-04-11 14:02:01 -04:00
5d661a7bc0 add support for swarmkit generic runtime
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: e06e2ef107ad09191bfea3dfe51cfa830114b54b
Component: engine
2017-04-11 14:02:01 -04:00
218a4e5c97 daemon: relabel secrets path
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: b11af7b2f686fe3724d0cfce260000a3d2b8fbc1
Component: engine
2017-04-11 17:43:23 +02:00
c0ea8e35b1 Merge pull request #32503 from dongluochen/fix_startperiod
fix gRPC serialization for healthcheck start-period
Upstream-commit: b93db343630119b186294e50216b76190b942c98
Component: engine
2017-04-11 10:19:16 -04:00
d2aa64e45c Merge pull request #32284 from aaronlehmann/fix-service-defaults
Improve default handling for "service create"
Upstream-commit: a258ef58d8a100467d5d948b026a884ebe58eaf4
Component: engine
2017-04-11 13:06:53 +02:00
89e454a1d4 Merge pull request #31954 from darrenstahlmsft/GraphdriverReference
Windows: Fix reference counting in graphdriver
Upstream-commit: a6746e6ca5da6df6af9d93fc51149c35d58a55fd
Component: engine
2017-04-10 20:23:15 -07:00
9c833700c4 Merge pull request #32092 from alfred-landrum/gdcaps
Let graphdrivers declare diff stream fidelity
Upstream-commit: 74093fe4ca259c5378da89098c48fb7b1167732e
Component: engine
2017-04-10 18:20:32 -07:00
72f89cba18 Windows: Fix reference counting in graphdriver
Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: 7fab9b8a6054270763508ce88cb06c584cfeb153
Component: engine
2017-04-10 17:13:17 -07:00
a06cb35e0f fix gRPC serialization for healthcheck start-period
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: caab178509b9da0194b3a45286ff6f253fec667c
Component: engine
2017-04-10 17:02:58 -07:00
3d267a0dc8 Change "service inspect" to show defaults in place of empty fields
This adds a new parameter insertDefaults to /services/{id}. When this is
set, an empty field (such as UpdateConfig) will be populated with
default values in the API response. Make "service inspect" use this, so
that empty fields do not result in missing information when inspecting a
service.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 1d274e9acfe96b98be3ec956636ff4e5c70e98af
Component: engine
2017-04-10 13:41:16 -07:00
88f1fa957c Merge pull request #32479 from aboch/vnd
Do not error out on serv bind deactivation if no sbox is found
Upstream-commit: 129d1f7051d77278bcc918b4fd2e848292d74f84
Component: engine
2017-04-10 22:16:04 +02:00
ef02a743db Merge pull request #28403 from cpuguy83/logging_plugins
Implement plugins for logging drivers
Upstream-commit: 28334c1d829b9ea8ac7e10d45a6db37c3821d5db
Component: engine
2017-04-10 21:57:56 +02:00
e5dfac43c9 Merge pull request #31148 from yongtang/31032-NanoCPU-update
Add `--cpus` support for `docker update`
Upstream-commit: 5b1cae227171a299e41835a4806cd939b984c596
Component: engine
2017-04-10 20:02:15 +02:00
6d75b7a10d Merge pull request #30740 from yongtang/29999-prune-filter-label
Add `label` filter for `docker system prune`
Upstream-commit: 4460312ce1a53316e3c474ab951b85e737a902c5
Component: engine
2017-04-10 19:38:01 +02:00
276ea6a456 Implement plugins for logging drivers
Logging plugins use the same HTTP interface as other plugins for basic
command operations meanwhile actual logging operations are handled (on
Unix) via a fifo.

The plugin interface looks like so:

```go
type loggingPlugin interface {
  StartLogging(fifoPath string, loggingContext Context) error
  StopLogging(fifoPath)
```

This means a plugin must implement `LoggingDriver.StartLogging` and
`LoggingDriver.StopLogging` endpoints and be able to consume the passed
in fifo.

Logs are sent via stream encoder to the fifo encoded with protobuf.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 27bd6842f8518780b99fdb42f8e7f84c17856d87
Component: engine
2017-04-10 13:17:20 -04:00
bad834206e Do not error out on serv bind deactivation if no sbox is found
- If the nw sbox is not there, then there is nothing to deactivate.

Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 2418f257675807e5ae578137af48a2622797b746
Component: engine
2017-04-10 09:13:41 -07:00
6e350af41d remove --init-path from client
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: a18d103b5ed4ed6ef95b2e4b582872a82022cceb
Component: engine
2017-04-10 16:49:43 +02:00
3d6e7463ee Fix missing Init Binary in docker info output
- Moved DefaultInitBinary from daemon/daemon.go to
daemon/config/config.go since it's a daemon config and is referred in
config package files.
- Added condition in GetInitPath to check for any explicitly configured
DefaultInitBinary. If not, the default value of DefaultInitBinary is
returned.
- Changed all references of DefaultInitBinary to refer to the variable
from new location.
- Added TestCommonUnixGetInitPath to test for the various values of
GetInitPath.

Fixes #32314

Signed-off-by: Sunny Gogoi <indiasuny000@gmail.com>
Upstream-commit: 17b128876028022991e2dbcb2cc402cc81b451e5
Component: engine
2017-04-10 16:54:07 +05:30
c7be93cd96 Merge pull request #32436 from thaJeztah/refactor-tiny-version-parsing
Refactor tiny version parsing
Upstream-commit: 51aa2a226e21e20c5b4634a28245c760f4e18f37
Component: engine
2017-04-08 17:36:40 +02:00
36c4c39157 Refactor "init" version parsing, and add unit-test
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 72eddf4258db8c10b145ded188d13c50e4a5530b
Component: engine
2017-04-08 11:28:37 +02:00
e2a7ae61b2 cluster: Allow reentrant calls to methods during shutdown
The agent sometimes calls into libnetwork code that in turn calls
(*Cluster).IsAgent and (*Cluster).IsManager. These can cause the
node shutdown process to time out, since they wait for a lock that is
held by Cleanup.

It turns out c.mu doesn't need to be held while calling Stop. Holding
controlMutex is sufficient. Also, (*nodeRunner).Stop must release
nodeRunner's mu during the node shutdown process, otherwise the same
call into Cluster would be blocked on this lock instead.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 44ce809c954eec6755ba975ab7fe1c11ebbdfed2
Component: engine
2017-04-07 19:21:10 -07:00
137edd889c Merge pull request #32339 from aluzzardi/selinux
services: Add support for Credential Spec and SELinux
Upstream-commit: 091b5e68ea735bf4e8ece708bbc8c413a32eab73
Component: engine
2017-04-08 01:37:17 +02:00
ddc6479238 Merge pull request #32154 from dperny/refactor-logs
Refactor logs and support service logs with TTY 
Upstream-commit: 4a1a64c67768d6fbcf20a1b37ee58212b7e870c6
Component: engine
2017-04-07 18:06:50 -04:00
e41369fcc4 services: Add support for Credential Spec and SELinux
- Defined "normalized" type for Credential Spec and SELinux
- Added --credential-spec to docker service create & update
- SELinux is API only at the time

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: 89a995a9d77cc4f95a29579e0a2b12cb3d805749
Component: engine
2017-04-07 11:30:54 -07:00
593669c329 Merge pull request #32283 from aboch/clearingress
Daemon to take care of ingress cleanup on cluster leave and graceful shutdown
Upstream-commit: 87562af45bf32efce55d9fceb141a655b82a33c4
Component: engine
2017-04-07 20:09:27 +02:00