Commit Graph

64 Commits

Author SHA1 Message Date
34bac6f06e Fix bunch of typos
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: e6866492c4492db3bb9546afa2fbaed20f4c1883
Component: engine
2016-10-29 15:03:26 +08:00
86df94b9ba Merge pull request #27369 from cezarsa/hc
Add --health-* flags to service create and update
Upstream-commit: f860289131e36ad2dde5ebe60d15a86fd97934b5
Component: engine
2016-10-28 21:59:52 +02:00
c05d99582c Add --health-* commands to service create and update
A HealthConfig entry was added to the ContainerSpec associated with the
service being created or updated.

Signed-off-by: Cezar Sa Espinola <cezarsa@gmail.com>
Upstream-commit: 7bd2611789e6898576f7229255c238f7c1129293
Component: engine
2016-10-28 15:19:08 -02:00
0e3402d520 Allow providing a custom storage directory for docker checkpoints
Signed-off-by: boucher <rboucher@gmail.com>
Upstream-commit: bd7d51292c399edba5f339e6be55fac6c0811ff5
Component: engine
2016-10-28 07:56:05 -04:00
ad6d3e7a11 cluster/container: correctly name swarm tasks
Even after a slew of PRs, this still wasn't quite right. Now, we ensure
the task name is calculared in one place in the executor, as least.

We'll have to follow this up once the `api/naming` package from SwarmKit
lands.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
Upstream-commit: 3b1af1751897680d32f4685e86d5dd1d9f3720b1
Component: engine
2016-10-25 14:17:57 -07:00
15c4940651 Update docker stop and docker restart to allow not specifying timeout and use the one specified at container creation time.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: cc703784f39fb3f585ec685cf7aeda6410648446
Component: engine
2016-10-17 12:53:35 -07:00
e8a02789bc Merge pull request #26896 from jmzwcn/issue26244
Fix issue26244:swarm service, with overlay network, fails to remove all containers
Upstream-commit: f7d1682c604429fcdf3c2c2225bde324b0861780
Component: engine
2016-10-11 14:40:39 +02:00
5c631e04b7 fix issue26244
Signed-off-by: Daniel Zhang <jmzwcn@gmail.com>
Upstream-commit: 434eae7dfd1612d8de292480d4c31c68fceffa68
Component: engine
2016-10-09 12:36:44 +08:00
361ed59824 Fix partial/full filter issue in service tasks --filter
This fix tries to address the issue related to 24108 and 24790, and
also the case from 24620#issuecomment-233715656

The reason for the failure case in the above mentioned issues is that
currently Task names are actually indexed by Service Name
(`e.ServiceAnnotations.Name`)

To fix it, a pull request in swarmkit (swarmkit/pull/1193) has been
opened separately.

This fix adds the integration tests for the above mentioned issues.
Swarmkit revendoring is needed to completely fix the issues.

This fix fixes 24108.
This fix fixes 24790.
This fix is related to 24620.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: f676fc93c3791f72938a6be9c7517ac620c02d1c
Component: engine
2016-09-26 16:01:20 -07:00
7bef93723c Initial implementation of containerd Checkpoint API.
Signed-off-by: boucher <rboucher@gmail.com>
Upstream-commit: d8fef66b03c1ea8715470690efbd950033f7f628
Component: engine
2016-09-08 21:31:52 -04:00
f0d30a4b26 Add support for docker run in swarm mode overlay
This PR adds support for running regular containers to be connected to
swarm mode multi-host network so that:
    - containers connected to the same network across the cluster can
      discover and connect to each other.
    - Get access to services(and their associated loadbalancers)
      connected to the same network

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Upstream-commit: 99a98ccc14a9427be47c8006e130750710db0a16
Component: engine
2016-09-07 21:20:41 -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
45ddc4bfcb Add engine-api types to docker
This moves the types for the `engine-api` repo to the existing types
package.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 91e197d614547f0202e6ae9b8a24d88ee131d950
Component: engine
2016-09-07 11:05:58 -07:00
1965814a4e vendor docker/engine-api@f9cef59044
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 8f7a8c75ae251f1260299892c5de7c83224b110e
Component: engine
2016-08-31 22:39:13 +02:00
f0bf8347ee Merge pull request #25888 from vdemeester/listcontainerfornode-refactoring
Move ListContainersForNode into cluster package
Upstream-commit: 29232a5d8e621ad2503b205cb5068cc14b2ee42b
Component: engine
2016-08-25 19:10:18 +02: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
86337f007e Move ListContainersForNode into cluster package
It makes little sense to have swarm related code into the daemon
package. This refactor the `daemon` and `cluster` package to remove
`ListContainersForNode` from the daemon.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 4833b3c961f84555c67418440405e470123919c6
Component: engine
2016-08-20 14:14:26 +02:00
95f97c43df Rate limit logspam during docker service pulls
During image pulls on docker service create, logs will only show status
updates and updates every 1 second on long-running actions like
downloading and extracting. Adds golang.org/x/time/rate as dependency.

Ports docker/swarmkit#1352 to docker/docker.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: fa0054a3eb0363526d34fb4ac912cab30044f3d7
Component: engine
2016-08-11 14:56:38 -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
0d2b77587c fix validation of non-existing bind-mount source
Unlike `docker run -v..`, `docker service create --mount`
does not allow bind-mounting non-existing host paths.

This adds validation for the specified `source`, and
produces an error if the path is not found on the
host.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 84d5ab96ef33355e65f5c31210eb1777db372c52
Component: engine
2016-08-08 17:24:00 +02:00
b98eabeaed Validate mount paths on task create
This is intended as a minor fix for 1.12.1 so that task creation doesn't
do unexpected things when the user supplies erroneous paths.

In particular, because we're currently using hostConfig.Binds to setup
mounts, if a user uses an absolute path for a volume mount source, or a
non-absolute path for a bind mount source, the engine will do the
opposite of what the user requested since all absolute paths are
treated as binds and all non-absolute paths are treated as named
volumes.

Fixes #25253

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 38f8b0eb10725c40fb3c7e0719accd240cd39e22
Component: engine
2016-08-01 23:35:46 -04:00
326610d0c6 Merge pull request #25043 from stevvooe/forked-pull-context
container/controller: avoid cancellation with forked pull context
Upstream-commit: 7bb9676a2bab9517f06abf849cbe6e4337484a15
Component: engine
2016-07-26 01:01:09 -07:00
7501db1754 Merge pull request #25036 from nishanttotla/describe-function-update-executor
Using map to list plugins in node description
Upstream-commit: 301eba03e1f30e72e85b9c33b1d02476efad341d
Component: engine
2016-07-25 22:19:33 -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
09945aead8 Merge pull request #24967 from mavenugo/eligiblenet
improve error message when using ineligible network with service create
Upstream-commit: 1afa8195936e8988a61bea5cf753ec8a7aaaf5fa
Component: engine
2016-07-25 21:02:24 -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
2de0b34d83 Using map to list plugins in node description
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
Upstream-commit: feedb7ab5a139ba492a9b896e8efdc0b9ddc43b2
Component: engine
2016-07-25 17:45:32 -07:00
d759fd7b51 Merge pull request #24545 from runshenzhu/health-check
swarm: block controller.Start until container is healthy
Upstream-commit: a4634cd8a8edb9be9c73dc552e045fa868a861f7
Component: engine
2016-07-25 20:32:27 -04: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
38618da388 Sort plugin names in node description
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
Upstream-commit: 227c7e4e8d8ce9ecb74ff1b38fe07cd6c37aee9f
Component: engine
2016-07-25 10:38:24 -07:00
4d19e2a5c0 improve error message when using ineligible network with service create
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 40c88b8c54fe4595f8bda5417ced3729eea5b16e
Component: engine
2016-07-25 08:31:22 -07:00
737108710c Merge pull request #24139 from runshenzhu/health-check
add health check in docker build-in swarm mode
Upstream-commit: e2fc1439a11cff5f719ae47265da135d26dd36ad
Component: engine
2016-07-11 09:43:59 -04:00
8d74981897 Add logdrivers to executor from swarmkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 8a50315f3ce89b24e3556dba288b2ce7b4daf026
Component: engine
2016-07-08 13:33:40 -07:00
7ac8dc18c4 Update executor volumes from swarmkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 6586f4f0719ae59c4a2b74acd91a1a888a0018b5
Component: engine
2016-07-08 13:33:40 -07:00
7ac01fb32e Use newer default values for mounts CLI
In the API:
`Writable` changed to `ReadOnly`
`Populate` changed to `NoCopy`

Corresponding CLI options updated to:
`volume-writable` changed to `volume-readonly`
`volume-populate` changed to `volume-nocopy`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 56f3422468a0b43da7bae7a01762ce4f0a92d9ff
Component: engine
2016-07-06 22:34:39 -04: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
e4dfc2d04c Validate hostname starting from 1.24 API.
In order to keep a little bit of "sanity" on the API side, validate
hostname only starting from v1.24 API version.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 6daf3d2a783fd042e870c8af8bbd19fc28989505
Component: engine
2016-07-06 09:13:59 +02:00
a3ed3e2e3c Merge pull request #23947 from cpuguy83/fix_mount_target
Volume mounts need to use "Binds" API field
Upstream-commit: adb48487f2ec65a9facab04f1ec6c20aefb3e41f
Component: engine
2016-07-01 13:23:14 -07:00
b73379e968 Update to new swarmkit/engine-api
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 9b652738363d92fbe6e43b3981cdcc94bdb72c76
Component: engine
2016-06-30 17:22:47 -07:00
e32550579c Merge pull request #23584 from nishanttotla/private-images-swarm-services
Passing registry auth token for service create, update
Upstream-commit: 8fe6480c8a26f80fe174ae93e1b380bb7ec6083c
Component: engine
2016-06-30 17:18:59 -07:00
2cb691411c Volume mounts need to use "Binds" API field
Swarm was putting volume type mounts into the container config's
"Volumes" field, but really these need to go into "Binds".
"Volumes" is only for normal "-v /foo" volumes, not named volumes or
anything else.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 2bc2165cbf3e949921d1659f09841b5f008f590d
Component: engine
2016-06-30 17:00:52 -04:00
bd38c4db96 Added missing flags for swarm-mode networks
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: cf78863e9dc4e3480a7d1059ed306bdfd81cd3dc
Component: engine
2016-06-29 15:30:57 -07:00
cddb6e635c Updating header name and executor
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
Upstream-commit: af5df117a805c8df661c7efa58c57680019b5752
Component: engine
2016-06-29 13:26:19 -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
fbf0465b15 Merge pull request #23790 from tonistiigi/skip-pull
Skip always pulling images on integration tests
Upstream-commit: 487931902c1177352e4eceec1b5ef558a5ba24cc
Component: engine
2016-06-23 11:47:33 -07: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
a75adf3964 Merge pull request #23797 from liubin/fix-typo
fix some typos
Upstream-commit: 4962fea757415087755d7683e73bc0c7c7a39921
Component: engine
2016-06-22 11:56:48 +10:00