Commit Graph

42 Commits

Author SHA1 Message Date
ed5d3f9cce Support SCTP port mapping (bump up API to v1.37)
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 8e435b8279f2af3e0cebd73fa9e25ca1bb26004e
Component: engine
2018-02-20 11:15:36 +09:00
be83c11fb0 Add canonical import comment
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 4f0d95fa6ee7f865597c03b9e63702cdcb0f7067
Component: engine
2018-02-05 16:51:57 -05:00
ea17d4a2f5 Restore error type in FindNetwork
The error type libnetwork.ErrNoSuchNetwork is used in the controller
to retry the network creation as a managed network though the manager.
The change of the type was breaking the logic causing the network to
not being created anymore so that no new container on that network
was able to be launched
Added unit test

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: 51cea0a53c2fd36832277402e9faac81bfb4abd4
Component: engine
2017-11-29 11:22:57 -08:00
c30f13232a Merge pull request #34686 from mion00/templating-node-hostname-support
Add support for .Node.Hostname templating in swarm services
Upstream-commit: 2ee8ef864f9fb9c31848fe10a61605a39fb81635
Component: engine
2017-09-13 21:06:11 -07:00
55c903723c Add support for .Node.Hostname templating in swarm services
Signed-off-by: Carlo Mion <mion00@gmail.com>
Upstream-commit: e2f09fa6dd1705eb69ab97fbf759253a4162228a
Component: engine
2017-09-02 10:06:16 +02:00
01392057b0 Add unconvert linter
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 2f5f0af3fdb7e9ee607a0e178dbe2af6e10cccf4
Component: engine
2017-08-24 15:08:31 -04:00
b337882c5b Avoid using a map for log attributes
Having a map per log entry seemed heavier than necessary. These
attributes end up being sorted and serialized, so storing them in a map
doesn't add anything (there's no random access element). In SwarmKit,
they originate as a slice, so there's an unnecessary conversion to a map
and back.

This also fixes the sort comparator, which used to inefficiently split
the string on each comparison.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: b642b3f21f17cf50c79e464d3aedc93b2dbf0fb0
Component: engine
2017-07-18 19:01:20 -07:00
b53529452f Merge pull request #33377 from yastij/33371-matchevent-filtering
matching events using ID and name
Upstream-commit: e56e78976eefdd17d333c3aa63382b2e4bfd889d
Component: engine
2017-07-10 16:11:14 +02:00
23b4fdf3bc removing TODO, and explain why we can't filter by id on the matchevent method.
Signed-off-by: Yassine TIJANI <yasstij11@gmail.com>
Upstream-commit: be9aa09246534a1fdf7c08cf287dbe1e6de375c9
Component: engine
2017-07-07 23:32:37 +02:00
643654c2f0 Spelling fixes
* additional
* ambiguous
* anonymous
* anything
* application
* because
* before
* building
* capabilities
* circumstances
* commit
* committer
* compresses
* concatenated
* config
* container
* container's
* current
* definition
* delimiter
* disassociates
* discovery
* distributed
* doesnotexist
* downloads
* duplicates
* either
* enhancing
* enumerate
* escapable
* exactly
* expect
* expectations
* expected
* explicitly
* false
* filesystem
* following
* forbidden
* git with
* healthcheck
* ignore
* independent
* inheritance
* investigating
* irrelevant
* it
* logging
* looking
* membership
* mimic
* minimum
* modify
* mountpoint
* multiline
* notifier
* outputting
* outside
* overridden
* override
* parsable
* plugins
* precedence
* propagation
* provided
* provides
* registries
* repositories
* returning
* settings
* should
* signals
* someone
* something
* specifically
* successfully
* synchronize
* they've
* thinking
* uninitialized
* unintentionally
* unmarshaling
* unnamed
* unreferenced
* verify

Signed-off-by: Josh Soref <jsoref@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 39bcaee47b8a284a46b761afe218ba7deda0d482
Component: engine
2017-07-03 13:13:09 -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
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
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
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
06646a47aa Fix an issue with service logs hanging
Fixed an issue where service logs would hang if the container backing a
task was deleted by not waiting for containers to be ready if we're not
following logs.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 80c3ec027d9fd4f7ea2080adc08fc741f8909b2e
Component: engine
2017-05-04 12:13:14 -07: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
1ba46cf52c Call deactivateServiceBinding when necessary
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: bcb53d3489eee305f3e563a0cdbccca5085ac9a7
Component: engine
2017-03-29 11:48:34 -07:00
e5aeb3bdbc add 2 seocnd delay to allow gossip converge
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: 4d233943331865cab0cdd1b0bb986a4492bf74b1
Component: engine
2017-03-29 11:48:34 -07:00
3226daa36d Shutdown leaks an error when the container was never started
I found that sometimes tasks would end up in a rejected state when
trying to update them quickly. The problem was that Shutdown could fail
if called before the container was started. Instead of returning an
error in this case, Shutdown should succeed. This allows tasks to
progress to the "shutdown" state as expected.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 37b492ae1b2ba5f84cd0b795dbc68804d7b2fec5
Component: engine
2017-02-22 19:12:07 -08:00
d9702930f2 Fix issue where service healthcheck is {} in remote API
This fix tries to address the issue raised in 30178 where
service healthcheck is `{}` in remote API will result in
dns resolve failue.

The reason was that when service healthcheck is `{}`,
service binding was not done.

This fix fixes the issue.

An integration test has been added.

This fix fixes 30178.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8feb5c5a48eaadc1686e3b370f7ef9be128dd3cb
Component: engine
2017-01-27 15:43:44 -08:00
d93ce12d04 Vendor swarmkit, containerd, and related dependencies
Update swarmkit to 037b491.

As swarmkit switched to a newer gRPC version, this also involves
updating Docker's vendored gRPC, which in turn requires updating
containerd to a new version that has protobufs generated against this
gRPC version.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 3e987e1732ee5c51e95934afabba3fedfd16c4af
Component: engine
2017-01-23 17:51:14 -08:00
b688822593 Add support for host port PublishMode in services
Add api/cli support for adding host port PublishMode in services.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Upstream-commit: 14ac9f60d0174256e0713701ebffaf5ca827da71
Component: engine
2016-11-10 18:07:55 -08:00
e93ab8dcb4 cluster executor: Logs retrieving support.
Plumbed the executor to the container logs backend.

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: 0ec68657139f029e2740780a58e0019df0e42b6a
Component: engine
2016-11-10 12:02:47 -08:00
45bc21e90e update to support latest swarm changes
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: f50a65ff0c28618f798d06838e36b015dd022b45
Component: engine
2016-11-09 14:27:43 -05:00
9dbbc071d5 secrets: secret management for swarm
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

wip: use tmpfs for swarm secrets

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

wip: inject secrets from swarm secret store

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

secrets: use secret names in cli for service create

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

switch to use mounts instead of volumes

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

vendor: use ehazlett swarmkit

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>

secrets: finish secret update

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
Upstream-commit: 3716ec25b423d8ff7dfa231a7b3cf0154726ed37
Component: engine
2016-11-09 14:27:43 -05:00
393d61cc88 dynamic service binding.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: ca81f6ee7c74a3bf27dc9b044742961f4ef78094
Component: engine
2016-11-04 21:50:56 -07:00
60a22c207c Move engine-api client package
This moves the engine-api client package to `/docker/docker/client`.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 7c36a1af031b510cd990cf488ee5998a3efb450f
Component: engine
2016-09-07 11:05:58 -07:00
32e409f5b7 Update executor changes from swarmkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 96a27cf0931974b602acfdd74dfcc5142500c7ba
Component: engine
2016-08-22 11:36:20 -07:00
28fcc3f1f9 Update executor fixes from swarmkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 5673c53417d689704ca7b5715f5c4d549fdf710c
Component: engine
2016-08-10 13:27:38 -07:00
1ea11295f3 Retry creating dynamic networks if not found
In cases there are failures in task start, swarmkit might be trying to
restart the task again in the same node which might keep failing. This
creates a race where when a failed task is getting removed it might
remove the associated network while another task for the same service
or a different service but connected to the same network is proceeding
with starting the container knowing that the network is still
present. Fix this by reacting to `ErrNoSuchNetwork` error during
container start by trying to recreate the managed networks. If they
have been removed it will be recreated. If they are already present
nothing bad will happen.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Upstream-commit: 117cef5e9766d6ba228770c225e816c6afd16ff8
Component: engine
2016-08-09 13:37:11 -07:00
bff0a1048f container/controller: avoid cancellation with forked pull context
Context cancellations were previously causing `Prepare` to fail
completely on re-entrant calls. To prevent this, we filtered out cancels
and deadline errors. While this allowed the service to proceed without
errors, it had the possibility of interrupting long pulls, causing the
pull to happen twice.

This PR forks the context of the pull to match the lifetime of
`Controller`, ensuring that for each task, the pull is only performed
once. It also ensures that multiple calls to `Prepare` are re-entrant,
ensuring that the pull resumes from its original position.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: d8d71ad5b94d44a2778f2d8989424259cac94e9b
Component: engine
2016-07-25 21:52:10 -07:00
088c389905 Merge pull request #25030 from stevvooe/allow-cancellation-propagation
swarm/controller: allow cancellation to propagate
Upstream-commit: a6a261261d94748b9c3eb06ddb1f64f426eec43b
Component: engine
2016-07-25 19:50:32 -07:00
6a43c7c1ad swarm/controller: allow cancellation to propagate
Ensure that cancellation of a pull propagates rather than continuing to
container creation. This ensures that the `Prepare` method is properly
re-entrant.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: d99c6b837ffd18ffe5bce801feb4936bf0edd2aa
Component: engine
2016-07-25 18:31:24 -07:00
5a95df9753 extend health check to start service
Signed-off-by: runshenzhu <runshen.zhu@gmail.com>
Signed-off-by: Runshen Zhu <runshen.zhu@gmail.com>
Upstream-commit: a99db84b4a966f0f09e81c446e857323a2a3302c
Component: engine
2016-07-25 15:49:22 -07:00
f773935c3b add health check in docker cluster
Signed-off-by: runshenzhu <runshen.zhu@gmail.com>
Upstream-commit: 1ded1f26e154e283ab26f347971d4d4a51edc94f
Component: engine
2016-07-06 13:43:20 -07:00
5fee17f637 Remove log warning on task update
This warning appears in the course of normal use of swarm mode. Since
it's meant more as an internal TODO than something which should be
exposed to a user, remove the log message.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 39c93cfb47783f2531ba44f062fd9a8b351d2224
Component: engine
2016-06-24 12:07:47 -07:00
a463fd07fe Merge pull request #23881 from tonistiigi/exec-wait
Fix error reporting on executor wait
Upstream-commit: e82dcf1c6de82680ae34a64735d0da0c080085ba
Component: engine
2016-06-24 11:18:49 -04:00
9d859318a6 Fix error reporting on executor wait
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: c895a76f1076c782011e9decf58ab6548cf0fb35
Component: engine
2016-06-22 18:12:51 -07:00
be80ca6785 Skip always pulling images on integration tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: e2226223e614716749cdb7701a130c7449f5f854
Component: engine
2016-06-20 17:45:29 -07:00
e79dde3c67 Update daemon to new swarmkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: a83bba467a8bd24924b1a0cf55b954ac49937b5b
Component: engine
2016-06-16 15:06:27 -07:00
08261c5b09 Fix race on force deleting container created by task
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: dcfe99278db113e79dc037a6f854f4cea9eebe22
Component: engine
2016-06-14 16:49:04 -07:00
be63983b3a Add Swarm management backend
As described in our ROADMAP.md, introduce new Swarm management API
endpoints relying on swarmkit to deploy services. It currently vendors
docker/engine-api changes.

This PR is fully backward compatible (joining a Swarm is an optional
feature of the Engine, and existing commands are not impacted).

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Victor Vieux <vieux@docker.com>
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 534a90a99367af6f6bba1ddcc7eb07506e41f774
Component: engine
2016-06-13 22:16:18 -07:00