Commit Graph

33744 Commits

Author SHA1 Message Date
c19e3d0b29 Merge pull request #128 from thaJeztah/18.09_backport_containerd_v1.2.1-GA
[18.09 backport] update just installer of containerd to 1.2.1
Upstream-commit: 6c633fbe18e0a69db3db1aed28b3fa23bc795dfe
Component: engine
2018-12-07 06:18:48 -08:00
37a56d2599 update just installer of containerd to 1.2.1
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
(cherry picked from commit 1014b2bb66050a11bba833349346b35e6472688b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2c64d7c858b5fd16d0d14d692a3765cf8d5a5d7e
Component: engine
2018-12-07 11:20:22 +01:00
679c1150b8 Merge pull request #126 from thaJeztah/18.09_backport_mask_asound
[18.09 backport] Masked /proc/asound
Upstream-commit: 82a4418f57d5aa0d58c8bba630d701a918094c3b
Component: engine
2018-12-03 14:06:43 -08:00
3948a779cf Merge pull request #123 from tonistiigi/1809-builder-net
[18.09] builder: set externalkey option for faster hook processing
Upstream-commit: e7a4385e240a1cfb1d795ed8d622c97f6c217585
Component: engine
2018-11-30 14:02:12 -08:00
67db4a25e1 Bump Go to 1.10.5
go1.10.5 (released 2018/11/02) includes fixes to the go command, linker,
runtime and the database/sql package. See the milestone on the issue
tracker for details:

List of changes; https://github.com/golang/go/issues?q=milestone%3AGo1.10.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 00ad8e7c5730f3c50ae2e548b47d1340202f72b2
Component: engine
2018-11-30 20:43:05 +01:00
b15b31936b Masked /proc/asound
@sw-pschmied originally post this in #38285

While looking through the Moby source code was found /proc/asound to be
shared with containers as read-only (as defined in
https://github.com/moby/moby/blob/master/oci/defaults.go#L128).

This can lead to two information leaks.

---

**Leak of media playback status of the host**

Steps to reproduce the issue:

 - Listen to music/Play a YouTube video/Do anything else that involves
sound output
 - Execute docker run --rm ubuntu:latest bash -c "sleep 7; cat
/proc/asound/card*/pcm*p/sub*/status | grep state | cut -d ' ' -f2 |
grep RUNNING || echo 'not running'"
 - See that the containerized process is able to check whether someone
on the host is playing music as it prints RUNNING
 - Stop the music output
 - Execute the command again (The sleep is delaying the output because
information regarding playback status isn't propagated instantly)
 - See that it outputs not running

**Describe the results you received:**

A containerized process is able to gather information on the playback
status of an audio device governed by the host. Therefore a process of a
container is able to check whether and what kind of user activity is
present on the host system. Also, this may indicate whether a container
runs on a desktop system or a server as media playback rarely happens on
server systems.

The description above is in regard to media playback - when examining
`/proc/asound/card*/pcm*c/sub*/status` (`pcm*c` instead of `pcm*p`) this
can also leak information regarding capturing sound, as in recording
audio or making calls on the host system.

Signed-off-by: Jonathan A. Schweder <jonathanschweder@gmail.com>

(cherry picked from commit 64e52ff3dbdb31adc0a9930b3ea74b04b0df8d86)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5fffdb32261145b1178f571e25fbd71572769d58
Component: engine
2018-11-30 14:57:51 +01:00
613f303049 Windows:Tie busybox to version
Signed-off-by: John Howard <jhoward@microsoft.com>
(cherry picked from commit 14c8b67e51a8340284dfd8919843ce9edd1e5c71)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9c93de59da8eaa0e0e0377578a33b465b9465bb2
Component: engine
2018-11-30 01:38:11 +01:00
6709623942 builder: delete sandbox in a goroutine for performance
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit bcf1967dd0893b36c56c8c9b87c84246916484a1)
Upstream-commit: 73911117b30ba74c42177b0f002bb4e98f2473f9
Component: engine
2018-11-29 09:15:15 -08:00
71605fc317 builder: set externalkey option for faster hook processing
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 1ad272c7e409476fd50fc701d45329b1e05bdec9)
Upstream-commit: 8fe3b4d2ec06720fedfce2c2ef1b4fd7940961a6
Component: engine
2018-11-29 09:15:00 -08:00
7e016c5a84 Merge pull request #81 from thaJeztah/18.09_backport_processandiot
[18.09 backport] Windows:Allow process isolation
Upstream-commit: a1f6b04a8d373dbed6262f076d9aac834031d24a
Component: engine
2018-11-27 09:58:22 -08:00
06d25f9c17 Merge pull request #85 from thaJeztah/18.09_backport_deprecated_storagedrivers
[18.09 backport] deprecate legacy "overlay", and "devicemapper" storage drivers 
Upstream-commit: 7a566c0e4a98ec9960b5312e806ab546203dff15
Component: engine
2018-11-27 09:57:46 -08:00
2eb0feaf2d Merge pull request #107 from thaJeztah/18.09_backport_bump_libnetwork
[18.09 backport] update libnetwork to fix iptables compatibility on debian
Upstream-commit: 61a250fd23db8cee48403e3d9de5de100470bd03
Component: engine
2018-11-27 09:55:12 -08: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
1e216e2ec4 Merge pull request #112 from thaJeztah/18.09_backport_moby_37747
[18.09 backport] awslogs: account for UTF-8 normalization in limits
Upstream-commit: 08a77f11a63b2d25c00ca0e35012194bdcfbe917
Component: engine
2018-11-27 09:48:39 -08:00
bf3a1002a3 Merge pull request #113 from thaJeztah/18.09_backport_detach
[18.09 backport] Windows: DetachVhd attempt in cleanup
Upstream-commit: 4fd103ae26fc7784e79ed40f4e500e96477e14d2
Component: engine
2018-11-27 09:47:07 -08:00
4d5ef4f441 Merge pull request #114 from thaJeztah/18.09_backport_limit_client_readall
[18.09 backport] client: use io.LimitedReader for reading HTTP error
Upstream-commit: 52a6fc02b1caa947aac807cdca807444d96c2e27
Component: engine
2018-11-27 09:44:42 -08:00
62511b1be7 Merge pull request #116 from thaJeztah/18.09_backport_apparmor_external_templates
[18.09 backport] apparmor: allow receiving of signals from 'docker kill'
Upstream-commit: 12b8ec42b6ac60188ac48137677ee69ce98a3822
Component: engine
2018-11-27 09:41:37 -08:00
4dfe418aab Merge pull request #118 from thaJeztah/18.09_backport_fence_default_addr_pools
[18.09 backport] Ignore default address-pools on API < 1.39
Upstream-commit: 23122e4d52258b72fde031284a1d53f941e6426c
Component: engine
2018-11-27 09:38:39 -08:00
34a9d0e6de Merge pull request #119 from thaJeztah/18.09_backport_fix_default_addr_pools_swagger
[18.09 backport] Add missing default address pool fields to swagger
Upstream-commit: 04a6b49a896470420dd460b6ce027cac41791c04
Component: engine
2018-11-27 09:36:52 -08:00
cbd6c39e45 Merge pull request #120 from thaJeztah/18.09_backport_check_for_more_ipvs_options
[18.09 backport] Add CONFIG_IP_VS_PROTO_TCP, CONFIG_IP_VS_PROTO_UDP, IP_NF_TARGET_REDIRECT to check-config.sh
Upstream-commit: c488cf7e95b14d5d769a06f72f72fb899800683c
Component: engine
2018-11-27 09:35:55 -08:00
f10a3615ef Merge pull request #121 from thaJeztah/18.09_backport_containerd_v1.2.1
[18.09 backport] Update containerd to v1.2.1-rc.0
Upstream-commit: c95cf2a5d36b5448e4771a29f2ad72214a2311dd
Component: engine
2018-11-27 09:15:48 -08:00
71bb7e098b vendor: update buildkit to v0.3.3
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 6204eb064561ba03ba9143d2b29d86836b2093d9)
Upstream-commit: 850fff5fc7f033e76ef0eec04eb98384ddf2065d
Component: engine
2018-11-21 14:10:01 -08:00
54654abf3a builder: avoid unset credentials in containerd
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit effb2bd9d23cc05305c4772338b9eb39423e92c6)
Upstream-commit: 0d17f4099496ba3de583273eeebefa3cce4694ca
Component: engine
2018-11-21 14:09:31 -08:00
079995778e builder: ignore label and label! prune filters
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 62923f29f514fa621e7c31011c11c610cfe33ecd)
Upstream-commit: 34867646af1d1344b1f0877bb3a00a51f7700245
Component: engine
2018-11-21 14:08:18 -08:00
fd572d6e86 builder: deprecate prune filter unused-for in favor of until
This is to keep the UX consistent. `unused-for` is still accepted and a synonym.

Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 369da264bac15769ae944cc880e66abaf158612b)
Upstream-commit: 0b2d88d328ca88c8732dc11c72873b53be3bd2f8
Component: engine
2018-11-21 14:08:04 -08:00
2aed2152c7 Merge pull request #84 from thaJeztah/18.09_backport_ovr2_index
[18.09 backport] overlay2: use index=off if possible (fix EBUSY on mount)
Upstream-commit: 27b0fee84688d0590cac13bf2f507a58bc841251
Component: engine
2018-11-21 15:46:01 -06: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
66a497c4f1 apparmor: allow receiving of signals from 'docker kill'
In newer kernels, AppArmor will reject attempts to send signals to a
container because the signal originated from outside of that AppArmor
profile. Correct this by allowing all unconfined signals to be received.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: Aleksa Sarai <asarai@suse.de>
(cherry picked from commit 4822fb1e2423d88cdf0ad5d039b8fd3274b05401)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 67c602c3fe3d5d817fb7210e50d7ed1688b28801
Component: engine
2018-11-21 22:13:56 +01:00
9baf0f2b61 Update containerd to v1.2.1-rc.0
The previous update used a commit from master. Now that
all the fixes are backported to the containerd 1.2 release
branch, we can switch back to that branch.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2fb5de68a9bd05b1dbf3ae3f7ae82bcd5e64dc5c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: db7f375d6a2aaf6d79f5c690e2f302c640bdde04
Component: engine
2018-11-21 21:59:41 +01:00
9a2dacb99c wip: bump containerd and runc version
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit d13528c6350a4b359a7b8dc9a8a7bcba12a3c1a8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 7d6ec38402f4e2a5e1c83a981a88bf1a5f202858
Component: engine
2018-11-21 21:59:33 +01:00
309dc64b35 Bump containerd binary to fix shim hang
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 7af4c904b31887e28776cd514e0b8cf8c0261310)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 64a05e3d162b7234f8a7aa32d10434db4c5e6364
Component: engine
2018-11-21 21:59:27 +01:00
1372540bda Update runc to 58592df56734acf62e574865fe40b9e53e967910
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit fc0038a3edd518b7a4de7a8168d4888b08130c28)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 262abed3d2e84756e16c73c7c241aa62918c51c8
Component: engine
2018-11-21 21:59:20 +01:00
d9478a175e Update containerd to v1.2.0
release notes: https://github.com/containerd/containerd/releases/tag/v1.2.0

- New V2 Runtime with a stable gRPC interface for managing containers through
  external shims.
- Updated CRI Plugin, validated against Kubernetes v1.11 and v1.12, but it is
  also compatible with Kubernetes v1.10.
- Support for Kubernetes Runtime Class, introduced in Kubernetes 1.12
- A new proxy plugin configuration has been added to allow external
  snapshotters be connected to containerd using gRPC.-
- A new Install method on the containerd client allows users to publish host
  level binaries using standard container build tooling and container
  distribution tooling to download containerd related binaries on their systems.
- Add support for cleaning up leases and content ingests to garbage collections.
- Improved multi-arch image support using more precise matching and ranking
- Added a runtime `options` field for shim v2 runtime. Use the `options` field to
  config runtime specific options, e.g. `NoPivotRoot` and `SystemdCgroup` for
  runtime type `io.containerd.runc.v1`.
- Some Minor API additions
  - Add `ListStream` method to containers API. This allows listing a larger
    number of containers without hitting message size limts.
  - Add `Sync` flag to `Delete` in leases API. Setting this option will ensure
    a garbage collection completes before the removal call is returned. This can
    be used to guarantee unreferenced objects are removed from disk after a lease.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8674930c84140c990451adb148165422d008b661)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e137337fe6083da91fd6d83d699cff3a857f636e
Component: engine
2018-11-21 21:59:13 +01:00
d1211604a7 Add a note about updating runc / runc vendoring
Containerd should be "leading" when specifying which version of runc to use.
From the RUNC.MD document in the containerd repository
(https://github.com/containerd/containerd/blob/b1e202c32724e82779544365528a1a082
b335553/RUNC.md);

> We depend on a specific runc version when dealing with advanced features. You
> should have a specific runc build for development. The current supported runc
> commit is described in vendor.conf. Please refer to the line that starts with
> github.com/opencontainers/runc.

This patch adds a note to vendor.conf and runc.installer to describe the order
in which runc should be updated.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit da3810d235bc0bd0197243d0128f258394554704)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: c9c87d76d651d57d72e52c575a2c9600170b5212
Component: engine
2018-11-21 21:59:06 +01:00
4056fb2fc0 Update containerd to v1.1.4
Fixes a potential content store bug, backported from 1.2

- v1.1.3 release notes: https://github.com/containerd/containerd/releases/tag/v1.1.3
- v1.1.4 release notes: https://github.com/containerd/containerd/releases/tag/v1.1.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b3c3c7a5a310ba340f1a86a4a708de34b9602e74)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a4decd0c4cd6033907fe85576a3d7dc8990aa758
Component: engine
2018-11-21 21:58:58 +01:00
bcbad46784 Add CONFIG_IP_VS_PROTO_TCP, CONFIG_IP_VS_PROTO_UDP, IP_NF_TARGET_REDIRECT to check-config.sh
On kernels without this options set, publishing ports for swarm
services does not work, making the published port not accessible
("connection refused")

Thanks to Wenbo Wang for reporting, and Tianon for finding this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 44e1c6ce81ff62c76ba630caf16a73922950abc3)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 25bec4665b6f011e52f7b2765ba1579c7430481d
Component: engine
2018-11-20 18:08:44 +01:00
87524aec57 Add missing default address pool fields to swagger
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2e8c913dbdfbba2591b6531ad2428c59eb261e0b)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 56cc26f927e6a1de51731f88baf5b0af3a5688bc
Component: engine
2018-11-20 15:50:46 +01:00
72b50c8f3c Merge pull request #109 from thaJeztah/18.09_backport_cleanup_volume_tests
[18.09 backport] Cleanup volume integration tests
Upstream-commit: 4980e48e4b2c34288cf3f1265db6eff6713b487c
Component: engine
2018-11-14 15:41:13 -08:00
40c17e0f1b Merge pull request #103 from thaJeztah/18.09_backport_fix_double_scheme
[18.09 backport] Fix double "unix://" scheme in TestInfoAPIWarnings
Upstream-commit: 299385de7fb930e7e805faf960dc66e9cadd8ad4
Component: engine
2018-11-14 15:39:54 -08:00
a4d9985c38 runc.installer: add nokmem build tag for rhel7 kernel
In case we're running on RHEL7 kernel, which has non-working
and broken kernel memory controller, add 'nokmem' build tag
so that runc never enables kmem accounting.

For more info, see the following runc commit:
https://github.com/opencontainers/runc/commit/6a2c1559684

This behavior can be overriden by having `RUNC_NOKMEM` environment
variable set (e.g. to empty value to disable setting nokmem).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 8972aa9350d52e4a7e58242447b7a9d2f0c27f37)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8486ea11ae800a1e6d634b741dfb007ba29f6003
Component: engine
2018-11-12 15:51:52 +01:00
fd839bc749 Bump runc
Changes: a00bf01908...9f1e94488e

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 335736fb0167a31a00cf2967c181a565c61334be)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 5b8cee93b5b6a2449d9af225e17d85c612f64ed2
Component: engine
2018-11-12 15:51:44 +01:00
c539968eac client: use io.LimitedReader for reading HTTP error
client.checkResponseErr() was hanging and consuming infinite memory
when the serverResp.Body io.Reader returns infinite stream.

This commit prohibits reading more than 1MiB.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit 1db4be0c32267b7a8a27998089ce96440bed492e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 49556e047059d81b64f6cd12f4c602c9a9c471c7
Component: engine
2018-11-12 11:44:37 +01:00
825b77191a Windows: DetachVhd attempt in cleanup
Signed-off-by: John Howard <jhoward@microsoft.com>

This is a fix for a few related scenarios where it's impossible to remove layers or containers
until the host is rebooted. Generally (or at least easiest to repro) through a forced daemon kill
while a container is running.

Possibly slightly worse than that, as following a host reboot, the scratch layer would possibly be leaked and
left on disk under the dataroot\windowsfilter directory after the container is removed.

One such example of a failure:

1. run a long running container with the --rm flag
docker run --rm -d --name test microsoft/windowsservercore powershell sleep 30
2. Force kill the daemon not allowing it to cleanup. Simulates a crash or a host power-cycle.
3. (re-)Start daemon
4. docker ps -a
PS C:\control> docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                PORTS               NAMES
7aff773d782b        malloc              "powershell start-sl…"   11 seconds ago      Removal In Progress                       malloc
5. Try to remove
PS C:\control> docker rm 7aff
Error response from daemon: container 7aff773d782bbf35d95095369ffcb170b7b8f0e6f8f65d5aff42abf61234855d: driver "windowsfilter" failed to remove root filesystem: rename C:\control\windowsfilter\7aff773d782bbf35d95095369ffcb170b7b8f0e6f8f65d5aff42abf61234855d C:\control\windowsfilter\7aff773d782bbf35d95095369ffcb170b7b8f0e6f8f65d5aff42abf61234855d-removing: Access is denied.
PS C:\control>

Step 5 fails.

(cherry picked from commit efdad5374465a2a889d7572834a2dcca147af4fb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 02fe71843e0e45ddc986a6c8182370b042349a27
Component: engine
2018-11-09 23:31:49 +01:00
6ad9059d36 awslogs: account for UTF-8 normalization in limits
The CloudWatch Logs API defines its limits in terms of bytes, but its
inputs in terms of UTF-8 encoded strings.  Byte-sequences which are not
valid UTF-8 encodings are normalized to the Unicode replacement
character U+FFFD, which is a 3-byte sequence in UTF-8.  This replacement
can cause the input to grow, exceeding the API limit and causing failed
API calls.

This commit adds logic for counting the effective byte length after
normalization and splitting input without splitting valid UTF-8
byte-sequences into two invalid byte-sequences.

Fixes https://github.com/moby/moby/issues/37747

Signed-off-by: Samuel Karp <skarp@amazon.com>
(cherry picked from commit 1e8ef386279e2e28aff199047e798fad660efbdd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 757650e8dcca87f95ba083a80639769a0b6ca1cc
Component: engine
2018-11-08 15:26:01 +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
2ccb209d78 Enable volume tests on Windows
These tests don't seem to have anything Linux-specific,
so enable them on Windows

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b334198e652b503d432832ec6f4faab7707d0eb4)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: e8eb3ca4eef1c913563195787eb1f2527c9febf3
Component: engine
2018-11-08 14:00:20 +01:00
7f84ab28cd Integration test: use filepath.Join() to make path cross-platform
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 05e18429cf50afbc40456a6f4eff1cfd6f1da707)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 673f04f0b1afdb0a1f739b9a4a8b41ea1e015ea4
Component: engine
2018-11-08 14:00:14 +01:00
0356a45a1c Some improvements to TestVolumesInspect
Some improvements in this test;

- use the volume-information that's returned by VolumeCreate as "expected"
- don't use an explict name for the volume, as it was only used to reference
  the volume for inspection
- improve the test-output on failure, so that "expected" and "actual" values
  are printed

Without this patch applied;

    === RUN   TestVolumesInspect
    --- FAIL: TestVolumesInspect (0.02s)
     	volume_test.go:108: assertion failed: false (bool) != true (true bool): Time Volume is CreatedAt not equal to current time
    FAIL

With this patch applied;

    === RUN   TestVolumesInspect
    --- FAIL: TestVolumesInspect (0.02s)
        volume_test.go:95: assertion failed: expression is false: createdAt.Truncate(time.Minute).Equal(now.Truncate(time.Minute)): CreatedAt (2018-11-01 16:15:20 +0000 UTC) not equal to creation time (2018-11-01 16:15:20.2421166 +0000 UTC m=+13.733512701)
    FAIL

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8e8cac82637952d49f8df42a3164478f13978c90)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 65bf95f3df84de5901479091685715f227c333ce
Component: engine
2018-11-08 14:00:08 +01:00
a5a251a531 Renamed windowsRS1.ps1 to windows.ps1
Signed-off-by: Deep Debroy <ddebroy@docker.com>
(cherry picked from commit 7d1c1a411b5c5bd58e657b24261f32d04fa0d8c5)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9fc9c3099da40b21fed9adc758f8787dbd3cedfd
Component: engine
2018-11-08 13:56:04 +01:00
36fc33af11 Enabling Windows integration tests
Signed-off-by: Salahuddin Khan <salah@docker.com>
(cherry picked from commit 4c8b1fd5a2803e393ad1296692533b7b5c727918)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 37cb9e73006acd13b9708cd594ebc25054fef666
Component: engine
2018-11-08 13:55:59 +01:00