Commit graph

39228 commits

Author SHA1 Message Date
Sebastiaan van Stijn
80c3199c18
vendor: github.com/spf13/cobra v1.1.1
full diff: https://github.com/spf13/cobra/compare/v1.0.0...v1.1.1

Notable changes:

- Extend Go completions and revamp zsh comp
- Add completion for help command
- Complete subcommands when TraverseChildren is set
- Fix stderr printing functions
- fix: fish output redirection
- fix manpage building with new go-md2man

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-20 21:25:10 +02:00
Brian Goff
73dc6a680c
Merge pull request #41440 from tianon/rm-mkimage.sh
Remove "mkimage.sh" and associated scripts
2020-10-20 12:19:47 -07:00
Brian Goff
6f78b438b8
Merge pull request #41505 from cpuguy83/frozen_targetach
Add TARGETARCH var to frozen images stage
2020-10-19 10:52:45 -07:00
Tibor Vass
33be8d4b40
Merge pull request #41563 from thaJeztah/hold_that_cap
Temporarily disable CAP_PERFMON, CAP_BPF, and CAP_CHECKPOINT_RESTORE
2020-10-19 09:46:57 -07:00
Sebastiaan van Stijn
b94f565bd6
Merge pull request #41555 from thaJeztah/bump_vndr
Bump vndr v0.1.2
2020-10-19 18:09:38 +02:00
Brian Goff
e180525bb4
Merge pull request #41528 from thaJeztah/remove_default_oom_score_adj 2020-10-16 13:43:44 -07:00
Sebastiaan van Stijn
561b8014c0
testutil: set -500 OOM score for test daemons
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-16 18:49:55 +02:00
Sebastiaan van Stijn
2b8e68ef06
dockerd: remove default -500 oom-score-adjust
dockerd currently sets the oom-score-adjust itself. This functionality
was added when we did not yet run dockerd as a systemd service.

Now that we do, it's better to instead have systemd handle this.

Keeping the option itself for situations where dockerd is started
manually or without using systemd.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-16 18:49:52 +02:00
Sebastiaan van Stijn
a6129c57e6
Bump vndr v0.1.2
full diff: https://github.com/lk4d4/vndr/compare/v0.1.1...v0.1.2

- cleanVCS: prevent panic
- Consider '.syso' as a Go file for vendoring

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-16 17:53:56 +02:00
Sebastiaan van Stijn
a38b96b8cd
Temporarily disable CAP_PERFMON, CAP_BPF, and CAP_CHECKPOINT_RESTORE
This prevents docker from setting CAP_PERFMON, CAP_BPF, and CAP_CHECKPOINT_RESTORE
capabilities on privileged (or CAP_ALL) containers on Kernel 5.8 and up.

While these kernels support these capabilities, the current release of
runc ships with an older version of /gocapability/capability, and does
not know about them, causing an error to be produced.

We can remove this restriction once 6dfbe9b807
is included in a runc release and once we stop supporting containerd 1.3.x
(which ships with runc v1.0.0-rc92).

Thanks to Anca Iordache for reporting.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-16 17:52:27 +02:00
Sebastiaan van Stijn
bebbec4e89
Merge pull request #41560 from thaJeztah/fix_golang_ci_lint_version
Dockerfile: fix golang-ci-lint installer
2020-10-16 17:52:05 +02:00
Sebastiaan van Stijn
5338478546
Dockerfile: fix golang-ci-lint installer
We were using "go get", whith would try to fetch some dependencies
that are not in the version we're installing,

    go get -d github.com/golangci/golangci-lint/cmd/golangci-lint

Causing the build to fail;

    package 4d63.com/gochecknoglobals/checknoglobals: unrecognized import path "4d63.com/gochecknoglobals/checknoglobals" (parse https://4d63.com/gochecknoglobals/checknoglobals?go-get=1: no go-import meta tags ())

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-16 13:39:22 +02:00
Tibor Vass
cf867587b9
Merge pull request #41527 from thaJeztah/no_oom_score_adj
daemon: don't adjust oom-score if score is 0
2020-10-15 15:00:18 -07:00
Tianon Gravi
a637034ee4
Merge pull request #41156 from AkihiroSuda/rootless-new-shim-socket-path
dockerd-rootless.sh: support new containerd shim socket path convention
2020-10-15 12:37:14 -07:00
Sebastiaan van Stijn
b26ce6756f
Merge pull request #41546 from cpuguy83/fix_checkpoint_runtimev2
"Fix" checkpoint on v2 runtime
2020-10-15 20:59:36 +02:00
Brian Goff
f14aea63c9 "Fix" checkpoint on v2 runtime
Checkpoint/Restore is horribly broken all around.
But on the, now default, v2 runtime it's even more broken.

This at least makes checkpoint equally broken on both runtimes.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-10-12 22:35:37 +00:00
Akihiro Suda
9c15e82f19
Merge pull request #41537 from tianon/apparmor-tilde
Also trim "~..." from AppArmor versions
2020-10-10 01:03:26 +09:00
Tianon Gravi
654cad4d9d Also trim "~..." from AppArmor versions
Signed-off-by: Tianon Gravi <admwiggin@gmail.com>
2020-10-08 17:03:51 -07:00
Brian Goff
f6f294bd83 testing: Init plugin config when for tests
This fixes a panic when running this test for me locally.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-10-07 22:29:49 +00:00
Sebastiaan van Stijn
d6b1f2ae7d
Merge pull request #41530 from thaJeztah/bump_flock
vendor: github.com/gofrs/flock v0.7.3
2020-10-07 23:51:34 +02:00
Tianon Gravi
e246a85e68
Merge pull request #41518 from AkihiroSuda/fix-41517
pkg/aaparser: support parsing version like "3.0.0-beta1"
2020-10-07 13:00:07 -07:00
Sebastiaan van Stijn
ffd0861b8b
Merge pull request #41330 from BtbN/vol-pquota
Add size option to volumes on linux/unix via xfs pquota
2020-10-07 17:50:39 +02:00
Sebastiaan van Stijn
4539e7f0eb
seccomp: implement marshal/unmarshall for MinVersion
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-07 17:48:25 +02:00
Sebastiaan van Stijn
266bf2b2f5
Merge pull request #41493 from thaJeztah/seccomp_kernel_parsing
seccomp: remove dependency on pkg/parsers/kernel
2020-10-07 17:47:03 +02:00
Sebastiaan van Stijn
6b538ffbca
vendor: github.com/gofrs/flock v0.7.3
full diff: https://github.com/gofrs/flock/compare/v0.7.1...v0.7.3

Relevant changes:

- fix: close/Unlock won't close the file descriptor if not locked
- fix license text, update year

Note that there's also a v0.8.0 release; that release only adds aix support,
which is currently of no interest to us, so skipping that version for now.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-06 12:12:33 +02:00
Akihiro Suda
1b34a49fef
Merge pull request #41523 from pfandzelter/patch-2
Update documentation to reflect deprecation of "NewEnvClient"
2020-10-06 06:21:01 +09:00
Sebastiaan van Stijn
cf7a5be0f2
daemon: don't adjust oom-score if score is 0
This patch makes two changes if --oom-score-adj is set to 0

- do not adjust the oom-score-adjust cgroup for dockerd
- do not set the hard-coded -999 score for containerd if
  containerd is running as child process

Before this change:

oom-score-adj | dockerd       | containerd as child-process
--------------|---------------|----------------------------
-             | -500          | -500 (same as dockerd)
-100          | -100          | -100 (same as dockerd)
 0            |  0            | -999 (hard-coded default)

With this change:

oom-score-adj | dockerd       | containerd as child-process
--------------|---------------|----------------------------
-             | -500          | -500 (same as dockerd)
-100          | -100          | -100 (same as dockerd)
0             | not adjusted  | not adjusted

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-05 19:52:02 +02:00
Timo Rothenpieler
8c31e4536a volume/local: add tests for size quota
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2020-10-05 13:28:25 +00:00
Timo Rothenpieler
2e05db981b quota: move test helper functions to extra file
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2020-10-05 13:28:25 +00:00
Timo Rothenpieler
6d593fe6cc volume/local: decouple presence of options from mounting
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2020-10-05 13:28:25 +00:00
Timo Rothenpieler
c677e4cc87 quota: move quota package out of graphdriver
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2020-10-05 13:28:25 +00:00
Timo Rothenpieler
6f1553625d projectquota: build types and unsupported stubs everywhere
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2020-10-05 13:28:25 +00:00
Timo Rothenpieler
31ed121cb8 projectquota: sync next projectID across Control instances
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2020-10-05 13:28:25 +00:00
Tobias Pfandzelter
963e5afc04 Update documentation to reflect deprecation of "NewEnvClient"
As `NewEnvClient` is deprecated in favor of `NewClientWithOpts`, the main package documentation should reflect this. This is also the text that appears on godoc.org so it's quite important that it is correct (for newbies like me)

Signed-off-by: Tobias Pfandzelter <pfandzelter@campus.tu-berlin.de>
2020-10-03 15:12:30 +02:00
Sebastiaan van Stijn
a692823413
seccomp: add test for unmarshal default profile
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-02 18:15:46 +02:00
Sebastiaan van Stijn
97535c6c2b
seccomp: remove dependency on pkg/parsers/kernel
This removes the dependency on the `pkg/parsers/kernel` package, because secomp
only needs to consider Linux (and no parsing is needed for Windows or Darwin kernel
versions).

This patch implements the minimum requirements for this implementation:

- only `kernel` and `major` versions are considered
- `minor` version, `flavor`, and `-rcXX` suffixes are ignored

So, for example:

- `3.4.54.longterm-1` => `kernel: 3`, `major: 4`
- `3.8.0-19-generic` => `kernel: 3`, `major: 8`
- `3.10.0-862.2.3.el7.x86_64` => `kernel: 3`, `major: 10`

Some systems also omit the `minor` and/or have odd-formatted versions. In context
of generating seccomp profiles, both versions below are considered equal;

- `3.12.25-gentoo` => `kernel: 3`, `major: 12`
- `3.12-1-amd64` => `kernel: 3`, `major: 12`

Note that `-rcX` suffixes are also not considered, and thus (e.g.) kernel `5.9-rc1`,
`5.9-rc6` and `5.9` are all considered equal.

The motivation for ignoring "minor" versions and "flavors" is that;

- The upstream kernel only does "kernel.major" releases
- While release-candidates exists for kernel (e.g. 5.9-rc5), we don't expect users
  to write profiles that target a specific release-candidate, and therefore consider
  (e.g.) kernel `5.9-rc1`, `5.9-rc6` and `5.9` to be equal.
- Generally, a seccomp-profile should either be portable, or written for a specific
  infrastructure (in which case the writer of the profile would know if the kernel-flavors
  used does/does not support certain things.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-02 18:15:37 +02:00
Tibor Vass
1a5b7f50bc
Merge pull request #39838 from thaJeztah/bump_gcplogs
Bump gcplogs and dependencies to v0.44.3
2020-10-02 06:30:48 -07:00
Akihiro Suda
ee079e4692
pkg/aaparser: support parsing version like "3.0.0-beta1"
Fix #41517

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-10-02 17:33:52 +09:00
Sebastiaan van Stijn
a3256d2dd8 bump google.golang.org/api v0.8.0
full diff: de943baf05...v0.8.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-01 23:47:15 +00:00
Sebastiaan van Stijn
2971204e43 bump go.opencensus.io v0.22.3
full diff: https://github.com/census-instrumentation/opencensus-go/compare/v0.11.0...v0.22.3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-10-01 23:47:15 +00:00
Sebastiaan van Stijn
bbde240ce0 bump cloud.google.com/go v-0.44.3
bump cloud.google.com/go v0.44.3:

full diff: https://github.com/googleapis/google-cloud-go/compare/v0.23.0...v0.44.3

bump googleapis/gax-go v2.0.5

full diff: https://github.com/googleapis/gax-go/compare/v2.0.0...v2.0.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-10-01 23:47:11 +00:00
Brian Goff
816fbcd306
Merge pull request #41072 from AkihiroSuda/fix-41071
cgroup2: unshare cgroupns by default regardless to API version
2020-10-01 11:56:00 -07:00
Brian Goff
2bf7dc279a
Merge pull request #41509 from thaJeztah/update_logrus
vendor: sirupsen/logrus v1.7.0
2020-10-01 11:07:39 -07:00
Sebastiaan van Stijn
7ed56de151
Merge pull request #41513 from phaas/patch-1
Fix gcplogs memory/connection leak
2020-10-01 08:50:36 +02:00
Patrick Haas
ef553e14a4 Fix gcplogs memory/connection leak
The cloud logging client should be closed when the log driver is closed. Otherwise dockerd will keep a gRPC connection to the logging endpoint open indefinitely.

This results in a slow leak of tcp sockets (1) and memory (~200Kb) any time that a container using `--log-driver=gcplogs` is terminates.

Signed-off-by: Patrick Haas <patrickhaas@google.com>
2020-09-30 17:45:19 -07:00
Sebastiaan van Stijn
c9bbf37f85
vendor: sirupsen/logrus v1.7.0
full diff: https://github.com/sirupsen/logrus/compare/v1.6.0...v1.7.0

removes dependency on github.com/konsorten/go-windows-terminal-sequences

Features:
   * a new buffer pool management API has been added
   * a set of `<LogLevel>Fn()` functions have been added

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-30 13:38:38 +02:00
Brian Goff
2036b277a5 Add TARGETARCH var to frozen images stage
This allows the arch that buildkit passes through to be used for the
frozen image downloader.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-09-29 15:42:03 -07:00
Sebastiaan van Stijn
46cdcd206c
Merge pull request #41500 from thaJeztah/seccomp_separate
seccomp: remove dependency on oci package
2020-09-29 22:10:57 +02:00
Sebastiaan van Stijn
c9c7756301
oci: add tests for loading seccomp profiles
Verify that we're able to test seccomp profiles with our
default Spec.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-29 20:15:43 +02:00
Sebastiaan van Stijn
56e7bc4b78
seccomp: remove dependency on oci package
rewrite the tests to use a minimal runtime-spec Spec instead

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-29 19:39:15 +02:00