Commit Graph

5083 Commits

Author SHA1 Message Date
5f22605796 support cluster events
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: 59d45c384a2de7bca73296ce1471646db14cb0c8
Component: engine
2017-05-17 11:46:30 -07:00
f81cca9824 Merge pull request #33075 from x1022as/stop
fix inconsistent state string with containerd
Upstream-commit: 4dd3e5b77c2f5ab8203cb8fc239e8441a504d799
Component: engine
2017-05-17 09:27:47 -04:00
ad53a9e7a1 Merge pull request #30891 from mixja/awslogs-multiline-support
Add awslogs multiline support
Upstream-commit: 50342883819194f6d86594d076efc948f92c757d
Component: engine
2017-05-17 09:27:21 -04:00
6f26254653 Merge pull request #32237 from jlhawn/update_container_wait
Update Container Wait
Upstream-commit: c053a2069e1c8e99488517071540fb3e526233f3
Component: engine
2017-05-17 02:39:52 +02:00
0e311d1c4e Merge pull request #33151 from nwt/push-foreign-layers
Add daemon option to push foreign layers
Upstream-commit: a30ef99e8dd2c3e7a54b6410a5709f61db59c07f
Component: engine
2017-05-17 02:04:31 +02:00
4fcc705035 Merge pull request #33169 from johnstep/windows-configs
Add Windows configs support
Upstream-commit: 7658851e74b63fa7a1c3dfa5bf950712cfe72d4e
Component: engine
2017-05-16 16:46:34 -07:00
caabf0e2ac Merge pull request #32388 from nishanttotla/pin-by-digest-on-client-alternative
Moving docker service digest pinning to client side
Upstream-commit: d6f4fe9e38b60f63e429fff7ffced9c26cbf8236
Component: engine
2017-05-16 15:24:07 -07:00
fa44d02011 Update ContainerWait API
This patch adds the untilRemoved option to the ContainerWait API which
allows the client to wait until the container is not only exited but
also removed.

This patch also adds some more CLI integration tests for waiting for a
created container and waiting with the new --until-removed flag.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Handle detach sequence in CLI

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Update Container Wait Conditions

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Apply container wait changes to API 1.30

The set of changes to the containerWait API missed the cut for the
Docker 17.05 release (API version 1.29). This patch bumps the version
checks to use 1.30 instead.

This patch also makes a minor update to a testfile which was added to
the builder/dockerfile package.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Remove wait changes from CLI

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address minor nits on wait changes

- Changed the name of the tty Proxy wrapper to `escapeProxy`
- Removed the unnecessary Error() method on container.State
- Fixes a typo in comment (repeated word)

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Use router.WithCancel in the containerWait handler

This handler previously added this functionality manually but now uses
the existing wrapper which does it for us.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Add WaitCondition constants to api/types/container

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address more ContainerWait review comments

- Update ContainerWait backend interface to not return pointer values
  for container.StateStatus type.
- Updated container state's Wait() method comments to clarify that a
  context MUST be used for cancelling the request, setting timeouts,
  and to avoid goroutine leaks.
- Removed unnecessary buffering when making channels in the client's
  ContainerWait methods.
- Renamed result and error channels in client's ContainerWait methods
  to clarify that only a single result or error value would be sent
  on the channel.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Move container.WaitCondition type to separate file

... to avoid conflict with swagger-generated code for API response

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address more ContainerWait review comments

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 4921171587c09d0fcd8086a62a25813332f44112
Component: engine
2017-05-16 15:11:39 -07:00
3f22cbeb2a Update Container Wait Backend
This patch consolidates the two WaitStop and WaitWithContext methods
on the container.State type. Now there is a single method, Wait, which
takes a context and a bool specifying whether to wait for not just a
container exit but also removal.

The behavior has been changed slightly so that a wait call during a
Created state will not return immediately but instead wait for the
container to be started and then exited.

The interface has been changed to no longer block, but instead returns
a channel on which the caller can receive a *StateStatus value which
indicates the ExitCode or an error if there was one (like a context
timeout or state transition error).

These changes have been propagated through the rest of the deamon to
preserve all other existing behavior.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: cfdf84d5d04c8ee656e5c4ad3db993c258e52674
Component: engine
2017-05-16 15:09:14 -07:00
67b57727bd Add daemon option to push foreign layers
The --allow-nondistributable-artifacts daemon option specifies
registries to which foreign layers should be pushed.  (By default,
foreign layers are not pushed to registries.)

Additionally, to make this option effective, foreign layers are now
pulled from the registry if possible, falling back to the URLs in the
image manifest otherwise.

This option is useful when pushing images containing foreign layers to a
registry on an air-gapped network so hosts on that network can pull the
images without connecting to another server.

Signed-off-by: Noah Treuhaft <noah.treuhaft@docker.com>
Upstream-commit: 67fdf574d5acd6ddccb6ece0ffe0ace1c1608712
Component: engine
2017-05-16 14:36:36 -07:00
0f00ae4912 Add Windows configs support
Signed-off-by: John Stephens <johnstep@docker.com>
Upstream-commit: e0d533b1e8a8dd62ed6dff2dfda3c3220e0474b9
Component: engine
2017-05-16 14:25:32 -07:00
b3d84804c2 Merge pull request #32208 from johnstep/windows-secrets
Add Windows secrets support
Upstream-commit: 55fd0d01156dd421fe4dc7851640fb8a7aa32f86
Component: engine
2017-05-16 13:41:53 -07:00
3b93d21d8a Merge pull request #33225 from allencloud/unexport-errPruneRunning
unexport error errPruneRunning
Upstream-commit: d6b16508253df96c89025c9ecbd0698f2d909ee7
Component: engine
2017-05-16 15:50:26 -04:00
4dacea7efb Merge pull request #33144 from nishanttotla/update-swarmkit-platform-structs
Adding Platforms field to TaskSpec Placement
Upstream-commit: 7b7f9a481e21e740263cb43baae9473d888afcba
Component: engine
2017-05-16 15:22:03 -04:00
a52518e2ab Add Windows secrets support
Signed-off-by: John Stephens <johnstep@docker.com>
Upstream-commit: bd4e8aa64e5e7dedb60ca6670d7ddb32d5af0db9
Component: engine
2017-05-16 11:30:06 -07:00
6d95fe4071 Merge pull request #33209 from cpuguy83/continue_on_err
Add continue on error in mountspec backport
Upstream-commit: d12b2387d7d371b543db0c6571b3c686b59d7f4d
Component: engine
2017-05-16 12:54:13 -04:00
a934e7d185 unexport error errPruneRunning
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 2a8f46abfdc9a1ebfa2b23a71c75c630c0fc454d
Component: engine
2017-05-16 23:37:30 +08:00
51c87b76b5 Merge pull request #33023 from gdevillele/pr-fix-prune-filter
daemon returns errors when receiving unsupported prune filters
Upstream-commit: f944183c7566de209b4cc1128b63dfd68daac3de
Component: engine
2017-05-16 16:55:10 +02:00
6b1b90eeb8 Disabling digest pinning for API versions < 1.30
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
Upstream-commit: c0afd9c873183604e57282e1cf47605c1f1e4d43
Component: engine
2017-05-15 16:42:43 -07:00
6ca0a8eece Adding Platforms field to TaskSpec
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
Upstream-commit: 1efbe6e8761370bbe8c136928a68323c7d8dbecf
Component: engine
2017-05-15 14:58:20 -07:00
6ce3bf965e Add continue on error in mountspec backport
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d6e1cb7cbfe4b604d074814f00f654f5c545a71a
Component: engine
2017-05-15 15:49:07 -04:00
76789457c2 Use containerd Status variable when checking container state
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 0ea0b2becf119ca7950e8afcf5d440e800484b15
Component: engine
2017-05-15 10:53:51 -07:00
5ebfd27acb Merge pull request #32821 from cpuguy83/32613_fix_volspec_backport
Fix issue backporting mount spec to pre-1.13 obj
Upstream-commit: 6cea2e5206f455d345df98f4a2e4abe8c803ab5a
Component: engine
2017-05-15 15:58:31 +02:00
f0d9aa77cb Merge pull request #32856 from darrenstahlmsft/RemoveResourceComments
Remove comments and unused structures in Windows resources
Upstream-commit: 6bffb585cda7d4064b803ed3d8b110a7c2d21d94
Component: engine
2017-05-15 15:28:51 +02:00
81db28deb9 Merge pull request #32996 from dperny/service-logs-support-details
Fix Ambigious Logs Format and Add Support for Details in Service Logs
Upstream-commit: 7fd8a9382c0fd3f23002288e357b5612b869a974
Component: engine
2017-05-15 13:57:44 +02:00
2d5cb49e4e Update comments describing new behaviour
Signed-off-by: Justin Menga <justin.menga@gmail.com>
Upstream-commit: dc87490b632949394307e25dce17c8db6cf664c6
Component: engine
2017-05-15 11:08:16 +12:00
2373c13c5a Code review changes
Signed-off-by: Justin Menga <justin.menga@gmail.com>
Upstream-commit: 3a4cf2b076a8f04f54b6edff4f661f5c3b2c8157
Component: engine
2017-05-15 10:28:18 +12:00
6083b78b58 Add missing month in datetime map
Signed-off-by: Justin Menga <justin.menga@gmail.com>
Upstream-commit: bf1c377f6012f3db714e0f848d70e776ef1226a6
Component: engine
2017-05-13 22:10:51 +12:00
3ac82c3d80 Append new line to multiline events
Signed-off-by: Justin Menga <justin.menga@gmail.com>
Upstream-commit: 4374f16667708118c126cd71f733493b0070e807
Component: engine
2017-05-13 17:54:04 +12:00
7dd003d1da Code review changes
Signed-off-by: Justin Menga <justin.menga@gmail.com>
Upstream-commit: 8ef9c19ecdd16881289a63e5e89de3f5c83def66
Component: engine
2017-05-13 17:54:04 +12:00
38049ee803 awslogs: use github.com/pkg/errors to wrap an error
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: f775005a17c7ae0d3851cc86f46b7c46aafa27d8
Component: engine
2017-05-13 17:54:04 +12:00
17b96f5ff1 Formatting
Signed-off-by: Justin Menga <justin.menga@gmail.com>
Upstream-commit: 6f073e352247217a4cc5ee825676a9a496655455
Component: engine
2017-05-13 17:54:04 +12:00
4221bdc95f Add awslogs benchmarks
Signed-off-by: Justin Menga <justin.menga@gmail.com>
Upstream-commit: 84b03660dab03ac366d99ba817a5ec8523808386
Component: engine
2017-05-13 17:54:04 +12:00
db722ea7f6 Add awslogs multiline support
Signed-off-by: Justin Menga <justin.menga@gmail.com>
Upstream-commit: ab74038df93156ef27c03d6e4490bca5c3359423
Component: engine
2017-05-13 17:54:04 +12:00
a00f1ffcd6 Merge pull request #32874 from cpuguy83/metrics_plugins
Add support for metrics plugins
Upstream-commit: 680084b2a2eb1ac1ced2dd4c695fdc469c25dc7f
Component: engine
2017-05-12 15:44:34 -07:00
51fcae249a Change log details encoding format and support details on service logs
URL query encode log details, so that characters like spaces don't make
log parsing ambiguous. Add a helper function to parse these details to a
map, if needed

Add support for details on service logs

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 68f21418ac1f1acb2874b45878a5938475becf1f
Component: engine
2017-05-12 10:53:44 -07:00
d7fd55d70a Merge pull request #32993 from cyli/root-rotation-cli
API changes to rotate swarm root CA
Upstream-commit: eb8abc95985bf3882a4a177c409a96e36e25f5b7
Component: engine
2017-05-12 10:12:32 -07:00
e9abb077b7 Add support for metrics plugins
Allows for a plugin type that can be used to scrape metrics.
This is useful because metrics are not neccessarily at a standard
location... `--metrics-addr` must be set, and must currently be a TCP
socket.
Even if metrics are done via a unix socket, there's no guarentee where
the socket may be located on the system, making bind-mounting such a
socket into a container difficult (and racey, failure-prone on daemon
restart).

Metrics plugins side-step this issue by always listening on a unix
socket and then bind-mounting that into a known path in the plugin
container.

Note there has been similar work in the past (and ultimately punted at
the time) for consistent access to the Docker API from within a
container.

Why not add metrics to the Docker API and just provide a plugin with
access to the Docker API? Certainly this can be useful, but gives a lot
of control/access to a plugin that may only need the metrics. We can
look at supporting API plugins separately for this reason.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 0e8e8f0f318656be80e34db9b5e390ffeef3fd0d
Component: engine
2017-05-12 00:30:09 -04:00
39aaf216f3 Merge pull request #31142 from dongluochen/network_converge_delay
add 2 seconds delay to allow gossip converge
Upstream-commit: 8fd55cd064dbe6dd3d2cdea6c778532faf24b8fa
Component: engine
2017-05-11 16:50:44 -07:00
cb58c9e54e Merge pull request #32336 from aaronlehmann/configs
Configuration files for services
Upstream-commit: 69c35dad8e7ec21de32d42b9dd606d3416ae1566
Component: engine
2017-05-11 13:25:40 -07:00
8d785cac10 Merge pull request #32587 from dmcgowan/trust-key-config
Expose trust key path in config
Upstream-commit: 577168700200e8e993b2692ef87e05a67783a08c
Component: engine
2017-05-11 21:03:47 +02:00
59422fa37f Update the stream formatter to display custom unit numbers.
Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: a771c16834c92cb39142078c64e253423f0fb4e3
Component: engine
2017-05-11 11:13:11 -07:00
dbf4ba7522 Propagate the desired CA certificate and CAConfig ForceRotate parameter
in the Docker REST APIs when viewing or updating the swarm spec info, and
also propagate the desired CA key in the Docker REST APIs when updating
swarm spec info only (it is not available for viewing).

Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: 1847bb899a07d3dd324e75a3ed9b3489fcfc302f
Component: engine
2017-05-11 10:22:42 -07:00
efc30370d8 Add config support to executor backend
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 9e9fc7b57c1764c008e568ed52bcd1aade7eb40c
Component: engine
2017-05-11 10:08:21 -07:00
42c7989190 Add config APIs
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 772855768785ce678751795c168e056a8db35d09
Component: engine
2017-05-11 10:08:21 -07:00
d2c5696e29 Fix issue backporting mount spec to pre-1.13 obj
In some cases a mount spec would not be properly backported which could
lead to accidental removal of the underlying volume on container remove
(which should never happen with named volumes).

Adds unit tests for this as well. Unfortunately I had to add a daemon
depdency for the backport function due to looking up `VolumesFrom`
specs.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 3cf18596e95c19823387322cb0fc4e324958a341
Component: engine
2017-05-11 12:31:53 -04:00
2c6473821e Merge pull request #33054 from dnephin/refactor-builder-named-contexts-interface
[Builder] Expose GetImage interface for builder
Upstream-commit: 974cec945b80bc0004f3917ec318c15e9c038e4a
Component: engine
2017-05-11 11:03:30 -04:00
eaff058a53 Fix race condition between swarm and libnetwork
This commit in conjunction with a libnetwork side commit,
cleans up the libnetwork SetClusterProvider logic interaction.
The previous code was inducing libnetwork to spawn several go
routines that were racing between each other during the agent
init and close.

A test got added to verify that back to back swarm init and leave
are properly processed and not raise crashes

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: e2ec006797fa14f59bcf7b9c23505ccdf1d3ded3
Component: engine
2017-05-10 21:16:52 -07:00
c1ba295763 Merge pull request #32875 from cyli/root-ca-info-in-api
Propagate TLS Info in swarm info and node info REST endpoints
Upstream-commit: f02a5b50c407bdb087388e18e1ac619f2788dd8d
Component: engine
2017-05-11 00:35:46 +02:00
df464dbe2f Refactor imageContexts into two different structs.
buildStages now tracks the imageID and runConfig for a build stage

imageMounter tracks image mounts so they can released when the build ends.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6c28e8edd5f047d5b1438f773d49882f28d7a006
Component: engine
2017-05-10 17:59:30 -04:00