Commit graph

39564 commits

Author SHA1 Message Date
Sebastiaan van Stijn
8e3186fc8f
update containerd binary to v1.5.2
full diff: https://github.com/containerd/containerd/compare/v1.5.1...v1.5.2

The second patch release for containerd 1.5 is a security release to update
runc for CVE-2021-30465

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-19 20:41:16 +02:00
Akihiro Suda
84bf80ac68
Merge pull request #42373 from thaJeztah/upstream_systemd_units 2021-05-19 22:06:42 +09:00
Sebastiaan van Stijn
c706213427
Merge pull request #42384 from thaJeztah/skip_dco
hack/validate: skip DCO in "default"
2021-05-19 12:06:54 +02:00
Akihiro Suda
0f124aba2e
Merge pull request #42383 from thaJeztah/containerd_1.5.1
update containerd binary to v1.5.1
2021-05-18 12:30:16 +09:00
Brian Goff
a2b0c723e0
Merge pull request #42369 from tao12345666333/bump-runc-rc94
Update runc binary to v1.0.0-rc94
2021-05-17 12:07:36 -07:00
Sebastiaan van Stijn
466e21b273
hack/validate: skip DCO in "default"
We perform a DCO check before we run all other tests, so we can skip it
as part of the validate step.

Leaving the line in for visibility, and in case we switch from Jenkins
to (e.g.) GitHub actions.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-17 15:10:50 +02:00
Sebastiaan van Stijn
22c0291333
update containerd binary to v1.5.1
full diff: https://github.com/containerd/containerd/compare/v1.5.0...v1.5.1

Notable Updates

- Update runc to rc94
- Fix registry mirror authorization logic in CRI plugin
- Fix regression in cri-cni-release to include cri tools

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-17 15:03:10 +02:00
Sebastiaan van Stijn
cc9ea7b0a4
Merge pull request #42371 from tonistiigi/schema1-cache-fix
builder-next: relax second cache key requirements for schema1
2021-05-17 14:57:29 +02:00
Tonis Tiigi
85167fc634 builder-next: relax second cache key requirements for schema1
Schema1 images can not have a config based cache key
before the layers are pulled. Avoid validation and reuse
manifest digest as a second key.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-05-12 22:44:07 -07:00
Akihiro Suda
b9071dcfed
Merge pull request #42374 from thaJeztah/disable_power_z
Jenkinsfile: skip ppc64le and s390x by default on pull requests
2021-05-13 07:29:06 +09:00
Brian Goff
93477e346e
Merge pull request #42370 from thaJeztah/fix_config_abspath
Swarm config: use absolute paths for mount destination strings
2021-05-12 11:29:50 -07:00
Sebastiaan van Stijn
82c7e906ea
Jenkinsfile: skip ppc64le and s390x by default on pull requests
This changes CI to skip these platforms by default. The ppc64le and s390x
machines are "pet machines", configuration may be outdated, and these
machines are known to be flaky.

Building and verifying packages for these platforms is being handed
over to the IBM team.

We can still run these platforms for specific pull requests by selecting
the checkboxes.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-12 12:38:41 +02:00
Sebastiaan van Stijn
35c1542ec7
contrib: remove unused "rpm" variant of systemd unit
This unit file was created when we packaged rpms without the
socket activation unit, but that's no longer the case.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-12 11:58:13 +02:00
Sebastiaan van Stijn
11dd2b79b9
Merge remote-tracking branch 'packaging_tmp/master' into upstream_systemd_units
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-12 11:57:30 +02:00
Akihiro Suda
2f0d6664a1 integration: remove KernelMemory tests
Starting with runc v1.0.0-rc94, runc no longer supports KernelMemory.

52390d6804

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-05-11 23:33:33 +08:00
Akihiro Suda
9303376242
Swarm config: use absolute paths for mount destination strings
Needed for runc >= 1.0.0-rc94.

See runc issue 2928.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-11 12:46:43 +02:00
Jintao Zhang
8c019e830a Update runc binary to v1.0.0-rc94
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2021-05-11 10:00:03 +08:00
Brian Goff
9f2b33f75c
Merge pull request #42149 from thaJeztah/containerd_binary_1.5
update containerd binary to v1.5.0
2021-05-07 10:09:49 -07:00
Brian Goff
e798323cd6
Merge pull request #42360 from thaJeztah/caps_deadcode
oci/caps: remove unused GetCapability() and ValidateCapabilities()
2021-05-06 11:36:57 -07:00
Brian Goff
44964f7081
Merge pull request #42329 from tonistiigi/grpc-typed-errors
grpc: make sure typed errors handler is installed
2021-05-06 11:35:54 -07:00
Brian Goff
5a2364d651
Merge pull request #42361 from thaJeztah/bump_systemd_dbus 2021-05-06 11:05:02 -07:00
Brian Goff
cbe2f7a661
Merge pull request #42284 from thaJeztah/update_containerd_console
vendor: github.com/containerd/console v1.0.2
2021-05-06 11:02:14 -07:00
Brian Goff
f71fa754a3
Merge pull request #42142 from thaJeztah/bump_mountinfo
vendor: github.com/moby/sys/mountinfo v0.4.1, github.com/moby/sys/mount v0.2.0+
2021-05-06 11:01:47 -07:00
Sebastiaan van Stijn
56eb82327b
Merge pull request #41620 from thaJeztah/tighten_perms
container: make hostconfig.json non-world-readable (0600)
2021-05-06 18:45:52 +02:00
Sebastiaan van Stijn
3987dc264b
vendor: github.com/godbus/dbus/v5 v5.0.4
full diff: https://github.com/godbus/dbus/compare/v5.0.3...v5.0.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-06 16:16:50 +02:00
Sebastiaan van Stijn
7a956d1342
vendor: github.com/coreos/go-systemd/v22 v22.3.1
full diff: https://github.com/coreos/go-systemd/compare/v22.1.0...v22.3.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-06 16:16:47 +02:00
Sebastiaan van Stijn
a40197328e
oci/caps: remove unused GetCapability() and ValidateCapabilities()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-06 15:59:26 +02:00
Akihiro Suda
e42a32e4f0
Merge pull request #42318 from thaJeztah/add_all_proxy
builder/dockerfile: add "ALL_PROXY" to list of default build args
2021-05-06 22:36:04 +09:00
Sebastiaan van Stijn
8844c48523
vendor: github.com/moby/sys/mountinfo v0.4.1, github.com/moby/sys/mount v0.2.0+
full diff: https://github.com/moby/sys/compare/symlink/v0.1.0...mountinfo/v0.4.1

github.com/moby/sys/mountinfo v0.4.1
----------------------------------------------

- Fix PrefixFilter() being too greedy
- TestMountedBy*: add missing pre-checks
- Documentation improvements

github.com/moby/sys/mount v0.2.0
----------------------------------------------

Breaking changes:

- Remove stub-implementations for Windows for `Mount()`, `Unmount()`,
  `RecursiveUnmount()`, `MergeTmpfsOptions()`

Fixes and improvements:

- `go.mod`: update github.com/moby/sys/mountinfo to v0.4.0
- use `MNT_*` flags from golang.org/x/sys/unix on freebsd
- add support for OpenBSD in addition to FreeBSD
- fix package overview documentation not showing
- `RecursiveUnmount()`: minor improvements

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-04 17:42:48 +02:00
Sebastiaan van Stijn
892d3d57be
Merge pull request #42348 from thaJeztah/crosbymichael_alumni
Move Michael Crosby to alumni
2021-05-04 16:21:19 +02:00
Sebastiaan van Stijn
9b2f55bc1c
update containerd binary to v1.5.0
Welcome to the v1.5.0 release of containerd!

The sixth major release of containerd includes many stability improvements
and code organization changes to make contribution easier and make future
features cleaner to develop. This includes bringing CRI development into the
main containerd repository and switching to Go modules. This release also
brings support for the Node Resource Interface (NRI).

Highlights
--------------------------------------------------------------------------------

*Project Organization*

- Merge containerd/cri codebase into containerd/containerd
- Move to Go modules
- Remove selinux build tag
- Add json log format output option for daemon log

*Snapshots*

- Add configurable overlayfs path
- Separate overlay implementation from plugin
- Native snapshotter configuration and plugin separation
- Devmapper snapshotter configuration and plugin separation
- AUFS snapshotter configuration and plugin separation
- ZFS snapshotter configuration and plugin separation
- Pass custom snapshot labels when creating snapshot
- Add platform check for snapshotter support when unpacking
- Handle loopback mounts
- Support userxattr mount option for overlay in user namespace
- ZFS snapshotter implementation of usage

*Distribution*

- Improve registry response errors
- Improve image pull performance over HTTP 1.1
- Registry configuration package
- Add support for layers compressed with zstd
- Allow arm64 to fallback to arm (v8, v7, v6, v5)

*Runtime*

- Add annotations to containerd task update API
- Add logging binary support when terminal is true
- Runtime support on FreeBSD

*Windows*

- Implement windowsDiff.Compare to allow outputting OCI images
- Optimize WCOW snapshotter to commit writable layers as read-only parent layers
- Optimize LCOW snapshotter use of scratch layers

*CRI*

- Add NRI injection points cri#1552
- Add support for registry host directory configuration
- Update privileged containers to use current capabilities instead of known capabilities
- Add pod annotations to CNI call
- Enable ocicrypt by default
- Support PID NamespaceMode_TARGET

Impactful Client Updates
--------------------------------------------------------------------------------

This release has changes which may affect projects which import containerd.

*Switch to Go modules*

containerd and all containerd sub-repositories are now using Go modules. This
should help make importing easier for handling transitive dependencies. As of
this release, containerd still does not guarantee client library compatibility
for 1.x versions, although best effort is made to minimize impact from changes
to exported Go packages.

*CRI plugin moved to main repository*

With the CRI plugin moving into the main repository, imports under github.com/containerd/cri/
can now be found github.com/containerd/containerd/pkg/cri/.
There are no changes required for end users of CRI.

*Library changes*

oci

The WithAllCapabilities has been removed and replaced with WithAllCurrentCapabilities
and WithAllKnownCapabilities. WithAllKnownCapabilities has similar
functionality to the previous WithAllCapabilities with added support for newer
capabilities. WithAllCurrentCapabilities can be used to give privileged
containers the same set of permissions as the calling process, preventing errors
when privileged containers attempt to get more permissions than given to the
caller.

*Configuration changes*

New registry.config_path for CRI plugin

registry.config_path specifies a directory to look for registry hosts
configuration. When resolving an image name during pull operations, the CRI
plugin will look in the <registry.config_path>/<image hostname>/ directory
for host configuration. An optional hosts.toml file in that directory may be
used to configure which hosts will be used for the pull operation as well
host-specific configurations. Updates under that directory do not require
restarting the containerd daemon.

Enable registry.config_path in the containerd configuration file.

    [plugins."io.containerd.grpc.v1.cri".registry]
       config_path = "/etc/containerd/certs.d"
    Configure registry hosts, such as /etc/containerd/certs.d/docker.io/hosts.toml
    for any image under the docker.io namespace (any image on Docker Hub).

    server = "https://registry-1.docker.io"

    [host."https://public-mirror.example.com"]
      capabilities = ["pull"]
    [host."https://docker-mirror.internal"]
      capabilities = ["pull", "resolve"]
      ca = "docker-mirror.crt"

If no hosts.toml configuration exists in the host directory, it will fallback
to check certificate files based on Docker's certificate file
pattern (".crt" files for CA certificates and ".cert"/".key" files for client
certificates).

*Deprecation of registry.mirrors and registry.configs in CRI plugin*

Mirroring and TLS can now be configured using the new registry.config_path
option. Existing configurations may be migrated to new host directory
configuration. These fields are only deprecated with no planned removal,
however, these configurations cannot be used while registry.config_path is
defined.

*Version 1 schema is deprecated*

Version 2 of the containerd configuration toml is recommended format and the
default. Starting this version, a deprecation warning will be logged when
version 1 is used.

To check version, see the version value in the containerd toml configuration.

    version=2

FreeBSD Runtime Support (Experimental)
--------------------------------------------------------------------------------

This release includes changes that allow containerd to run on FreeBSD with a
compatible runtime, such as runj. This
support should be considered experimental and currently there are no official
binary releases for FreeBSD. The runtimes used by containerd are maintained
separately and have their own stability guarantees. The containerd project
strives to be compatible with any runtime which aims to implement containerd's
shim API and OCI runtime specification.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-04 15:45:01 +02:00
Tianon Gravi
5a82cee6d4
Merge pull request #42077 from WhyNotHugo/patch-1
rootless: Set service type to `notify`
2021-05-03 10:36:03 -07:00
Tianon Gravi
27a066ce53
Merge pull request #42343 from zzeebbii/fix-test-cleanup
Added missing test cleanup for temporary directory
2021-05-03 10:33:12 -07:00
Muhammad Zohaib Aslam
56c88c94dd Added missing test cleanup for temporary directory
A temporary directory was created but not removed at the end of the test.
The missing remove directory call is added now.

Signed-off-by: Muhammad Zohaib Aslam <zohaibse011@gmail.com>
2021-05-01 15:39:50 +03:00
Sebastiaan van Stijn
59751bb233
Merge pull request #42331 from AkihiroSuda/dind-fix-cgroup2-evac
hack/dind: fix cgroup v2 evacuation with `docker run --init`
2021-04-30 10:08:36 +02:00
Sebastiaan van Stijn
dd3275c5f9
Merge pull request #42182 from thaJeztah/fix_exec_start_err_handling
Fix error-handling in `daemon.ContainerExecStart()` and `daemon.getExecConfig()`
2021-04-29 21:33:19 +02:00
Brian Goff
ac99c869e5
Merge pull request #42181 from thaJeztah/fix_exec_apparmor_test
Fix panic in TestExecSetPlatformOpt, TestExecSetPlatformOptPrivileged
2021-04-29 12:25:27 -07:00
Akihiro Suda
bd61fdc65d
Merge pull request #42327 from awmirantis/bump-winio-4.19
Update Microsoft/go-winio to version 0.4.19
2021-04-30 00:00:43 +09:00
Akihiro Suda
42b1175eda
hack/dind: fix cgroup v2 evacuation with docker run --init
Evacuate all the processes in `/sys/fs/cgroup/cgroup.procs`, not just PID 1.

Before:
```console
$ docker run --rm --privileged --init $(docker build -q .) cat /sys/fs/cgroup/cgroup.subtree_control
sed: couldn't flush stdout: Device or resource busy
```

After:
```console
$ docker run --rm --privileged --init $(docker build -q .) cat /sys/fs/cgroup/cgroup.subtree_control
cpuset cpu io memory hugetlb pids rdma
```

Fix docker-library/docker issue 308

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-04-28 13:30:10 +09:00
Tonis Tiigi
7c731e02a9 grpc: make sure typed errors handler is installed
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-04-26 22:38:59 -07:00
John Howard
bac9062496
Merge pull request #42326 from thaJeztah/jhoward_alumni
Add John Howard to our alumni
2021-04-26 19:22:46 +01:00
Adam Williams
42a485f7fa Update Microsoft/go-winio to version 0.4.19
Signed-off-by: Adam Williams <awilliams@mirantis.com>
2021-04-26 10:02:58 -07:00
Sebastiaan van Stijn
46b27a9f9a
Merge pull request #42309 from lowenna/jhowardmsft-lowenna-maintainer
Remove myself (lowenna aka jhowardmsft) from maintainers
2021-04-26 17:51:26 +02:00
Sebastiaan van Stijn
b6a05b7371
Add John Howard to our alumni
Thank you John!!

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-26 14:57:37 +02:00
Sebastiaan van Stijn
c9a62831ba
Move Michael Crosby to alumni
Thank you Michael!!

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-26 14:41:51 +02:00
Sebastiaan van Stijn
5a5f8564ba
builder/dockerfile: add "ALL_PROXY" to list of default build args
Relates to a82fff6377/docs/packages.md (proxies)

> (..) the first four of these are the standard built-in build-arg options
> available for `docker build`
> (..) The last, `all_proxy`, is a standard var used for socks proxying. Since
> it is not built into `docker build`, if you want to use it, you will need to
> add the following line to the dockerfile:
>
> ARG all_proxy

Given the we support all other commonly known proxy env-vars by default, it makes
sense to add this one as well.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-24 18:25:16 +02:00
Tianon Gravi
e0170da0dc
Merge pull request #42315 from AkihiroSuda/whichless
dockerd-rootless.sh: use `command -v` instead of `which`
2021-04-23 11:32:57 -07:00
Akihiro Suda
e928692c69
dockerd-rootless.sh: use command -v instead of which
`which` binary is often missing

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-04-23 14:47:18 +09:00
Sebastiaan van Stijn
6d1eceb509
Fix panic in TestExecSetPlatformOpt, TestExecSetPlatformOptPrivileged
These tests would panic;

- in WithRLimits(), because HostConfig was not set;
  470ae8422f/daemon/oci_linux.go (L46-L47)
- in daemon.mergeUlimits(), because daemon.configStore was not set;
  470ae8422f/daemon/oci_linux.go (L1069)

This panic was not discovered because the current version of runc/libcontainer that we vendor
would not always return false for `apparmor.IsEnabled()` when running docker-in-docker or if
`apparmor_parser` is not found. Starting with v1.0.0-rc93 of libcontainer, this is no longer
the case (changed in bfb4ea1b1b)

This patch;

- changes the tests to initialize Daemon.configStore and Container.HostConfig
- Combines TestExecSetPlatformOpt and TestExecSetPlatformOptPrivileged into a new test
  (TestExecSetPlatformOptAppArmor)
- Runs the test both if AppArmor is enabled and if not (in which case it tests
  that the container's AppArmor profile is left empty).
- Adds a FIXME comment for a possible bug in execSetPlatformOpts, which currently
  prefers custom profiles over "privileged".

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-04-23 00:39:39 +02:00
Brian Goff
369d0dc092
Merge pull request #42254 from thaJeztah/bump_containerd_protobuf 2021-04-22 14:16:04 -07:00