Commit graph

36339 commits

Author SHA1 Message Date
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
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
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
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
Yong Tang
6351619e2c
Merge pull request #38606 from thaJeztah/move_client_opts
Move client opts, and deprecated client constructors to separate files
2019-01-26 15:41:46 -08:00
zhoulin xie
974294600f Fix some typos in ROADMAP.md
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>
2019-01-25 14:27:13 +08:00
Kir Kolyshkin
f55a4176fe pkg/archive:CopyTo(): fix for long dest filename
As reported in docker/for-linux/issues/484, since Docker 18.06
docker cp with a destination file name fails with the following error:

> archive/tar: cannot encode header: Format specifies USTAR; and USTAR cannot encode Name="a_very_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_long_filename_that_is_101_characters"

The problem is caused by changes in Go 1.10 archive/tar, which
mis-guesses the tar stream format as USTAR (rather than PAX),
which, in turn, leads to inability to specify file names
longer than 100 characters.

This tar stream is sent by TarWithOptions() (which, since we switched to
Go 1.10, explicitly sets format=PAX for every file, see FileInfoHeader(),
and before Go 1.10 it was PAX by default). Unfortunately, the receiving
side, RebaseArchiveEntries(), which calls tar.Next(), mistakenly guesses
header format as USTAR, which leads to the above error.

The fix is easy: set the format to PAX in RebaseArchiveEntries()
where we read the tar stream and change the file name.

A unit test is added to prevent future regressions.

NOTE this code is not used by dockerd, but rather but docker cli
(also possibly other clients), so this needs to be re-vendored
to cli in order to take effect.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2019-01-24 18:10:52 -08:00
Sebastiaan van Stijn
27c7178933
Merge pull request #38629 from thaJeztah/bump_golang_1.11.5
Bump Golang 1.11.5 (CVE-2019-6486)
2019-01-24 21:47:17 +01:00
Sebastiaan van Stijn
20b34412dc
Bump Golang 1.11.5 (CVE-2019-6486)
See the milestone for details;
https://github.com/golang/go/issues?q=milestone%3AGo1.11.5+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-01-24 00:49:27 +01:00
Vincent Demeester
de86ba27fb
Merge pull request #38598 from yongtang/serviceRunningTasksCount
Move serviceRunningTasksCount to integration/internal/swarm
2019-01-23 17:41:40 +01:00
Yong Tang
89ce20fa25
Merge pull request #38603 from thaJeztah/remove_deprecated_daemonhost
integration-cli: remove deprecated daemonHost() utility
2019-01-23 08:38:30 -08:00
Sebastiaan van Stijn
2cb25409c2
Remove "docs maintainers" section
The docs maintainers role was in the maintainers file
from way back when the documentation was still in this
repository.

Now that the documentation has moved to its own repository,
we should no longer need this section.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-01-23 16:58:58 +01:00
Sebastiaan van Stijn
528ca931e6
Merge pull request #38621 from fntlnz/fix/reviewing-merge-label
REVIEWING.md: Fix status 4 merge label
2019-01-23 09:56:38 +01:00
Lorenzo Fontana
c133553154
REVIEWING.md: Fix status 4 merge label
Signed-off-by: Lorenzo Fontana <lo@linux.com>
2019-01-23 02:23:30 +01:00
Lorenzo Fontana
0ecba1523d
Merge pull request #38422 from debayande/even-more-names-redux
Makes a few modifications to the name generator.
2019-01-23 02:09:52 +01:00
Olli Janatuinen
80d7bfd54d Capabilities refactor
- Add support for exact list of capabilities, support only OCI model
- Support OCI model on CapAdd and CapDrop but remain backward compatibility
- Create variable locally instead of declaring it at the top
- Use const for magic "ALL" value
- Rename `cap` variable as it overlaps with `cap()` built-in
- Normalize and validate capabilities before use
- Move validation for conflicting options to validateHostConfig()
- TweakCapabilities: simplify logic to calculate capabilities

Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-01-22 21:50:41 +02:00
Krystian Wojcicki
f821f002e5 Adding builder version
Signed-off-by: Krystian Wojcicki <kwojcicki@sympatico.ca>
2019-01-21 19:02:16 -05:00
Yong Tang
8d7889e510
Merge pull request #38605 from thaJeztah/explicit_nilerror_check
Use assert.NilError() instead of assert.Assert()
2019-01-21 12:41:53 -08:00
Sebastiaan van Stijn
69d9ff3455
Move deprecated client constructors to a separate file
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-01-21 15:27:52 +01:00