Commit Graph

3110 Commits

Author SHA1 Message Date
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
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
99a67602d2 Merge pull request #36146 from yongtang/36142-TaskState
Add `REMOVE` and `ORPHANED` to TaskState
Upstream-commit: 3a6f8cfd5108aa3fac145525b7cd2f4f0439702d
Component: engine
2018-02-02 11:33:25 -08:00
877ec711a0 Fix issue of ExitCode and PID not show up in Task.Status.ContainerStatus
This fix tries to address the issue raised in 36139 where
ExitCode and PID does not show up in Task.Status.ContainerStatus

The issue was caused by `json:",omitempty"` in PID and ExitCode
which interprate 0 as null.

This is confusion as ExitCode 0 does have a meaning.

This fix removes  `json:",omitempty"` in ExitCode and PID,
but changes ContainerStatus to pointer so that ContainerStatus
does not show up at all if no content. If ContainerStatus
does have a content, then ExitCode and PID will show up (even if
they are 0).

This fix fixes 36139.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 9247e09944a4c7f3c2f3f20f180c047a19fb6bae
Component: engine
2018-01-31 15:35:19 +00:00
fe18510901 Add REMOVE and ORPHANED to TaskState
This fix tries to address the issue raised in 36142 where
there are discrepancies between Swarm API and swagger.yaml.

This fix adds two recently added state `REMOVE` and `ORPHANED` to TaskState.

This fix fixes 36142.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: a40687f5ac7df27bc6c6c3a6f69513a397a1a05a
Component: engine
2018-01-30 16:46:05 +00:00
f0d03ada35 Merge pull request #35946 from joelwurtz/patch-2
Fix Volumes property definition in ContainerConfig
Upstream-commit: 40a9d5d24cda0d938f3c41dceef41b97b6b4e847
Component: engine
2018-01-29 20:57:09 -08:00
7b9944fc04 Merge pull request #36074 from shutefan/master
Update API docs to show that /containers/{id}/kill returns HTTP 409
Upstream-commit: 958200970f4c52fd093aa913632d2d2b79ebf969
Component: engine
2018-01-28 08:32:35 -08:00
39f9f3f6e3 Merge pull request #34655 from nmeyerhans/document-init-api
Add Init API field documentation to swagger
Upstream-commit: 093a5402a041e9648d03d3e6545fa255e8fe96b2
Component: engine
2018-01-25 10:16:27 -08:00
0a23b8e672 Merge pull request #35989 from dani-docker/orca-11380
verbose info is missing for partial overlay ID
Upstream-commit: 2b2265acbb7b1457cd6657a5e4e5503472b306d1
Component: engine
2018-01-24 16:01:31 -08:00
a42cb7a60a Add Init API field documentation to swagger
Signed-off-by: Noah Meyerhans <nmeyerha@amazon.com>
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 467ea71e5e2a0142c1456e3280d69a9538402fec
Component: engine
2018-01-24 09:46:12 -08:00
74da78f854 Fix network alias issue
This fix tries to address the issue raised in 33661 where
network alias does not work when connect to a network the second time.

This fix address the issue.

This fix fixes 33661.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: d63a5a1ff593f14957f3e0a9678633e8237defc9
Component: engine
2018-01-23 01:04:33 +00:00
9e00f0f8fa fix verbose for partial overlay ID
Signed-off-by: Dani Louca <dani.louca@docker.com>
Upstream-commit: 2e0990f1655d151b741e7f7f78ac55e14398339f
Component: engine
2018-01-22 18:50:49 -05:00
928478219f Merge pull request #36013 from thaJeztah/improve-version-middleware-test
Improve API version-middleware test
Upstream-commit: fbed4eb8c72f56437f2a451f9cd9405814882e2a
Component: engine
2018-01-22 14:59:06 -08:00
5d42f5ba8b Update API docs to show that /containers/{id}/kill returns HTTP 409
Signed-off-by: Stephan Spindler <shutefan@gmail.com>
Upstream-commit: 3a1bb49b41901dd21ab9489937656ab935a690e0
Component: engine
2018-01-20 17:21:49 +01:00
946a37c1e4 Merge pull request #35744 from ndeloof/35702
closes #35702 introduce « exec_die » event
Upstream-commit: f97256cbf1811740cfa9a72f705c8a70195cd468
Component: engine
2018-01-19 15:03:50 -08:00
d00d4e32b9 Merge pull request #34859 from Microsoft/jjh/singleimagestore
LCOW: Coalesce daemon stores, allow dual LCOW and WCOW mode
Upstream-commit: bb6ce897378b4ebd0131fd835b01ad5f9af3ebb9
Component: engine
2018-01-19 11:38:30 -05:00
33860da10b LCOW: Re-coalesce stores
Signed-off-by: John Howard <jhoward@microsoft.com>

The re-coalesces the daemon stores which were split as part of the
original LCOW implementation.

This is part of the work discussed in https://github.com/moby/moby/issues/34617,
in particular see the document linked to in that issue.
Upstream-commit: ce8e529e182bde057cdfafded62c210b7293b8ba
Component: engine
2018-01-18 08:29:19 -08:00
1c29e89e9b Return 400 status instead of 500 for empty volume create body
The `POST /volumes/create` expects a request body to be provided.
If no body was provided, a 500 status was returned. A 500 status
is incorrect, because the request is invalid (it's not a server
error).

Before this change:

    $ curl --unix-socket /var/run/docker.sock -v -X POST http://localhost/volumes/create

    *   Trying /var/run/docker.sock...
    * Connected to localhost (/Users/sebastiaan/Library/Containers/com.dock) port 80 (#0)
    > POST /volumes/create HTTP/1.1
    > Host: localhost
    > User-Agent: curl/7.51.0
    > Accept: */*
    >
    < HTTP/1.1 500 Internal Server Error
    < Api-Version: 1.30
    < Content-Length: 18
    < Content-Type: application/json
    < Date: Wed, 19 Jul 2017 11:29:26 GMT
    < Docker-Experimental: true
    < Ostype: linux
    < Server: Docker/17.06.0-ce (linux)
    <
    {"message":"EOF"}
    * Curl_http_done: called premature == 0
    * Connection #0 to host localhost left intact

After this change:

    $ curl --unix-socket /var/run/docker.sock -v -X POST http://localhost/volumes/create

    *   Trying /var/run/docker.sock...
    * Connected to localhost (/var/run/docker.sock) port 80 (#0)
    > POST /volumes/create HTTP/1.1
    > Host: localhost
    > User-Agent: curl/7.52.1
    > Accept: */*
    >
    < HTTP/1.1 400 Bad Request
    < Api-Version: 1.36
    < Content-Type: application/json
    < Docker-Experimental: false
    < Ostype: linux
    < Server: Docker/dev (linux)
    < Date: Tue, 09 Jan 2018 15:00:13 GMT
    < Content-Length: 42
    <
    {"message":"no body provided in request"}
    * Curl_http_done: called premature == 0
    * Connection #0 to host localhost left intact

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5ad1e4be6bd2fd1033bc2adb5be2fe821787b59c
Component: engine
2018-01-16 20:42:44 +01: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
d7084e8097 Merge pull request #35638 from cpuguy83/error_helpers2
Add helpers to create errdef errors
Upstream-commit: c36274da8326c59aaa12c48196671b41dcb89e5b
Component: engine
2018-01-15 10:56:46 -08: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
1240c39efc Golint: don't use basic untyped string for context key
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: dfac74a9e48d1562ec41bc6de194f6593f0e639b
Component: engine
2018-01-15 12:49:14 +01:00
02da0b9277 Improve API version-middleware test
Some improvements to the test;

- Combine tests to reduce duplicated code
- Add test-cases for empty version in request using the default version
- Add test for valid versions in request actually setting the version

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 63906d8fae8164c8ef00e1edc957a90b22908bcf
Component: engine
2018-01-15 11:50:30 +01:00
d4d0b5c268 Move api/errdefs to errdefs
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: d453fe35b9b8b52d0677fe0c3cc8373f2f5d30d0
Component: engine
2018-01-11 21:21:43 -05:00
952c29f8da Add helpers to create errdef errors
Instead of having to create a bunch of custom error types that are doing
nothing but wrapping another error in sub-packages, use a common helper
to create errors of the requested type.

e.g. instead of re-implementing this over and over:

```go
type notFoundError struct {
  cause error
}

func(e notFoundError) Error() string {
  return e.cause.Error()
}

func(e notFoundError) NotFound() {}

func(e notFoundError) Cause() error {
  return e.cause
}
```

Packages can instead just do:

```
  errdefs.NotFound(err)
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 87a12421a94faac294079bebc97c8abb4180dde5
Component: engine
2018-01-11 21:21:43 -05:00
dc5184e050 Merge pull request #30897 from yongtang/30242-network-duplicate-names
Update `FindNetwork` to address network name duplications
Upstream-commit: 484612f388cabf4b6f4df915f2bf268a8ffdd9fc
Component: engine
2018-01-10 05:30:58 -08:00
5017f2840c Merge pull request #35593 from ndeloof/master
Improve swagger schema for code generation
Upstream-commit: 16a1736b9b93e44c898f95d670bbaf20a558103d
Component: engine
2018-01-08 12:17:56 +01:00
27f91f80b9 introduce « exec_die » event
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Upstream-commit: aa6bb5cb698ebcf6662e6667bc58055b5b5bde23
Component: engine
2018-01-08 11:42:25 +01:00
5857ab9402 Merge pull request #35798 from ndeloof/ProgressDetail
Progress detail
Upstream-commit: 847df43d1df0ef7343d4f623138dcbb4307d6083
Component: engine
2018-01-08 11:28:49 +01:00
7ee813acf5 Update and use FindNetwork on Windows.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: b249ccb1151a3c2c7e442b6c1a769821afb28fe4
Component: engine
2018-01-07 03:32:37 +00:00
65164d88f6 Fix Volumes property definition in ContainerConfig
Actually the specification was expecting a 'additionalProperties' for the Volumes data, where in fact it's expecting
a map of string pointing to empty object.

Signed-off-by: Joel Wurtz <joel.wurtz@gmail.com>
Upstream-commit: dc883c0486b398eb5ad99f35aef3ff02a5a7dd29
Component: engine
2018-01-06 16:12:05 +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