Commit Graph

1073 Commits

Author SHA1 Message Date
b48ef8cdca DebugRequestMiddleware: Remove path handling
Path-specific rules were removed, so this is no longer used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 530e63c1a61b105a6f7fc143c5acb9b5cd87f958)
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit f8a0f26843bc5aff33cf9201b75bd4bdbb48a3ad)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a11c3098a3d5106b2d7c90d971c9300099556a49
Component: engine
2019-07-17 17:24:44 +02:00
3b1e458374 DebugRequestMiddleware: unconditionally scrub data field
Commit 77b8465d7e68ca102d7aae839c7b3fe0ecd28398 added a secret update
endpoint to allow updating labels on existing secrets. However, when
implementing the endpoint, the DebugRequestMiddleware was not updated
to scrub the Data field (as is being done when creating a secret).

When updating a secret (to set labels), the Data field should be either
`nil` (not set), or contain the same value as the existing secret. In
situations where the Data field is set, and the `dockerd` daemon is
running with debugging enabled / log-level debug, the base64-encoded
value of the secret is printed to the daemon logs.

The docker cli does not have a `docker secret update` command, but
when using `docker stack deploy`, the docker cli sends the secret
data both when _creating_ a stack, and when _updating_ a stack, thus
leaking the secret data if the daemon runs with debug enabled:

1. Start the daemon in debug-mode

        dockerd --debug

2. Initialize swarm

        docker swarm init

3. Create a file containing a secret

        echo secret > my_secret.txt

4. Create a docker-compose file using that secret

        cat > docker-compose.yml <<'EOF'
        version: "3.3"
        services:
          web:
            image: nginx:alpine
            secrets:
              - my_secret
        secrets:
          my_secret:
            file: ./my_secret.txt
        EOF

5. Deploy the stack

        docker stack deploy -c docker-compose.yml test

6. Verify that the secret is scrubbed in the daemon logs

        DEBU[2019-07-01T22:36:08.170617400Z] Calling POST /v1.30/secrets/create
        DEBU[2019-07-01T22:36:08.171364900Z] form data: {"Data":"*****","Labels":{"com.docker.stack.namespace":"test"},"Name":"test_my_secret"}

7. Re-deploy the stack to trigger an "update"

        docker stack deploy -c docker-compose.yml test

8. Notice that this time, the Data field is not scrubbed, and the base64-encoded secret is logged

        DEBU[2019-07-01T22:37:35.828819400Z] Calling POST /v1.30/secrets/w3hgvwpzl8yooq5ctnyp71v52/update?version=34
        DEBU[2019-07-01T22:37:35.829993700Z] form data: {"Data":"c2VjcmV0Cg==","Labels":{"com.docker.stack.namespace":"test"},"Name":"test_my_secret"}

This patch modifies `maskSecretKeys` to unconditionally scrub `Data` fields.
Currently, only the `secrets` and `configs` endpoints use a field with this
name, and no other POST API endpoints use a data field, so scrubbing this
field unconditionally will only scrub requests for those endpoints.

If a new endpoint is added in future where this field should not be scrubbed,
we can re-introduce more fine-grained (path-specific) handling.

This patch introduces some change in behavior:

- In addition to secrets, requests to create or update _configs_ will
  now have their `Data` field scrubbed. Generally, the actual data should
  not be interesting for debugging, so likely will not be problematic.
  In addition, scrubbing this data for configs may actually be desirable,
  because (even though they are not explicitely designed for this purpose)
  configs may contain sensitive data (credentials inside a configuration
  file, e.g.).
- Requests that send key/value pairs as a "map" and that contain a
  key named "data", will see the value of that field scrubbed. This
  means that (e.g.) setting a `label` named `data` on a config, will
  scrub/mask the value of that label.
- Note that this is already the case for any label named `jointoken`,
  `password`, `secret`, `signingcakey`, or `unlockkey`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c7ce4be93ae8edd2da62a588e01c67313a4aba0c)
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 73db8c77bfb2d0cbdf71ce491f3d3e66c9dd5be6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 32b40c53662e733b4627b0b303c71b52484a31f4
Component: engine
2019-07-17 17:24:35 +02:00
2294bf630c TestMaskSecretKeys: use subtests
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 32d70c7e21631224674cd60021d3ec908c2d888c)
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit ebb542b3f88d7f5551f6b6e1d8d2774a2c166409)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 1371b11749854515289abe6bcc0c1b0759ea7a5b
Component: engine
2019-07-17 17:24:23 +02:00
16da52903d TestMaskSecretKeys: add more test-cases
Add tests for

- case-insensitive matching of fields
- recursive masking

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit db5f811216e70bcb4a10e477c1558d6c68f618c5)
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 18dac2cf32faeaada3bd4e8e2bffa576ad4329fe)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 310770b6deae3ff2f244654b8e84c14576e38493
Component: engine
2019-07-17 17:24:14 +02:00
a628600cdc builder-next: fix squash
Tagger was not called for BuildKit-mode.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit 7fc0f820ea1e9036a1466ee8ef7a7395b792623f)
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
Upstream-commit: 8d87a2a4bc88b235f06e3995bb33f978d7c28cdf
Component: engine
2019-03-21 21:34:49 +09:00
ed2630b559 Merge pull request #110 from thaJeztah/18.09_backport_handle_invalid_json
[18.09 backport] API: properly handle invalid JSON to return a 400 status
Upstream-commit: 8f18feabeb9ef7fe670ff6f1ecbba2a6460e0267
Component: engine
2018-11-27 09:51:54 -08:00
78dccb265d Ignore default address-pools on API < 1.39
These options were added in API 1.39, so should be ignored
when using an older version of the API.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7632ccbc66c82179547b96524672bd5082ae7481)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4cc45d91eb44cbaddcfd75335c3f72ede035c440
Component: engine
2018-11-21 22:15:18 +01:00
3cd1faba5a API: properly handle invalid JSON to return a 400 status
The API did not treat invalid JSON payloads as a 400 error, as a result
returning a 500 error;

Before this change, an invalid JSON body would return a 500 error;

```bash
curl -v \
  --unix-socket /var/run/docker.sock \
  -X POST \
  "http://localhost/v1.30/networks/create" \
  -H "Content-Type: application/json" \
  -d '{invalid json'
```

```
> POST /v1.30/networks/create HTTP/1.1
> Host: localhost
> User-Agent: curl/7.52.1
> Accept: */*
> Content-Type: application/json
> Content-Length: 13
>
* upload completely sent off: 13 out of 13 bytes
< HTTP/1.1 500 Internal Server Error
< Api-Version: 1.40
< Content-Type: application/json
< Docker-Experimental: false
< Ostype: linux
< Server: Docker/dev (linux)
< Date: Mon, 05 Nov 2018 11:55:20 GMT
< Content-Length: 79
<
{"message":"invalid character 'i' looking for beginning of object key string"}
```

Empty request:

```bash
curl -v \
  --unix-socket /var/run/docker.sock \
  -X POST \
  "http://localhost/v1.30/networks/create" \
  -H "Content-Type: application/json"
```

```
> POST /v1.30/networks/create HTTP/1.1
> Host: localhost
> User-Agent: curl/7.54.0
> Accept: */*
> Content-Type: application/json
>
< HTTP/1.1 500 Internal Server Error
< Api-Version: 1.38
< Content-Length: 18
< Content-Type: application/json
< Date: Mon, 05 Nov 2018 12:00:18 GMT
< Docker-Experimental: true
< Ostype: linux
< Server: Docker/18.06.1-ce (linux)
<
{"message":"EOF"}
```

After this change, a 400 is returned;

```bash
curl -v \
  --unix-socket /var/run/docker.sock \
  -X POST \
  "http://localhost/v1.30/networks/create" \
  -H "Content-Type: application/json" \
  -d '{invalid json'
```

```
> POST /v1.30/networks/create HTTP/1.1
> Host: localhost
> User-Agent: curl/7.52.1
> Accept: */*
> Content-Type: application/json
> Content-Length: 13
>
* upload completely sent off: 13 out of 13 bytes
< HTTP/1.1 400 Bad Request
< Api-Version: 1.40
< Content-Type: application/json
< Docker-Experimental: false
< Ostype: linux
< Server: Docker/dev (linux)
< Date: Mon, 05 Nov 2018 11:57:15 GMT
< Content-Length: 79
<
{"message":"invalid character 'i' looking for beginning of object key string"}
```

Empty request:

```bash
curl -v \
  --unix-socket /var/run/docker.sock \
  -X POST \
  "http://localhost/v1.30/networks/create" \
  -H "Content-Type: application/json"
```

```
> POST /v1.30/networks/create HTTP/1.1
> Host: localhost
> User-Agent: curl/7.52.1
> Accept: */*
> Content-Type: application/json
>
< HTTP/1.1 400 Bad Request
< Api-Version: 1.40
< Content-Type: application/json
< Docker-Experimental: false
< Ostype: linux
< Server: Docker/dev (linux)
< Date: Mon, 05 Nov 2018 11:59:22 GMT
< Content-Length: 49
<
{"message":"got EOF while reading request body"}
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c7b488fbc82604ec23b862ec1edc5a0be9c7793d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9e06a421234f0bba8392b9a8908a94ff74f0c254
Component: engine
2018-11-08 14:01:27 +01:00
2d00f9e2eb builder: treat unset keep-storage as 0
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit d6ac2b0db00455824c400394f316bdbc5adf8867)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: dbfc648a94569d8dbc8c6468d56ec93559363bb0
Component: engine
2018-10-11 20:35:43 +00:00
815b828ddb always hornor client side to choose which builder to use with DOCKER_BUILDKIT env var regardless the server setup
Signed-off-by: Anda Xu <anda.xu@docker.com>
(cherry picked from commit 5d931705e33927ba9f0b7251b74b6b3c450edaf6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5badfb40ebf1877bb319af3892b32a78491fb8e8
Component: engine
2018-09-14 17:29:47 +02:00
5a73ccd4a8 builder: add prune options to the API
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 8ff7847d1cf0f156b8a7cf1450aa944ef636c747)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 3153708f13ceefc3e8e4d4a93778dcc9e4347f5a
Component: engine
2018-09-04 15:02:28 +00:00
5cbbb8e6bd allow features option live reloadable
Signed-off-by: Anda Xu <anda.xu@docker.com>
(cherry picked from commit 58a75cebdd08f3d504a5be79cc405cf33c4cbf43)
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: 2f94f103425985dc1677ee9a87f1161007949a45
Component: engine
2018-09-04 15:01:46 +00:00
ed97b30d09 Fix logic when enabling buildkit
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: c973cde7606dc7a2557094fc90d8e6bb595fa354
Component: engine
2018-08-21 23:49:08 +00:00
2594f77b01 move /session api endpoint out of experimental
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 01c9e7082eba71cbe60ce2e47acb9aad2c83c7ef
Component: engine
2018-08-21 22:43:34 +00:00
cea4607c21 remove experimental guard for buildkit
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Upstream-commit: 239047c2d36706f2826b0a9bc115e0a08b1c3d27
Component: engine
2018-08-21 22:19:45 +00:00
02ca9d77c5 add optional fields in daemon.json to enable buildkit
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: 2be17666b4cf21995da3e4ddf4ed615e6e6ca63a
Component: engine
2018-08-19 14:58:23 -07:00
59e4a5a574 Do not return "<unknown>" in /info response
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e6e8ab50fad5397f7be07fa00ba2bca85860cbe8
Component: engine
2018-07-16 16:09:58 +02:00
4c7a4e64a3 builder: fix duplicate calls to mountable
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: ffa7233d1538363fe12ad609e720b8d75e8768de
Component: engine
2018-07-10 15:21:29 -07:00
6283fee6a2 api: Change Platform field back to string (temporary workaround)
This partially reverts https://github.com/moby/moby/pull/37350

Although specs.Platform is desirable in the API, there is more work
to be done on helper functions, namely containerd's platforms.Parse
that assumes the default platform of the Go runtime.

That prevents a client to use the recommended Parse function to
retrieve a specs.Platform object.

With this change, no parsing is expected from the client.

Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: facad557440a0c955beb615495b8d0175f25e4e3
Component: engine
2018-07-03 22:33:42 +00:00
2a9011606f builder: return image ID in API when using buildkit
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: ca8022ec63a9d0e2f9660e2a3455d821abf8f517
Component: engine
2018-07-03 19:11:02 +00:00
e6f427396a Merge pull request #37156 from cpuguy83/networking_api_types_only
Move network conversions out of API router
Upstream-commit: d912e9460e287238f879de791595193543ab2202
Component: engine
2018-06-29 02:47:27 +02:00
b30a6b365b Merge pull request #37350 from tonistiigi/platform-support
Fix platform struct passing
Upstream-commit: 1436dc8f8d0f6f60b6e335fbd918d6b22ee6574d
Component: engine
2018-06-27 19:23:27 -07:00
d86ac0bd5d Move network conversions out of API router
This stuff doesn't belong here and is causing imports of libnetwork into
the router, which is not what we want.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c0bc14e8dd5a31f5edc804e9a1347bb3eb44483e
Component: engine
2018-06-27 17:11:29 -07:00
d2c785277a system: add back lcow validation function
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: f0997716651b6e6c2b07e3d514bf8452114a1433
Component: engine
2018-06-27 15:24:26 -07:00
b67a507422 distribution: fix passing platform struct to puller
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 337ba71fc1124603302e28d94e2f08674e31a756
Component: engine
2018-06-27 14:59:31 -07:00
28ca1b95b2 api: fix platform type
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 81f862a1fe6f24fea70b1278a4292eefc4029a03
Component: engine
2018-06-26 22:59:17 -07:00
f402d858a8 Update comments about InitRouter
This is a follow-up of commit 408c7ad (PR: #32453)

Signed-off-by: Yuichiro Kaneko <spiketeika@gmail.com>
Upstream-commit: dbd4c290b7029d31fa69c906a8da864589f19e09
Component: engine
2018-06-27 09:45:06 +09:00
0c25b296c2 Initial support for OCI multi-platform image
Add the OCI spec compatible image support in client side.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 7f334d3acfd7bfde900e16e393662587b9ff74a1
Component: engine
2018-06-26 11:39:29 -07:00
4cadaa03f8 Update tests to use gotest.tools 👼
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 38457285242e57306c5b7ee652c7ccbb9fbd6713
Component: engine
2018-06-13 09:04:30 +02:00
5f4f0d9ecc builder: correct output buffering order
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: ab4cbe2c3f55ed63ef80d2886cb006d082271630
Component: engine
2018-06-10 10:05:31 -07:00
d75f0ca946 builder: more experimental/windows validation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 577732f655fc95396b8c2b9a45747c5c95760755
Component: engine
2018-06-10 10:05:30 -07:00
99ee72157e builder: notify output buffering on body close
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 1a6262e9efbf2062ade0ad01717f041e6cdfd6fa
Component: engine
2018-06-10 10:05:30 -07:00
b29ae02ee8 builder: move tagging to exporter
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 4cdb6853dcf7105bc355370dac7246d9061e23ee
Component: engine
2018-06-10 10:05:30 -07:00
e7c54d5a63 builder: lint fixes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 157b0b30dbf2f5af5c5b121bee60c1951af71fb5
Component: engine
2018-06-10 10:05:29 -07:00
1a41f07112 builder: add support for separate upload-request
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: a25846a67527b2a8de5159608979fc7ff9d70bdf
Component: engine
2018-06-10 10:05:29 -07:00
cd6ea182f9 builder: protect early progress writes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: f3ef8c93d617bdcf250c7b682861c590e7fce411
Component: engine
2018-06-10 10:05:29 -07:00
a9e10d0f4d builder: add support for building from tarball
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 92395261b05610ca0a8ae799220ce29f8ee00fac
Component: engine
2018-06-10 10:05:28 -07:00
11b7f9664a builder: fixes after rebase
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: ed651e796c6fd91d533eadaacfb57c36702edd39
Component: engine
2018-06-10 10:05:28 -07:00
3a980ed674 builder: expand prune to buildkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 760ecf958b741beb1c645a96e69065af9ebcad79
Component: engine
2018-06-10 10:05:27 -07:00
33e5fdd844 builder: export build cache records
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b225258496f3ec8b6906b3fc6a3a2c76e50502d9
Component: engine
2018-06-10 10:05:27 -07:00
edce20e895 builder: add graceful cancellation endpoint
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 0bddd4ccfee5b7f4f69cd4757f053214be2ad4cd
Component: engine
2018-06-10 10:05:26 -07:00
08ef676cdf builder: experimental buildkit base
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 22f7caee03b807f50f993eb387a4017acab1657e
Component: engine
2018-06-10 10:05:26 -07: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
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
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
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
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
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
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