Commit graph

36355 commits

Author SHA1 Message Date
Sebastiaan van Stijn
477eeef60c
Bump gorilla/mux to 1.7.0
This release drops support for Go < 1.7, and removes the gorilla/context
dependency (which was needed for older Go versions).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-09 16:23:55 +01:00
Brian Goff
832ce62cb2
Merge pull request #38693 from tiborvass/fix-timeout-bug
hack: Have TIMEOUT take -test.count into account when testing for flakiness
2019-02-08 14:10:36 -08:00
Tibor Vass
42dcfc894a hack: Have TIMEOUT take -test.count into account when testing for flakiness
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-02-08 18:36:31 +00:00
Sebastiaan van Stijn
e6fe7f8f29
Merge pull request #38685 from yongtang/go-vet
Fix go-vet issue
2019-02-07 12:14:44 +01:00
Sebastiaan van Stijn
611b23c1a0
Merge pull request #38580 from andrey-ko/fix-restart
Pass in network IDs during restart
2019-02-07 08:46:16 +01:00
Yong Tang
86312a4732 Fix go-vet issue
This fix fixes the following issue with `go vet`:
```
$ go tool vet cmd/dockerd/daemon.go
cmd/dockerd/daemon.go:163: the cancel function is not used on all paths (possible context leak)
cmd/dockerd/daemon.go:167: this return statement may be reached without using the cancel var defined on line 163
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-02-06 23:30:28 +00:00
Brian Goff
c63a2b7619
Merge pull request #38678 from Microsoft/jjh/lcowpushspace
LCOW: Don't fail image push when files have spaces
2019-02-06 15:25:39 -08:00
Vincent Demeester
f8e29fdd68
Merge pull request #38679 from AkihiroSuda/rootlesskit-030alpha1
bump up rootlesskit (fix armv7 compilation failure)
2019-02-06 09:40:31 +01:00
Brian Goff
6501a8ff90
Merge pull request #38684 from tonistiigi/vpnkit-restore
hack: restore bundling vpnkit on amd64
2019-02-06 00:06:04 -08:00
Yong Tang
61da822eeb
Merge pull request #38683 from tonistiigi/ptrace-seccomp-update
seccomp: review update for ptrace support
2019-02-06 11:41:45 +08:00
Yong Tang
2c79d3520a
Merge pull request #38681 from Microsoft/jjh/hcsshim086
Vendor Microsoft/hcsshim @ v0.8.6
2019-02-06 11:41:34 +08:00
Tonis Tiigi
20e8572a4c hack: restore bundling vpnkit on amd64
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-02-05 18:21:30 -08:00
Brian Goff
f091a8dd62
Merge pull request #38680 from Microsoft/jjh/dumpduterr
Windows CI: Dump possible panic log
2019-02-05 15:21:39 -08:00
Tonis Tiigi
e76380b67b seccomp: review update
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-02-05 12:02:41 -08:00
John Howard
07742515fb Vendor Microsoft/hcsshim @ v0.8.6
Signed-off-by: John Howard <jhoward@microsoft.com>
2019-02-05 09:52:31 -08:00
John Howard
bc80e8df3e Windows CI: Dump possible panic log
Signed-off-by: John Howard <jhoward@microsoft.com>
2019-02-05 09:17:40 -08:00
Akihiro Suda
bcc4c03092 bump up rootlesskit (fix armv7 compilation failure)
https://github.com/rootless-containers/rootlesskit/issues/41

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2019-02-05 23:02:32 +09:00
Justin Cormack
1603af9689
Merge pull request #38137 from tonistiigi/seccomp-ptrace
seccomp: allow ptrace(2) for 4.8+ kernels
2019-02-05 13:47:43 +00:00
John Howard
2c8522b0a3 LCOW:Enable image push when files have spaces
Signed-off-by: John Howard <jhoward@microsoft.com>

Reported internally at Microsoft through VSO#19696554.
Using the solution from https://groups.google.com/forum/#!topic/Golang-Nuts/DpldsmrhPio
to quote file name and escape single quotes (https://play.golang.org/p/ntk8EEGjfk)

Simple repro steps are something like:

On an ubuntu box run something like
```
docker run -d --rm -p 5000:5000 registry:latest
hostname-I to get the ip address
```

On Windows start the daemon adding `--insecure-registry 10.124.186.18:5000`
(or whatever the IP address from above was)

```
docker run -it alpine sh
/ # echo bar > "with space"​
/ # echo foo > 'single quote space'
/ # exit

docker ps -a
docker commit <containerid>
(note the first few of the image id)
docker tag <first few> 10.124.186.18:5000/test
docker push 10.124.186.18:5000/test
```

Resulting error when pushing the image:

```
PS E:\docker\build\19696554> docker push 10.124.186.18:5000/simpletest2
The push refers to repository [10.124.186.18:5000/simpletest2]​
d328d7f5f277: Pushing [==================================================>]  74.24kB/74.24kB​
503e53e365f3: Layer already exists​
svm.runProcess: command cat /tmp/d59/single quote space failed with exit code 1​
PS E:\docker\build\19696554>
```

After this change pushing the image:
```
PS E:\docker\build\19696554> docker push 10.124.186.18:5000/simpletest2
The push refers to repository [10.124.186.18:5000/simpletest2]
d328d7f5f277: Pushing [==================================================>]  74.24kB/74.24kB
503e53e365f3: Layer already exists
latest: digest: sha256:b9828a2d2a3d2421a4c342f48b7936714b3d8409dc32c103da5f3fb13b54bdbf size: 735
PS E:\docker\build\19696554>
```
2019-02-04 12:07:58 -08:00
Vincent Demeester
e7a9a7cdbc
Merge pull request #35355 from x1022as/unless-stop
fix unless-stopped unexpected behavior
2019-02-04 10:28:23 +01:00
Vincent Demeester
8e06006717
Merge pull request #37296 from yusuf-gunaydin/lcow_limits
Implemented memory and CPU limits for LCOW.
2019-02-04 10:28:03 +01:00
Sebastiaan van Stijn
93d994e29c
Merge pull request #38050 from AkihiroSuda/rootless
Allow running dockerd as a non-root user (Rootless mode)
2019-02-03 23:27:03 +01:00
Akihiro Suda
ec87479b7e allow running dockerd in an unprivileged user namespace (rootless mode)
Please refer to `docs/rootless.md`.

TLDR:
 * Make sure `/etc/subuid` and `/etc/subgid` contain the entry for you
 * `dockerd-rootless.sh --experimental`
 * `docker -H unix://$XDG_RUNTIME_DIR/docker.sock run ...`

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2019-02-04 00:24:27 +09:00
Yusuf Tarık Günaydın
86bd2e9864 Implemented memory and CPU limits for LCOW.
Signed-off-by: Yusuf Tarık Günaydın <yusuf_tarik@hotmail.com>
2019-02-02 13:02:23 +03:00
Brian Goff
50e63adf30
Merge pull request #38574 from StefanScherer/improve-no-matching-manifest-error
Improve 'no matching manifest' error message
2019-02-01 21:03:37 -08:00
Tibor Vass
b17188be39
Merge pull request #38673 from thaJeztah/fix_proto_capitalization
Bump SwarmKit to fix proto capitalization
2019-02-01 15:57:16 -08:00
Deng Guangxing
8e293be4ba fix unless-stopped unexpected behavior
fix https://github.com/moby/moby/issues/35304.

Signed-off-by: dengguangxing <dengguangxing@huawei.com>
2019-02-01 15:03:17 -08:00
Sebastiaan van Stijn
b462bba1b0
Bump SwarmKit to fix proto capitalization
This brings in a single fix; swarmkit#2813 where a field inadvertedly
used incorrect capitalization.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-01 22:22:37 +01:00
Tianon Gravi
d440fea460
Merge pull request #38655 from thaJeztah/override_validate
Allow overriding repository and branch in validate scripts
2019-02-01 08:43:06 -08:00
Sebastiaan van Stijn
acf08532a7
Merge pull request #38520 from thaJeztah/fix_update_status_check
Bump SwarmKit to 1a0ebd43b2d156983a695f90e56f4ecba6ced902
2019-02-01 15:47:34 +01:00
Sebastiaan van Stijn
94429d4078
Remove use of serviceSpecIsUpdated
It's no longer needed with the latest swarmkit changes

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-01 01:35:41 +01:00
Sebastiaan van Stijn
0e60e48134
Bump swarmkit to 1a0ebd43b2d156983a695f90e56f4ecba6ced902
Full diff: 8af8c420f4...1a0ebd43b2

relevant changes:

- swarmkit#2771 Allow using Configs as CredentialSpecs
- swarmkit#2804 Make Service.UpdateStatus non-ambiguous
- swarmkit#2805 Refactor condition in restart supervisor
- swarmkit#2780 api: add BindOptions.NonRecursive
  - related to moby#38003
- swarmkit#2790 Fix possible panic if NetworkConfig is nil
- swarmkit#2797 Include old error-message for backward compatibility
  - related to swarmkit#2779 / moby#38140 / moby#38142

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-01 01:35:12 +01:00
Yong Tang
87903f2fb5
Merge pull request #38609 from kwojcicki/enhancement/38518-docker_info_builder_version
Adding builder version
2019-02-01 07:04:11 +08:00
Sebastiaan van Stijn
8a43b7bb99
Merge pull request #38570 from thaJeztah/keep_your_head_up
Add HEAD support for /_ping endpoint
2019-01-31 21:54:58 +01:00
Sebastiaan van Stijn
fc4a40b510
Merge pull request #38658 from thaJeztah/use_stable_cli
Use 17.06 stable channel for CLI used in CI
2019-01-31 18:58:55 +01:00
Sebastiaan van Stijn
7e7e100be0
Add HEAD support for /_ping endpoint
Monitoring systems and load balancers are usually configured to use HEAD
requests for health monitoring. The /_ping endpoint currently does not
support this type of request, which means that those systems have fallback
to GET requests.

This patch adds support for HEAD requests on the /_ping endpoint.

Although optional, this patch also returns `Content-Type` and `Content-Length`
headers in case of a HEAD request; Refering to RFC 7231, section 4.3.2:

    The HEAD method is identical to GET except that the server MUST NOT
    send a message body in the response (i.e., the response terminates at
    the end of the header section).  The server SHOULD send the same
    header fields in response to a HEAD request as it would have sent if
    the request had been a GET, except that the payload header fields
    (Section 3.3) MAY be omitted.  This method can be used for obtaining
    metadata about the selected representation without transferring the
    representation data and is often used for testing hypertext links for
    validity, accessibility, and recent modification.

    A payload within a HEAD request message has no defined semantics;
    sending a payload body on a HEAD request might cause some existing
    implementations to reject the request.

    The response to a HEAD request is cacheable; a cache MAY use it to
    satisfy subsequent HEAD requests unless otherwise indicated by the
    Cache-Control header field (Section 5.2 of [RFC7234]).  A HEAD
    response might also have an effect on previously cached responses to
    GET; see Section 4.3.5 of [RFC7234].

With this patch applied, either `GET` or `HEAD` requests work; the only
difference is that the body is empty in case of a `HEAD` request;

    curl -i --unix-socket /var/run/docker.sock http://localhost/_ping
    HTTP/1.1 200 OK
    Api-Version: 1.40
    Cache-Control: no-cache, no-store, must-revalidate
    Docker-Experimental: false
    Ostype: linux
    Pragma: no-cache
    Server: Docker/dev (linux)
    Date: Mon, 14 Jan 2019 12:35:16 GMT
    Content-Length: 2
    Content-Type: text/plain; charset=utf-8

    OK

    curl --head -i --unix-socket /var/run/docker.sock http://localhost/_ping
    HTTP/1.1 200 OK
    Api-Version: 1.40
    Cache-Control: no-cache, no-store, must-revalidate
    Content-Length: 0
    Content-Type: text/plain; charset=utf-8
    Docker-Experimental: false
    Ostype: linux
    Pragma: no-cache
    Server: Docker/dev (linux)
    Date: Mon, 14 Jan 2019 12:34:15 GMT

The client is also updated to use `HEAD` by default, but fallback to `GET`
if the daemon does not support this method.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-01-31 18:18:24 +01:00
Yong Tang
393838ca5e
Merge pull request #38569 from thaJeztah/forget_about_it
Add Cache-Control headers to disable caching /_ping endpoint
2019-01-31 23:59:11 +08:00
Sebastiaan van Stijn
22e4f12e5f
Merge pull request #38653 from sreis/38636-fix-nil-pointer-dereference
Fix nil pointer derefence on failure to connect to containerd
2019-01-31 13:38:31 +01:00
Sebastiaan van Stijn
468eb93e5a
Use 17.06 stable channel for CLI used in CI
Update to the latest patch release of 17.06.2. This
keeps the same API requirements.

This also enables pre-built binaries for armhf instead
of compiling from source.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-01-31 11:42:40 +01:00
Sebastiaan van Stijn
5a2f15b5d5
Merge pull request #38625 from thaJeztah/remove_docs_role
Remove "docs maintainers" section
2019-01-31 10:01:41 +01:00
Sebastiaan van Stijn
2a08f33166
Allow overriding repository and branch in validate scripts
When running CI in other repositories (e.g. Docker's downstream
docker/engine repository), or other branches, the validation
scripts were calculating the list of changes based on the wrong
information.

This lead to weird failures in CI in a branch where these values
were not updated ':-) (CI on a pull request failed because it detected
that new tests were added to the deprecated `integration-cli` test-suite,
but the pull request did not actually make changes in that area).

This patch allows overriding the target repository (and branch)
to compare to (without having to edit the scripts).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-01-31 01:23:42 +01:00
Sebastiaan van Stijn
44af96c0fc
Merge pull request #38634 from kolyshkin/cp-longname
pkg/archive:CopyTo(): fix for long dest filename
2019-01-31 00:16:11 +01:00
Simão Reis
3134161be3 Fix nil pointer derefence on failure to connect to containerd
Signed-off-by: Simão Reis <smnrsti@gmail.com>
2019-01-30 12:41:54 -01:00
Yong Tang
0d9dc3f4b5
Merge pull request #38604 from thaJeztah/remove_deprecated_newclient
Remove use of deprecated client.NewClient()
2019-01-28 13:06:06 -08:00
Vincent Demeester
8b10292153
Merge pull request #38644 from yongtang/fatalf
Fatalf -> Fatal
2019-01-28 20:19:38 +01:00
Sebastiaan van Stijn
5fba9b32b3
Merge pull request #38635 from JoeWrightss/patch-3
Fix some typos in ROADMAP.md
2019-01-28 18:17:39 +01:00
Sebastiaan van Stijn
3a4bb96ab7
Remove use of deprecated client.NewClient()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-01-28 17:08:54 +01:00
Sebastiaan van Stijn
5801c04345
Merge pull request #38380 from olljanat/capabilities-support
Add support for exact list of capabilities + capAdd / capDrop refactor
2019-01-28 16:36:03 +01:00
Yong Tang
0cde75e2ea
Merge pull request #38398 from RaviTezu/replace_gotty_with_aec
replace gotty with aec, since gotty hasn't been updated since very lo…
2019-01-26 16:45:15 -08:00
Yong Tang
f04e8bb075 Fatalf -> Fatal
This is a small fix to replace Fatalf -> Fatal

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-01-27 00:43:24 +00:00