Commit graph

38822 commits

Author SHA1 Message Date
Brian Goff
9488aa5c1b
Merge pull request #40909 from thaJeztah/bump_hcsshim
vendor: Microsoft/hcsshim v0.8.9
2020-05-07 11:49:37 -07:00
Brian Goff
99b5935fd8
Merge pull request #40917 from thaJeztah/bump_golang_sys
vendor: golang.org/x/sys 5c8b2ff67527cb88b770f693cebf3799036d8bc0
2020-05-07 11:47:26 -07:00
Brian Goff
3989f91075 logfile: Check if log is closed on close error during rotate
This prevents getting into a situation where a container log cannot make
progress because we tried to rotate a file, got an error, and now the
file is closed. The next time we try to write a log entry it will try
and rotate again but error that the file is already closed.

I wonder if there is more we can do to beef up this rotation logic.
Found this issue while investigating missing logs with errors in the
docker daemon logs like:

```
Failed to log message for json-file: error closing file: close <file>:
file already closed
```

I'm not sure why the original rotation failed since the data was no
longer available.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-05-07 11:37:06 -07:00
Brian Goff
232ebf7fa4
Merge pull request #40868 from thaJeztah/what_is_the_cause
Replace errors.Cause() with errors.Is() / errors.As()
2020-05-07 11:33:26 -07:00
Sebastiaan van Stijn
60a4f9afd4
Merge pull request #40893 from thaJeztah/bump_buildx_go_1.13
Dockerfile.buildx: bump to Go 1.13.10
2020-05-06 21:48:39 +02:00
Sebastiaan van Stijn
25fd814652
vendor: golang.org/x/sys 5c8b2ff67527cb88b770f693cebf3799036d8bc0
full diff: d5e6a3e2c0...5c8b2ff675

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-06 14:15:56 +02:00
Sebastiaan van Stijn
d84ed625a7
vendor: add version comment for containerd/typeurl, ttrpc
These dependencies have tagged releases, but we're currently
vendoring from master. Add a comment to give some "clue" what
version we're vendoring.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-06 14:09:15 +02:00
Sebastiaan van Stijn
fa8199b453
vendor: add comment that containerd/console is v1.0.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-06 14:09:10 +02:00
cristianrz
7608e42da5 Fix curl progress flags
Signed-off-by: Cristian Ariza <dev@cristianrz.com>
2020-05-06 12:39:28 +01:00
Sebastiaan van Stijn
08d3774304
vendor: Microsoft/hcsshim v0.8.9
full diff: https://github.com/Microsoft/hcsshim/compare/v0.8.7...v0.8.9

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-05 20:42:02 +02:00
Sebastiaan van Stijn
a8216806ce
vendor: opencontainers/selinux v1.5.1
full diff: https://github.com/opencontainers/selinux/compare/v1.3.3...v1.5.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-05 20:33:06 +02:00
Tibor Vass
1655290016
Merge pull request #40882 from thaJeztah/containerd_all_binaries
Make binary: install all containerd shims to bundles
2020-05-05 10:43:21 -07:00
Akihiro Suda
0a5cec2833
Merge pull request #40873 from thaJeztah/bump_logrus
vendor: sirupsen/logrus v1.6.0
2020-05-04 23:01:07 +09:00
Sebastiaan van Stijn
e1e544c8c6
vendor: sirupsen/logrus v1.6.0
full diff: https://github.com/sirupsen/logrus/compare/v1.4.2...v1.6.0

- Ability to DisableHTMLEscape when using the JSON formatter
- Support/fixes for go 1.14
- Many many bugfixes
- Add flag to disable quotes in TextFormatter

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-03 01:55:52 +02:00
Sebastiaan van Stijn
6168b875a4
Dockerfile.buildx: bump to Go 1.13.10
Looks like this Dockerfile was not yet updated; possibly because
`go mod` issues when building buildx 0.3.1.

Given that the upstream repository uses vendoring, I:

- removed the `go mod download` step
- added `-mod=vendor` to use vendoring mode

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-02 19:03:17 +02:00
Sebastiaan van Stijn
886c8385f5
containerd.installer: refactor
- add `set -e` to prevent linting warnings
- use `install` instead of `cp`
- use a subshell for the whole function, instead of starting one
  inside it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-02 18:44:43 +02:00
Sebastiaan van Stijn
3b261d7709
swagger: reformat, and wrap to ~80-chars
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-02 18:10:28 +02:00
Sebastiaan van Stijn
f85bea4ee7
Make binary: install all containerd shims to bundles
The containerd.installer was updated to also copy `containerd-shim-runc-v2`,
but `hack/make/binary-daemon` did not copy it to the bundles directory.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-02 17:29:22 +02:00
Sebastiaan van Stijn
a4400d328c
Makefile: remove empty targets, and slight refactor
The empty `binary:`, `dynbinary:`, and `cross:` targets at the top were
only useful to provide the description for `make help`.

This patch splits the actual `binary`, `dynbinary`, and `cross` targets
to separate lines, introducing some slight duplicated code, but making
it slightly easier to read (and removing the "empty" targets).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-05-01 16:48:07 +02:00
Brian Goff
fd784ce7c1
Merge pull request #40872 from thaJeztah/update_terminal_sequences
vendor konsorten/go-windows-terminal-sequences v1.0.3
2020-04-30 10:51:25 -07:00
Sebastiaan van Stijn
7e9b4c746d
Merge pull request #40875 from thaJeztah/sort_deps
vendor: sort imports to prevent vendoring race condition
2020-04-30 11:37:13 +02:00
Brian Goff
f6163d3f7a
Merge pull request #40673 from kolyshkin/scan
Simplify daemon.overlaySupportsSelinux(), fix use of bufio.Scanner.Err()
2020-04-29 17:18:37 -07:00
Sebastiaan van Stijn
996be00fb9
vendor: sort imports to prevent vendoring race condition
If both a "versioned" and "non-versioned" version of a dependency
exists in vendor.conf, the "longest" path should be cloned last,
otherwise the versioned dependency may be deleted when cloning its
non-versioned variant.

For example, with the following vendor.conf:

github.com/coreos/go-systemd/v22 v22.0.0
github.com/coreos/go-systemd v17

Running vndr would;

1. recursively delete "vendor/src/github.com/coreos/go-systemd/v22:
2. start cloning "github.com/coreos/go-systemd/v22"
3. recursively delete "vendor/src/github.com/coreos/go-systemd"
4. start cloning "github.com/coreos/go-systemd"

This would lead to a conflicting situation; step 3. will remove
the dependency that was previously cloned (or in the process
of being cloned).

This patch sorts the dependencies by import-path, cloning the
shortest import paths first, which should prevent the race condition.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-29 23:40:30 +02:00
Sebastiaan van Stijn
c3b3aedfa4
Merge pull request #40662 from AkihiroSuda/cgroup2-dockerinfo
cgroup2: implement `docker info`
2020-04-29 22:57:00 +02:00
Akihiro Suda
c4c10d5b81
Merge pull request #40874 from thaJeztah/update_experimental_syntax
Dockerfile: update syntax to 1.1.7-experimental
2020-04-30 01:03:14 +09:00
Brian Goff
65bfb29603
Merge pull request #40869 from AkihiroSuda/remove-outdated-annotation
cmd/dockerd: remove outdated "experimental" annotation
2020-04-29 08:02:23 -07:00
Sebastiaan van Stijn
84d7b57eb7
Dockerfile: update syntax to 1.1.7-experimental
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-29 14:30:23 +02:00
Sebastiaan van Stijn
8006a9d08c
vendor konsorten/go-windows-terminal-sequences v1.0.3
full diff: https://github.com/konsorten/go-windows-terminal-sequences/compare/v1.0.2...v1.0.3

Fixes a panic when using logrus on Go 1.14

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-29 11:27:11 +02:00
Akihiro Suda
90f19fc375 cmd/dockerd: remove outdated "experimental" annotation
Follow up to #40759

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-04-29 11:06:11 +09:00
Sebastiaan van Stijn
07d60bc257
Replace errors.Cause() with errors.Is() / errors.As()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-29 00:28:41 +02:00
Brian Goff
cc0dfb6e7b
Merge pull request #40866 from thaJeztah/bump_ipvs
vendor: update moby/ipvs v1.0.1
2020-04-28 14:44:31 -07:00
Sebastiaan van Stijn
b2af9e631c
vendor: update moby/ipvs v1.0.1
full diff: https://github.com/moby/ipvs/compare/v1.0.0...v1.0.1

- Fix compatibility issue on older kernels (< 3.18) where the address
  family attribute for destination servers do not exist
- Fix the stats attribute check when parsing destination addresses
- NetlinkSocketsTimeout should be a constant

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-28 16:59:06 +02:00
Tianon Gravi
45369c61a4
Merge pull request #40860 from AkihiroSuda/rootlesskit-094
bump up rootlesskit to v0.9.4
2020-04-27 15:49:14 -07:00
Akihiro Suda
f6ac841633 bump up rootlesskit to v0.9.4
Now `rootlesskit-docker-proxy` returns detailed error message on
exposing privileged ports: https://github.com/rootless-containers/rootlesskit/pull/136

Full changes: https://github.com/rootless-containers/rootlesskit/compare/v0.9.2...v0.9.4

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-04-27 13:02:30 +09:00
Brian Goff
4839b27a1f
Merge pull request #40808 from thaJeztah/update_libnetwork
vendor: update libnetwork 1a17fb36132631a95fe6bb055b91e24a516ad81d
2020-04-24 14:03:12 -07:00
Brian Goff
841c1f3388 Remove blurb about fixed in go1.11 in patch file
This blurb exists because we reused the same commit from an old patch,
and thus got the commit message with it. However the message is
confusing in this context.
It was suggested in review that we should remove the confusing message.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-04-24 11:23:14 -07:00
Tonis Tiigi
7260adfff9 vendor: add local copy of archive/tar
This version avoids doing name lookups on creating tarball that
should be avoided in to not hit loading glibc shared libraries.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit aa6a9891b0)
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-04-24 11:22:24 -07:00
Brian Goff
5702a89db6 Use strings.Index instead of strings.Split
Since we don't need the actual split values, instead of calling
`strings.Split`, which allocates new slices on each call, use
`strings.Index`.

This significantly reduces the allocations required when doing env value
replacements.
Additionally, pre-allocate the env var slice, even if we allocate a
little more than we need, it keeps us from having to do multiple
allocations while appending.

```
benchmark                                     old ns/op     new ns/op     delta
BenchmarkReplaceOrAppendEnvValues/0-8         486           313           -35.60%
BenchmarkReplaceOrAppendEnvValues/100-8       10553         1535          -85.45%
BenchmarkReplaceOrAppendEnvValues/1000-8      94275         12758         -86.47%
BenchmarkReplaceOrAppendEnvValues/10000-8     1161268       129269        -88.87%

benchmark                                     old allocs     new allocs     delta
BenchmarkReplaceOrAppendEnvValues/0-8         5              2              -60.00%
BenchmarkReplaceOrAppendEnvValues/100-8       110            0              -100.00%
BenchmarkReplaceOrAppendEnvValues/1000-8      1013           0              -100.00%
BenchmarkReplaceOrAppendEnvValues/10000-8     10022          0              -100.00%

benchmark                                     old bytes     new bytes     delta
BenchmarkReplaceOrAppendEnvValues/0-8         192           24            -87.50%
BenchmarkReplaceOrAppendEnvValues/100-8       7360          0             -100.00%
BenchmarkReplaceOrAppendEnvValues/1000-8      64832         0             -100.00%
BenchmarkReplaceOrAppendEnvValues/10000-8     1146049       0             -100.00%
```

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-04-24 11:10:13 -07:00
Brian Goff
f6a5ccf492
Merge pull request #40825 from thaJeztah/replace_term
Deprecate pkg/term and make it an alias for github.com/moby/term
2020-04-21 18:56:24 -07:00
Wilson Júnior
964731e1d3
Improve error feedback when plugin does not implement desired interface
Signed-off-by: Wilson Júnior <wilsonpjunior@gmail.com>
2020-04-21 18:06:24 -03:00
Akihiro Suda
4714ab5d6c cgroup2: use "systemd" cgroup driver by default when available
The "systemd" cgroup driver is always preferred over "cgroupfs" on
systemd-based hosts.

This commit does not affect cgroup v1 hosts.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-04-22 05:13:37 +09:00
Sebastiaan van Stijn
8312004f41
remove uses of deprecated pkg/term
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-21 16:29:27 +02:00
Sebastiaan van Stijn
41d4112e89
pkg/term: vendor moby/term and make pkg/term an alias
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-21 16:29:19 +02:00
Sebastiaan van Stijn
701b39f5f0
pkg/term: deprecate package in favor of moby/term
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-21 16:24:18 +02:00
Akihiro Suda
33ee7941d4 support --privileged --cgroupns=private on cgroup v1
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-04-21 23:11:32 +09:00
Sebastiaan van Stijn
c3808634e7
vendor: update libnetwork 1a17fb36132631a95fe6bb055b91e24a516ad81d
full diff: ef149a924d...1a17fb3613

- docker/libnetwork#2538 produce an error with invalid address pool
    - addresses docker/docker#40388 dockerd ignores the --default-address-pool option
- docker/libnetwork#2471 DOCKER-USER chain not created when IPTableEnable=false
- docker/libnetwork#2544 Fix NPE due to null value returned by ep.Iface()
    - carries docker/libnetwork#2239 Prevent NPE in addServiceInfoToCluster()
    - addresses docker/docker#37506 Error initializing docker.server while starting daemon by systemd

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-21 13:00:22 +02:00
Akihiro Suda
ba8129b28a
Merge pull request #39946 from cpuguy83/plugins_use_containerd_dist
Replace plugin distribution code w/ containerd
2020-04-21 10:03:16 +09:00
Sebastiaan van Stijn
f337a8d21d
Do not require "experimental" for metrics API
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-04-20 22:19:00 +02:00
Brian Goff
71626b7bdf
Merge pull request #40766 from thaJeztah/lcow_build_tag
LCOW: add "no_lcow" build tag to allow disabling lcow
2020-04-20 10:43:53 -07:00
Akihiro Suda
55e6d7d36f
Merge pull request #37867 from mountkin/fix-ov2
enhance storage-opt validation logic in overlay2 driver
2020-04-19 23:02:19 +09:00