Commit Graph

3141 Commits

Author SHA1 Message Date
43d60463c2 Add support for init on services
It's already supported by `swarmkit`, and act the same as
`HostConfig.Init` on container creation.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: e401b88e59e098745744917c555d549f08353e6d
Component: engine
2018-06-07 14:17:55 +02:00
67fe100ad5 api: add configurable MaskedPaths and ReadOnlyPaths to the API
This adds MaskedPaths and ReadOnlyPaths options to HostConfig for containers so
that a user can override the default values.

When the value sent through the API is nil the default is used.
Otherwise the default is overridden.

Adds integration tests for MaskedPaths and ReadonlyPaths.

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
Upstream-commit: 3694c1e34e40fa2e255a97b5541645cec9c8d1d5
Component: engine
2018-06-05 12:33:14 -04:00
0e7017a3ae Merge pull request #36688 from cpuguy83/volumes_service
Extract volume interaction to a volumes service
Upstream-commit: 5037c5a8ce762b46638378b7a7d1081572eadba1
Component: engine
2018-06-05 02:16:20 +02:00
4c7a840b18 Move plugin client creation to the extension point
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f51a96c0165fdcbbe11f62b66b582b7e202f211b
Component: engine
2018-05-25 15:18:53 -04:00
feb51dbad1 Extract volume interaction to a volumes service
This cleans up some of the package API's used for interacting with
volumes, and simplifies management.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e4b6adc88e967971de634596654d9bc33e7bd7e0
Component: engine
2018-05-25 14:21:07 -04:00
17b4dbf7d5 Bump API version to v1.38
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: df5175e1ee955a429ac5a4f8bdfacffd4d066c26
Component: engine
2018-05-24 02:39:28 +02:00
1a3da70ee0 Merge pull request #37108 from thaJeztah/remove_unneeded_aliases
Various code-cleanup
Upstream-commit: 8e2f9203065987116aec9e2d2a1d5c7039e1a5d4
Component: engine
2018-05-24 01:38:56 +02:00
8e008e90c3 Merge pull request #35246 from dperny/attachment-inspect
Output network attachment task information
Upstream-commit: 5a68e2617da4b18ea4bae9fb3205026bb541e8d4
Component: engine
2018-05-23 15:44:39 -04:00
0f96e98e12 Various code-cleanup
remove unnescessary import aliases, brackets, and so on.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f23c00d8701e4bd0f2372a586dacbf66a26f9a51
Component: engine
2018-05-23 17:50:54 +02:00
53104fbd7c Update swagger and API history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 3682703ad4a75ea489aa84cbaddcfa4697a4e57e
Component: engine
2018-05-22 23:37:33 +02:00
c0a75ea18d Output network attachment task information
Adds functionality to parse and return network attachment spec
information. Network attachment tasks are phony tasks created in
swarmkit to deal with unmanaged containers attached to swarmkit. Before
this change, attempting `docker inspect` on the task id of a network
attachment task would result in an empty task object. After this change,
a full task object is returned

Fixes #26548 the correct way.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5b69ff466e61fa168f24869710f2070c742a5565
Component: engine
2018-05-22 23:36:30 +02:00
272a5bdcba Set item-type for ExecIDs
Arrays expect a type to be set for items in the array.

This patch adds the "string" type, adds a short description,
and some example values.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8b6b55986644c093564497bfef51733a8d598baf
Component: engine
2018-05-22 13:18:44 +02:00
5657eef95c Merge pull request #35402 from thaJeztah/fix-GetTimestamp-parsing
Improve GetTimestamp parsing
Upstream-commit: da99009bbb1165d1ac5688b5c81d2f589d418341
Component: engine
2018-05-22 12:28:01 +02:00
c2266b164c Improve GetTimestamp parsing
`GetTimestamp()` "assumed" values it could not parse
to be a valid unix timestamp, and would use invalid
values ("hello world") as-is (even testing that
it did so).

This patch validates unix timestamp to be a valid
numeric value, and makes other values invalid.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 48cfe3f0872647bf0f52e6ba65022e1859e808e8
Component: engine
2018-05-20 13:07:17 +02:00
4f52a192ac Fix swagger file type for ExecIds
Signed-off-by: Grant Millar <grant@seednet.eu>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 58a35eaede4b121cd57cdb41e67d3654a90a144a
Component: engine
2018-05-19 22:14:38 +02:00
3b0918309f Merge pull request #37088 from ohbarye/fix-typos-duplicated-the
Fix typos: remove duplicated "the"
Upstream-commit: 3646562a5cfbf93f987d0ccffe7ca1c3487036e2
Component: engine
2018-05-19 20:57:47 +02:00
1ed95ff31a Merge pull request #37091 from thaJeztah/fix-linting-errors
Fix some linting issues
Upstream-commit: 1b75e175842e5ef59284a1c8ca7d64e4d6b62384
Component: engine
2018-05-19 08:39:39 -10:00
7f78f7fe15 Fix some linting issues
These showed locally when running `make validate`. CI doesn't seem to have the
same (possibly it's disabled in the configuration)

    builder/fscache/fscache.go:618::error: github.com/docker/docker/vendor/github.com/tonistiigi/fsutil.StatInfo composite literal uses unkeyed fields (vet)
    client/swarm_unlock_test.go:44::error: github.com/docker/docker/api/types/swarm.UnlockRequest composite literal uses unkeyed fields (vet)
    client/swarm_unlock_test.go:20::error: github.com/docker/docker/api/types/swarm.UnlockRequest composite literal uses unkeyed fields (vet)
    cmd/dockerd/daemon_unix.go:113::error: github.com/docker/docker/cmd/dockerd/hack.MalformedHostHeaderOverride composite literal uses unkeyed fields (vet)
    cmd/dockerd/daemon_unix.go:110::error: github.com/docker/docker/cmd/dockerd/hack.MalformedHostHeaderOverride composite literal uses unkeyed fields (vet)
    daemon/graphdriver/overlay/overlay.go:171::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    daemon/graphdriver/overlay/overlay.go:413::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    daemon/graphdriver/overlay2/overlay.go:203::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    daemon/graphdriver/overlay2/overlay.go:584::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    daemon/graphdriver/zfs/zfs.go:109::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    daemon/graphdriver/zfs/zfs.go:388::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    daemon/volumes_windows.go:27::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    integration/service/network_test.go:31::error: github.com/docker/docker/api/types/network.NetworkingConfig composite literal uses unkeyed fields (vet)
    api/server/server.go:129:10⚠️ should not use basic type string as key in context.WithValue (golint)
    integration/service/network_test.go:54::error: github.com/docker/docker/api/types/network.NetworkingConfig composite literal uses unkeyed fields (vet)
    libcontainerd/client_daemon_linux.go:61::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    libcontainerd/client_daemon_linux.go:74::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    pkg/archive/archive_windows.go:76::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)
    plugin/manager_linux.go:56::error: github.com/docker/docker/pkg/idtools.IDPair composite literal uses unkeyed fields (vet)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4f8c870d623c63b98f8ef8002448f07f4dda4aa9
Component: engine
2018-05-17 19:28:27 +02:00
17b1295241 Highlight meaning of 'precpu' (i.e. 'previous').
Signed-off-by: AJ Bowen <aj@soulshake.net>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b7fe0b6359dcbefd269c13ee4649d9247539cd18
Component: engine
2018-05-17 14:57:44 +02:00
111037b920 Fix typos: remove duplicated "the"
Signed-off-by: Masato Ohba <over.rye@gmail.com>
Upstream-commit: 0f95b23d98384a3ae3769b75292cd5b14ba38437
Component: engine
2018-05-17 21:49:51 +09:00
8373fcb573 Describe IP field of Port definition
Signed-off-by: Ethan Bell <ebgamer29@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 13e0b2651082878f8f17669df3f97ab252a9e095
Component: engine
2018-05-15 12:09:42 +02:00
1cb0dc30a7 Fix swagger volume type generation
This was broken by bf6a790f00ab96bb8857e3c73502909ee5e36217

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b16b125bb4326e2eec9948fd54ca8c5d83eba36a
Component: engine
2018-05-14 13:46:20 -04:00
e3af8e0774 Switch from x/net/context -> context
Since Go 1.7, context is a standard package. Since Go 1.9, everything
that is provided by "x/net/context" is a couple of type aliases to
types in "context".

Many vendored packages still use x/net/context, so vendor entry remains
for now.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 7d62e40f7e4f3c17d229a7687d6fcca5448de813
Component: engine
2018-04-23 13:52:44 -07:00
3e4ba6ca0d Fix version mismatch in API documentation
Fix a version mismatch in the API documentation.

Signed-off-by: Wassim DHIF <wassimdhif@gmail.com>
Upstream-commit: 2058928edc284653b1fb8e719d713ac7edecd091
Component: engine
2018-04-23 18:57:35 +02:00
3da083e7f4 Remove daemon dependency on api packages
We are using interface in the api routers to not explicitely depend on
the daemon struct (`daemon.Daemon`), but somehow, we do depend on the
`daemon` package for the cluster functionalities.

This removes this dependency by defining the correct interfaces.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: f4106b46db47524b4f38abeee48137d42e3fe4eb
Component: engine
2018-04-20 11:06:40 +02:00
32a14263cf Merge pull request #35831 from anusha-ragunathan/splunk_partial
Improve partial message support in logger
Upstream-commit: 9689059b5636f23d77cc3ac29ee41c6fabff81ec
Component: engine
2018-04-12 17:38:27 -07:00
e844cef5f8 Improve partial message support in logger
Docker daemon has a 16K buffer for log messages. If a message length
exceeds 16K, it should be split by the logger and merged at the
endpoint.

This change adds `PartialLogMetaData` struct for enhanced partial support
- LastPartial (bool) : indicates if this is the last of all partials.
- ID (string)        : unique 32 bit ID. ID is same across all partials.
- Ordinal (int starts at 1) : indicates the position of msg in the series of partials.
Also, the timestamps across partials in the same.

Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
Upstream-commit: 0b4b0a7b5d5de8cb575b666312fceaa2cd58e658
Component: engine
2018-04-11 13:26:28 -07:00
f323a813e1 Merge pull request #36724 from dnephin/api-docs-add-build-target
Add target field to build API docs
Upstream-commit: 045206a45c15625249d7956a6e18d2accaab6383
Component: engine
2018-04-02 22:35:00 -07:00
9b41292c7f Support cancellation in directory.Size()
Makes sure that if the user cancels a request that the daemon stops
trying to traverse a directory.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 9d46c4c138d7b3f7778c13fe84857712bd6c97a9
Component: engine
2018-03-29 15:49:15 -04:00
59210a575a Add target field to build API docs
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 95ccb55fe281fdccb996b0b82befcb3998beac25
Component: engine
2018-03-28 14:34:58 -04:00
60daf5fa97 Automated migration using
gty-migrate-from-testify --ignore-build-tags

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 6be0f709830113966f295401327b027ec2f0bbca
Component: engine
2018-03-16 11:03:43 -04:00
71ca3e138f Content encoding negotiation added to archive request.
Signed-off-by: Emil Davtyan <emil2k@gmail.com>
Upstream-commit: 117cd7ff640d5e58229eb7f6588d01b928a30607
Component: engine
2018-02-24 06:41:45 +01:00
e09ff74ed5 Adjust minimum API version for templated configs/secrets
Also adds a note to the API version history

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a3efeaad529b945ce5af78c4b08a6ed47399f8d5
Component: engine
2018-02-21 15:23:00 +01:00
40a7a5b6d7 Bump default API version to 1.37
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 453f2b8b40b923862ce1c08c11531ff5042770f1
Component: engine
2018-02-21 15:22:40 +01:00
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
e537ce0b31 Error out on secret/config templates for older API
Makes sure if the user specifies an older API version that we don't pass
through templating options for versions that templating was not
supported.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: a407761e483d9c5ea425a6fd5e55fec03a90485c
Component: engine
2018-02-16 11:25:14 -05:00
850e2bff8c Always mount configs with tmpfs
This makes configs and secrets behavior identical.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 8e8f5f4457d8e1b02031576dbc18c903be4bcfb6
Component: engine
2018-02-16 11:25:14 -05:00
fc6a93f926 api: Add Templating parameter to SecretSpec and ConfigSpec
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: c5df7235f6a4811f26b37441db401f6b04858504
Component: engine
2018-02-16 11:25:13 -05:00
0e750709d3 Move commit to container backend
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: e574c5ae73f2f54c47319e5e4a17b16bd93213be
Component: engine
2018-02-14 16:06:12 -05:00
25813b19fa Merge pull request #36269 from Microsoft/jjh/remove-lcow-api-platform-if-omitted
Remove interim env var LCOW_API_PLATFORM_IF_OMITTED
Upstream-commit: 04cb98e6b5e5bd9dac0b92fcc13966498053aa7e
Component: engine
2018-02-13 15:12:18 -08:00
f914512cd5 Merge pull request #36271 from dnephin/use-tag-image-in-commit
Use TagImage in Commit
Upstream-commit: 060893ab5d97d6582770224db3623ad1b3bdb6e1
Component: engine
2018-02-13 16:40:17 -05:00
228b4fffc0 Merge pull request #36246 from sirreal/fix/swagger-buildargs-type
Fix string type for buildargs API definition
Upstream-commit: 9cbe066e2709cb98ff44b687c2fba1956ff95872
Component: engine
2018-02-12 11:21:42 -08:00
4816de08ce Add example buildargs usage
Signed-off-by: Jon Surrell <jon.surrell@gmail.com>
Upstream-commit: 344c73ac672cd4d4f70a08b5a41b6835d9873926
Component: engine
2018-02-12 14:09:37 +01:00
535cb21e7e Reformat to multi-line
Signed-off-by: Jon Surrell <jon.surrell@gmail.com>
Upstream-commit: de2b2b5e4ba0cb297d47a7b05614190fa44f54a2
Component: engine
2018-02-12 14:09:31 +01:00
8382b77c1c Use TagImage in Commit
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: afb3eda697efebf18d8ac3bbcfd911a5968081e3
Component: engine
2018-02-09 20:53:39 -05:00
d3c6f2e0ef Remove interim env var LCOW_API_PLATFORM_IF_OMITTED
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c111fec758770a37e8674cac312e528e85d89428
Component: engine
2018-02-09 12:05:07 -08:00
e09b72af21 Merge pull request #36224 from dnephin/refactor-commit
Refactor Daemon.Commit()
Upstream-commit: 9769ef333f2af24b30fed0dd7b00384b2df3b953
Component: engine
2018-02-08 21:02:30 +09:00
8ea0c8eb22 Fix string type for buildargs API definition
Signed-off-by: Jon Surrell <jon.surrell@gmail.com>
Upstream-commit: f281358ba2de6204a61cdb062fa67a8b7134739c
Component: engine
2018-02-08 13:00:24 +01:00
4ec1fd107e Refactor commit
The goal of this refactor is to make it easier to integrate buildkit
and containerd snapshotters.

Commit is used from two places (api and build), each calls it
with distinct arguments. Refactored to pull out the common commit
logic and provide different interfaces for each consumer.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: daff039049aea6e19a4bda1df2834d14b4198bc0
Component: engine
2018-02-07 15:09:06 -05:00