Commit Graph

886 Commits

Author SHA1 Message Date
4489cc6ffc Merge pull request #30962 from TheHipbot/30431-implement-format-for-history-with-docs
30431 implement format for history with docs
Upstream-commit: a3ab46361ee91dc99790e84369b4865572bd9f8c
Component: engine
2017-04-16 10:34:41 -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
e9836650c4 Merge pull request #31482 from ripcurld0/add_format_to_system_df
Add format to the docker system df command
Upstream-commit: 0b35ab196546a4de068060f10418cc5416d5b62c
Component: engine
2017-04-13 10:08:11 -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
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
b94b999d77 Merge pull request #32030 from ehazlett/any-runtime
Support Swarmkit Generic Task Runtime
Upstream-commit: 3343653edb9a9c152c043de577effda1d528d6c0
Component: engine
2017-04-11 17:53:20 -07:00
7ec6dbcc2e Merge pull request #32059 from seriousben/support-dns-stack-file
add support for dns nameservers and search domains in stack files
Upstream-commit: 8a8c1961b58ef687e4a07002bdf1be4784ff7142
Component: engine
2017-04-11 21:32:52 +02: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
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
0bf5e70579 Merge pull request #32496 from tonistiigi/build-target
builder: add an option for specifying build target
Upstream-commit: 18ae574cab9c4eb5183e419b1ca698dd76ed1194
Component: engine
2017-04-10 19:02:21 -07:00
108aa4253e Merge pull request #32462 from dperny/service-logs-general-availability
Remove experimental from service logs
Upstream-commit: 17a3e4511d8f20868a051f10dbedabdce7ea2f9c
Component: engine
2017-04-10 18:30:20 -07:00
6516b7e3d8 Merge pull request #32110 from adshmh/30977-stack-rm-should-accept-multiple-labels
stack rm should accept multiple arguments
Upstream-commit: 3a9572ca14c821ea0cf24dd590f608392e7a6ad1
Component: engine
2017-04-10 18:19:59 -07:00
7254b7d783 Adding support for dns in stack files
Signed-off-by: Benjamin Boudreau <boudreau.benjamin@gmail.com>
Upstream-commit: 6b60a60729e0b22cc74197e5d00d1621435da7f7
Component: engine
2017-04-10 20:46:33 -04:00
a89a2c21c5 builder: add an option for specifying build target
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 33e07f41adc0ec96edad5f22bc2cfaec0d26ea58
Component: engine
2017-04-10 16:21:43 -07:00
bdda1a695e Merge pull request #32116 from mkumatag/inspect_template
Adopt text/template in node inspect
Upstream-commit: ec207ce186bff1804f49c456f77fe7d377e63d30
Component: engine
2017-04-10 23:02:26 +02:00
1dfd61e802 Make the CLI show defaults from the swarmkit defaults package
If no fields related to an update config or restart policy are
specified, these structs should not be created as part of the service,
to avoid hardcoding the current defaults.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: bbe1202410a580b8bdb35e7b50e4e4028e530111
Component: engine
2017-04-10 13:41:18 -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
24a0a6b6bb Remove experimental from service logs
Service logs API is now stable. Service logs now support all features,
except retrieving details provided to the log driver.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 306cfecc8c146ea8addb44dd35296808b25916a2
Component: engine
2017-04-10 13:40:45 -07:00
15fc803536 Merge pull request #31236 from tonistiigi/docker-stdin
build: accept -f - to read Dockerfile from stdin
Upstream-commit: 778e32a2fadcf1ccb1819ad6534af5c477585300
Component: engine
2017-04-10 20:14:54 +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
e6a4499500 Merge pull request #32427 from adshmh/add-unit-tests-to-cli-command-idresolver-package
Added unit tests to the cli/command/idresolver package
Upstream-commit: a5b9d99b9e3db4d85cccd55d0f4c26c9fc37c498
Component: engine
2017-04-10 12:41:09 -04:00
708ad46cdf Adopt text/template in node inspect
Signed-off-by: Manjunath A Kumatagi <mkumatag@in.ibm.com>
Upstream-commit: 5dbd6afb5144a937df73bfe42364e583e789d80d
Component: engine
2017-04-10 17:47:15 +05:30
73fce35ed0 Merge pull request #32062 from aaronlehmann/change-network-attachments
Support service network attachment changes
Upstream-commit: b0831acb09662431ecfed84677e7f5ed54635d52
Component: engine
2017-04-10 12:49:28 +02:00
6633b439bb Add format to the docker system df command
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Upstream-commit: 985a9c7047616885454951e7c8282f3c94f6d6e9
Component: engine
2017-04-10 13:04:03 +03:00
04adcf44c3 Merge pull request #31364 from adshmh/30935-use-encrypted-client-certificate-to-connect-to-a-docker-host
use an encrypted client certificate to connect to a docker daemon
Upstream-commit: 2daa2b894c1cf62936fe55dc8782c486aafaecdd
Component: engine
2017-04-10 10:42:01 +02:00
df8ed895e4 Added unit tests to the cli/command/idresolver package
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 32486385e6ae67763f507373c8ca737d2d87669b
Component: engine
2017-04-07 23:23:39 -04:00
cb5c83df55 Merge pull request #32409 from dnephin/support-consistency-params-in-compose
Add support for volume consistency in compose format
Upstream-commit: fc6d8fb94d2d9070e58d83dbf13f40c0efa715e3
Component: engine
2017-04-07 17:26:50 -07:00
b9faf048c8 Show network names in "docker service inspect --pretty"
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 56f1da77c33dcc5e752dce2694887878f93ffea6
Component: engine
2017-04-07 16:46:25 -07:00
f7bf680f7a cli: Deploying a compose file must use TaskTemplate.Networks
This is the non-deprecated field, and the one that can be changed in a
service update.

Since old daemon versions don't allow migrating from one field to the
other, make this conditional on the API version.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: b8e70747c625998c6e0678b79c51645de814a7c6
Component: engine
2017-04-07 16:46:25 -07:00
499e804f82 cli: Allow service's networks to be updated
Resolve networks IDs on the client side.

Avoid filling in deprecated Spec.Networks field.

Sort networks in the TaskSpec for update stability.

Add an integration test for changing service networks.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 0f2669a63834844fb0ef5c017f517d8c321ad3c7
Component: engine
2017-04-07 16:46:25 -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
9156acdd4f Add support for volume consistency in compose format.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: ae27355b095181748daa1d68d07f8e45904b14cc
Component: engine
2017-04-07 13:23:33 -04:00
072232e704 Merge pull request #32289 from adshmh/add-unit-tests-for-cli-command-secret-package
add unit tests for package cli/command/secret
Upstream-commit: 8b9d54c084c951f57219de706ddb45fc2305ca89
Component: engine
2017-04-07 15:26:40 +02:00
1f0e0155dc use an encrypted client certificate to connect to a docker daemon
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 603dd8b3b48273c0c7e1f2aef5f344acac66424e
Component: engine
2017-04-07 01:50:51 -04:00
334f054f13 refactor logs and support service logs /w tty
Refactor container logs system to make communicating log messages
internally much simpler. Move responsibility for marshalling log
messages into the REST server. Support TTY logs. Pave the way for fixing
the ambiguous bytestream format. Pave the way for fixing details.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 1044093bb0aa12eb8972361a93b9bc8c4ddd857b
Component: engine
2017-04-06 17:54:11 -07:00
1623433ab1 Add support for update order
This parameter controls the order of operations when rolling out an
update task. Either the old task is stopped before starting the new one,
or the new task is started first, and the running tasks will briefly
overlap.

This commit adds Rollout to the API, and --update-order / --rollback-order
flags to the CLI.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 9b54994a8ada6ae15a4d2c3b925568e2061200ad
Component: engine
2017-04-06 17:23:36 -07:00
ba4f1c70ab Add --cpus support for docker update
This fix tries to address the issue raised in 31032 where it was
not possible to specify `--cpus` for `docker update`.

This fix adds `--cpus` support for `docker update`. In case both
`--cpus` and `--cpu-period/--cpu-quota` have been specified,
an error will be returned.

Related docs has been updated.

Integration tests have been added.

This fix fixes 31032.

This fix is related to 27921, 27958.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 61022436926a8d0c92068e8116a2ad77f43eb6d6
Component: engine
2017-04-06 15:40:12 -07:00
a532c2b899 Merge pull request #32407 from dnephin/fix-rw-mode-compose-files
Support rw as a volume option in compose file
Upstream-commit: 30cdabd13f5cbb09370c3db3f5c7d1384043f3f4
Component: engine
2017-04-06 16:24:20 -04:00
4adfcf1302 Upadte archive.ReplaceFileTarWrapper() to not expect a sorted archive
Improve test coverage of ReplaceFileTarWrapper()

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 8cd6c30a489f7a0210526b0f94469c525ba8e0ee
Component: engine
2017-04-06 13:36:34 -04:00
6f724a82a6 Merge pull request #28938 from elifa/master
Grace period option to health checks.
Upstream-commit: c4010e257f60d4204c5c2f5dc5a8aa5313d1b254
Component: engine
2017-04-06 19:23:56 +02:00
83d9648a45 Add label filter for docker system prune
This fix tries to address the issue raised in 29999 where it was not
possible to mask these items (like important non-removable stuff)
from `docker system prune`.

This fix adds `label` and `label!` field for `--filter` in `system prune`,
so that it is possible to selectively prune items like:
```
$ docker container prune --filter label=foo

$ docker container prune --filter label!=bar
```

Additional unit tests and integration tests have been added.

This fix fixes 29999.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 702524732427ce028277f99f215e1fab297e6001
Component: engine
2017-04-06 09:11:25 -07:00
0d79f39f39 Support rw as a volume option in compose file.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 062830535df4d944fd8e4d626f3da5bdc7b1993a
Component: engine
2017-04-06 10:32:35 -04:00
d9412325fb Merge pull request #32364 from aaronlehmann/preserve-env-order
cli: Preserve order of environment variables
Upstream-commit: f5d881b835fbc12fdb4b0840ab26333170c705f3
Component: engine
2017-04-06 14:25:29 +02:00
e25f6c5a1b Added start period option to health check.
Signed-off-by: Elias Faxö <elias.faxo@gmail.com>
Upstream-commit: e401f63735d8ebcff387c571d1f61ce52bdea86e
Component: engine
2017-04-06 12:35:34 +02:00
3712bab8c4 Factor out adding dockerfile from stdin.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 56bf6de9f7f0d8e35a5170faf0c35ad07c89d04c
Component: engine
2017-04-05 19:42:31 -04:00
06ea8bf159 build: accept -f - to read Dockerfile from stdin
Heavily based on implementation by David Sheets

Signed-off-by: David Sheets <sheets@alum.mit.edu>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 3f6dc81e10b8b813fffaa9b4167a60c5a507fa38
Component: engine
2017-04-05 19:42:31 -04:00