Commit Graph

189 Commits

Author SHA1 Message Date
a196815f55 Merge pull request #33702 from aaronlehmann/templated-secrets-and-configs
Templated secrets and configs
Upstream-commit: 0076343b29f508a5deb06861c0d85748659f8881
Component: engine
2018-02-21 13:39:10 +01:00
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
a6e6cffaed executor: Use a TemplatedDependencyGetter to support template expansion
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 56da5fd7d31c9a627fc6a3c482cb0bf0ffb2d26e
Component: engine
2018-02-16 11:25:13 -05: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
30c97f4539 Merge pull request #36003 from pradipd/upgrade_fix
Fixing ingress network when upgrading from 17.09 to 17.12.
Upstream-commit: 949ee0e5297408e97c9b5444d500a2cecab06609
Component: engine
2018-01-19 15:46:50 -05:00
0986b8a32c Fixing ingress network when upgrading from 17.09 to 17.12.
Signed-off-by: Pradip Dhara <pradipd@microsoft.com>

Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
Upstream-commit: 2d7a50e5855ad0571e76d29cd1ab9f8f3a48433b
Component: engine
2018-01-17 17:11:18 +00:00
a9d5589889 Merge pull request #36021 from yongtang/30897-follow-up
Rename FindUniqueNetwork to FindNetwork
Upstream-commit: be146652108f7145e902c275807f9ef71464b031
Component: engine
2018-01-16 09:38:16 +01:00
72b954bd11 Rename FindUniqueNetwork to FindNetwork
This fix is a follow up to 30397, with `FindUniqueNetwork`
changed to `FindNetwork` based on the review feedback.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: ccc2ed01894a1950eaf47db2ad0860ad87cd78d1
Component: engine
2018-01-15 17:34:40 +00:00
621388138c Golint: remove redundant ifs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b4a63139696aea2c73ec361a9af8b36a118f0423
Component: engine
2018-01-15 00:42:25 +01:00
df9a679f90 Update FindUniqueNetwork to address network name duplications
This fix is part of the effort to address 30242 where
issue arise because of the fact that multiple networks
may share the same name (within or across local/swarm scopes).

The focus of this fix is to allow creation of service
when a network in local scope has the same name as the
service network.

An integration test has been added.

This fix fixes 30242.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: cafed80cd019a8b40025eaa5e5b37459362607fb
Component: engine
2018-01-06 01:55:28 +00: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
1377e81acb Added support for swarm service isolation mode
Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
Upstream-commit: f28cb422e69bd4239401e6ea32b65b56485d6691
Component: engine
2017-10-30 16:16:18 +01:00
35db73fa01 LCOW: API: Add platform to /images/create and /build
Signed-off-by: John Howard <jhoward@microsoft.com>

This PR has the API changes described in https://github.com/moby/moby/issues/34617.
Specifically, it adds an HTTP header "X-Requested-Platform" which is a JSON-encoded
OCI Image-spec `Platform` structure.

In addition, it renames (almost all) uses of a string variable platform (and associated)
methods/functions to os. This makes it much clearer to disambiguate with the swarm
"platform" which is really os/arch. This is a stepping stone to getting the daemon towards
fully multi-platform/arch-aware, and makes it clear when "operating system" is being
referred to rather than "platform" which is misleadingly used - sometimes in the swarm
meaning, but more often as just the operating system.
Upstream-commit: 0380fbff37922cadf294851b1546f4c212c7f364
Component: engine
2017-10-06 11:44:18 -07:00
e4f32567d3 Updating moby to correspond to naming convention used in https://github.com/docker/swarmkit/pull/2385
Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
Upstream-commit: d00a07b1e6d46c3cc9ef95e8b6227115830e2701
Component: engine
2017-09-26 22:08:10 +00:00
61af2a7b87 Enabling ILB/ELB on windows using per-node, per-network LB endpoint.
Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
Upstream-commit: 9bed0883e762181ad6c4d5607ae2228e164e44b5
Component: engine
2017-09-18 20:27:56 +00: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
18c29c5c5f Add gosimple linter
Update gometalinter

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: f7f101d57ef8cbf2d8723a18b7d723c5c5dd04b6
Component: engine
2017-09-12 12:09:59 -04: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
30f1b651e2 Remove string checking in API error handling
Use strongly typed errors to set HTTP status codes.
Error interfaces are defined in the api/errors package and errors
returned from controllers are checked against these interfaces.

Errors can be wraeped in a pkg/errors.Causer, as long as somewhere in the
line of causes one of the interfaces is implemented. The special error
interfaces take precedence over Causer, meaning if both Causer and one
of the new error interfaces are implemented, the Causer is not
traversed.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: ebcb7d6b406fe50ea9a237c73004d75884184c33
Component: engine
2017-08-15 16:01:11 -04:00
de9b157e25 hide swarm plugins behind experimental flag
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
Upstream-commit: 493002021094d72d405e1cd5bfa10b8080f67920
Component: engine
2017-08-08 18:33:25 -07:00
d659edcaf5 Update logrus to v1.0.1
Fixes case sensitivity issue

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 1009e6a40b295187e038b67e184e9c0384d95538
Component: engine
2017-07-31 13:16:46 -07:00
8f5aa8e137 Merge pull request #33440 from RenaudWasTaken/genericresource
Added support for Generic Resources
Upstream-commit: 9319a8a2dd5760b3d0eda359b8c3872f5e37aa87
Component: engine
2017-07-25 15:32:25 -04:00
2029cf1c2d Added support for Generic Resources
Signed-off-by: Renaud Gaubert <rgaubert@nvidia.com>
Upstream-commit: 87e1464c438f4163e2694a0bf29ae5a45903449b
Component: engine
2017-07-24 17:49:56 -07: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
165659798d renaming id() to state clearly that it's related to the networkAttachement container target
Signed-off-by: Yassine TIJANI <yasstij11@gmail.com>
Upstream-commit: 27c0131a43b1f4956446467273e82826264d6c35
Component: engine
2017-07-12 15:58:31 +02:00
57481ff30b Re-vendor swarmkit. This includes the following fixes:
- https://github.com/docker/swarmkit/pull/2266 (support for templating Node.Hostname in docker executor)
- https://github.com/docker/swarmkit/pull/2281 (change restore action on objects to be update, not delete/create)
- https://github.com/docker/swarmkit/pull/2285 (extend watch queue with timeout and size limit)
- https://github.com/docker/swarmkit/pull/2253 (version-aware failure tracking in the scheduler)
- https://github.com/docker/swarmkit/pull/2275 (update containerd and port executor to container client library)
- https://github.com/docker/swarmkit/pull/2292 (rename some generic resources)
- https://github.com/docker/swarmkit/pull/2300 (limit the size of the external CA response)
- https://github.com/docker/swarmkit/pull/2301 (delete global tasks when the node running them is deleted)

Minor cleanups, dependency bumps, and vendoring:
- https://github.com/docker/swarmkit/pull/2271
- https://github.com/docker/swarmkit/pull/2279
- https://github.com/docker/swarmkit/pull/2283
- https://github.com/docker/swarmkit/pull/2282
- https://github.com/docker/swarmkit/pull/2274
- https://github.com/docker/swarmkit/pull/2296 (dependency bump of etcd, go-winio)

Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: 4509a001dffff626d2d8708fd2eb1c6317b201f3
Component: engine
2017-07-11 13:43:43 -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
c782cb6c44 Make plugin emit strongly typed, consumable events
Enables other subsystems to watch actions for a plugin(s).

This will be used specifically for implementing plugins on swarm where a
swarm controller needs to watch the state of a plugin.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 72c3bcf2a533a827402945e3a55872e2db4fb024
Component: engine
2017-07-06 14:26:06 -04: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
9a5747b3f9 LCOW: Fix nits from 33241
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 4ec9766a27ffb964cec6b8b2745725965b2644aa
Component: engine
2017-06-27 11:59:49 -07:00
094f300460 LCOW: pull goes to correct stores
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: a1fe1dc791633998bcc82b5f0734a5da68d2bb41
Component: engine
2017-06-20 19:49:52 -07:00
dd6f4eb487 LCOW: Remove CommonContainer - just Container
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 55f8828eec1ff6c70628a0b6f22bea175ce36159
Component: engine
2017-06-20 08:55:46 -07:00
7911166df9 Service alias should not be copied to task alias
If a service alias is copied to task, then the DNS resolution on the
service name will resolve to service VIP and all of Task-IPs and that
will break the concept of vip based load-balancing resulting in all the
dns-rr caching issues.

This is a regression introduced in #33130

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 38c15531501578b96d34be5ce7f33a0be6be078f
Component: engine
2017-06-07 13:05:15 -07:00
5556f64d13 Vendor swarmkit 7e096ced
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 10df99f9ae48acc9888494223256637a8ca06f50
Component: engine
2017-05-23 15:01:35 -07:00
ba221c0328 Properly identify ingress network created with older swarm
- otherwise docker network prune will remove it

Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: 93763f11eeec5e9b1d0308a3ad85bbf069f9107f
Component: engine
2017-05-18 19:47:45 -07:00
cee45f7710 Adding network specific options to service create/update
The commit adds capability to accept csv parameters
for network option in service create/update commands.The change
includes name,alias driver options specific to the network.
With this the following will be supported

docker service create --name web --network name=docknet,alias=web1,driver-opt=field1=value1 nginx
docker service create --name web --network docknet nginx
docker service update web --network-add name=docknet,alias=web1,driver-opt=field1=value1
docker service update web --network-rm docknet

Signed-off-by: Abhinandan Prativadi <abhi@docker.com>
Upstream-commit: fe11de01772ec7c7501d3b679ce94d41bcc14060
Component: engine
2017-05-17 18:46:34 -07:00
4f94cc50a4 Integrate local datascope network with swarm
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: b34d3e730fe3eee4b058e4dc165a7d4964e00a2a
Component: engine
2017-05-17 15:50:28 -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
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
fae2fb0e64 Change GetRepository to take Named arguments
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
Upstream-commit: e842c653a0de4fa7073d2402f4817de308a82bd0
Component: engine
2017-05-08 16:58:38 -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
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
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
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