Commit Graph

8778 Commits

Author SHA1 Message Date
Maksym Pavlenko
27402021ac
Merge pull request #4501 from crosbymichael/runtimeroot
Add --runtime-root to ctr
2020-08-25 13:46:36 -07:00
Derek McGowan
a7b2304f69
Merge pull request #4445 from tonistiigi/auth-refactor
docker: split private token helper functions to reusable pkg
2020-08-25 12:25:23 -07:00
Michael Crosby
bacf07f4a5
Merge pull request #4308 from aojea/bumpcni
bump cni dependencies
2020-08-25 11:54:53 -04:00
Michael Crosby
f9d231f660
Merge pull request #4493 from thaJeztah/seccomp_uring
seccomp: allow io-uring related system calls
2020-08-25 11:39:45 -04:00
Michael Crosby
7e84abe99c
Merge pull request #4468 from prashantbhutani90/master
Report correct stats for windows containers
2020-08-25 11:37:28 -04:00
Michael Crosby
396b863138
Merge pull request #4491 from thaJeztah/seccomp_syslog
seccomp: move the syslog syscall to be gated by CAP_SYS_ADMIN or CAP_SYSLOG
2020-08-25 11:35:28 -04:00
Michael Crosby
40ce36fd27
Merge pull request #4492 from thaJeztah/seccomp_updates
seccomp: sync some changes with Docker/Moby's profile
2020-08-25 11:34:34 -04:00
Phil Estes
0586589652
Merge pull request #4486 from darfux/monitor_v2_tasks_as_well
tasks: Monitor v2 tasks in initFunc as well
2020-08-25 10:19:25 -04:00
Phil Estes
8fe6cf567d
Merge pull request #4497 from dmcgowan/update-cri-nri
Update CRI
2020-08-24 19:23:35 -04:00
Derek McGowan
ac95f27b83
Update CRI
Add CRI with NRI support

Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-08-24 14:26:08 -07:00
Derek McGowan
56a89cda34
Merge pull request #1552 from crosbymichael/nri
Add experimental NRI injection points
2020-08-24 13:58:11 -07:00
Mike Brown
d09e26b0a0
Merge pull request #1556 from aojea/cni80
bump cni dependencies
2020-08-24 13:12:24 -05:00
Akihiro Suda
5c73fe06a8
Merge pull request #4472 from fuweid/ignore-error
runtime: ignore ErrNotExist when remove rootfs
2020-08-24 20:08:52 +09:00
Sebastiaan van Stijn
325bac7c71
seccomp: allow io-uring related system calls
Adds the io-uring related system call introduced in kernel 5.1 to the
seccomp whitelist. With older kernels or older versions of libseccomp,
this configure will be omitted.

Note that io_uring will grow support for more syscalls in the future
so we should keep an eye on this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-24 12:59:53 +02:00
Sebastiaan van Stijn
0a5ee7e6f3
seccomp: allow clock_settime when CAP_SYS_TIME is added
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-24 12:43:21 +02:00
Sebastiaan van Stijn
5cdb6e81d2
seccomp: allow quotactl with CAP_SYS_ADMIN
This allows the quotactl syscall in the default seccomp profile, gated by
CAP_SYS_ADMIN.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-24 12:40:43 +02:00
Sebastiaan van Stijn
5862285fac
seccomp: allow sync_file_range2 on supported architectures.
On a ppc64le host, running postgres (tried with 9.4 to 9.6) gives the following
warning when trying to flush data to disks (which happens very frequently):

     WARNING: could not flush dirty data: Operation not permitted.

A quick dig in postgres source code indicate it uses sync_file_range(2) to
flush data; which on ppe64le and arm64 is translated to sync_file_range2(2)
for alignements reasons.

The profile did not allow sync_file_range2(2), making postgres sad because
it can not flush its buffers. arm_sync_file_range(2) is an ancient alias to
sync_file_range2(2), the syscall was renamed in Linux 2.6.22 when the same
syscall was added for PowerPC.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-24 12:36:53 +02:00
Sebastiaan van Stijn
117d678749
seccomp: allow personality with UNAME26 bit set
From personality(2):

    Have uname(2) report a 2.6.40+ version number rather than a 3.x version
    number.  Added as a stopgap measure to support broken applications that
    could not handle the  kernel  version-numbering  switch  from 2.6.x to 3.x.

This allows both "UNAME26|PER_LINUX" and "UNAME26|PER_LINUX32".

Fixes: "setarch broken in docker packages from Debian stretch"

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-24 12:27:14 +02:00
Sebastiaan van Stijn
fc9e5d161a
seccomp: allow syscall membarrier
Add the membarrier syscall to the default seccomp profile.
It is for example used in the implementation of dlopen() in
the musl libc of Alpine images.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-24 12:16:26 +02:00
Sebastiaan van Stijn
1746a195e9
seccomp: allow adjtimex get time operation
Enabled adjtimex in the default profile without requiring CAP_SYS_TIME privilege.
The kernel will check CAP_SYS_TIME and won't allow setting the time.

Fixes: Getting the system time with ntptime returns an error in an unprivileged
container

To verify, inside a CentOS 7 container:

    yum install -y ntp
    ntptime
    # ntp_gettime() returns code 0 (OK)

    ntpdate -v time.nist.gov
    # ntpdate[84]: Can't adjust the time of day: Operation not permitted

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-24 12:16:23 +02:00
Sebastiaan van Stijn
7e7545e556
seccomp: allow add preadv2 and pwritev2 syscalls
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-24 12:16:21 +02:00
Sebastiaan van Stijn
267a0cf68e
seccomp: move the syslog syscall to be gated by CAP_SYS_ADMIN or CAP_SYSLOG
This call is what is used to implement `dmesg` to get kernel messages
about the host. This can leak substantial information about the host.
It is normally available to unprivileged users on the host, unless
the sysctl `kernel.dmesg_restrict = 1` is set, but this is not set
by standard on the majority of distributions. Blocking this to restrict
leaks about the configuration seems correct.

Relates to docker/docker#37897 "docker exposes dmesg to containers by default"

See also https://googleprojectzero.blogspot.com/2018/09/a-cache-invalidation-bug-in-linux.html

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-24 11:57:48 +02:00
Wei Fu
c8523cc5bb
Merge pull request #4470 from AkihiroSuda/fix-static-plugin
BUILDING.md: fix description about static builds
2020-08-23 16:39:10 +08:00
Wei Fu
35d320c7ae
Merge pull request #4490 from dmcgowan/makefile-test-tags
Update go list to respect build tags
2020-08-23 16:37:13 +08:00
Akihiro Suda
09cab88da4
Merge pull request #4481 from tao12345666333/add-openat2-syscall
seccomp: add `openat2` and `faccessat2` syscall.
2020-08-23 07:26:25 +09:00
Antonio Ojea
e3d27f9ed8 bump cni version to v0.8.0
bump cni dependencies so we can benefits from its
bugfixes and improvements

Signed-off-by: Antonio Ojea <antonio.ojea.garcia@gmail.com>
2020-08-21 19:55:13 +02:00
Derek McGowan
3275a216fd
Update go list to respect build tags
This prevents packages with no Go included files due to build constraints
being included in the package list. These packages cause the test command
to fail with "can't load package build constraints exclude all Go files".

Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-08-21 09:39:00 -07:00
Antonio Ojea
1403a391c3 bump cni dependencies
Signed-off-by: Antonio Ojea <aojea@redhat.com>
2020-08-21 18:00:20 +02:00
Michael Crosby
db687ff485 Add --runtime-root to ctr
Signed-off-by: Michael Crosby <michael@thepasture.io>
2020-08-21 04:55:28 -04:00
Mike Brown
bb0ca842e9
Merge pull request #1559 from mikebrow/prepare-1.4
Prepare 1.4
2020-08-20 12:16:29 -05:00
Phil Estes
412378ff02
Merge pull request #4437 from kzys/fix-rollback
snapshots/devmapper: fix rollback
2020-08-20 08:41:51 -04:00
Michael Crosby
63f89eb954 Update server with nri injection points
This allows development with container to be done for NRI without the need for
custom builds.

This is an experimental feature and is not enabled unless a user has a global
`/etc/nri/conf.json` config setup with plugins on the system.  No NRI code will
be executed if this config file does not exist.

Signed-off-by: Michael Crosby <michael@thepasture.io>
2020-08-20 08:10:09 -04:00
Michael Crosby
b777982928 Update vendor for new containerd and nri
Signed-off-by: Michael Crosby <michael@thepasture.io>
2020-08-20 07:28:37 -04:00
Mike Brown
b0cc07999a vendor containerd 1.4 release
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2020-08-20 05:14:45 -05:00
Mike Brown
a40d639285 update support table for 1.4
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2020-08-20 05:13:47 -05:00
Li Yuxuan
4422ae3638 tasks: Monitor v2 tasks in initFunc as well
When containerd is restarted, only v1 tasks are monitored again. This
leads to the lack of existing v2 task metrics.

Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
2020-08-19 20:32:31 +08:00
Kazuyoshi Kato
a1f6c9dd88 snapshots/devmapper: fix rollback
The rollback mechanism is implemented by calling deleteDevice() and
RemoveDevice(). But RemoveDevice() is internally calling
deleteDevice() as well.

Since a device will be deleted by first deleteDevice(),
RemoveDevice() always will see ENODATA. The specific error must be
ignored to remove the device's metadata correctly.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2020-08-17 15:41:03 -07:00
Wei Fu
6c74c391fd
Merge pull request #4475 from thaJeztah/minor_systemd_updates
systemd: use LimitNOFILE=infinity instead of hard-coded max value
2020-08-18 00:15:14 +08:00
Derek McGowan
09814d48d5
Merge pull request #4479 from dmcgowan/prepare-1.4.0
Prepare v1.4.0
2020-08-17 07:41:32 -07:00
Jintao Zhang
6a915a1453 seccomp: add faccessat2 syscall.
related to https://patchwork.kernel.org/patch/11545287/

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2020-08-17 21:48:21 +08:00
Derek McGowan
d68ddb0c0a
Prepare v1.4.0
Update release notes form rc to GA.
Update mailmap
Update version

Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-08-16 22:56:31 -07:00
Derek McGowan
6be2eccd72
Update releases page for v1.4.0
Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-08-16 22:56:31 -07:00
Jintao Zhang
e28e55f455 seccomp: add openat2 syscall.
related to https://patchwork.kernel.org/patch/11167585/

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2020-08-16 16:28:21 +08:00
Phil Estes
298f43663a
Merge pull request #4480 from AkihiroSuda/disable-vagrant-crun
CI: disable crun on Vagrant to decrease flakiness
2020-08-15 07:08:27 -04:00
Akihiro Suda
d469bffcdc
CI: disable crun on Vagrant to decrease flakiness
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-08-15 14:38:46 +09:00
Maksym Pavlenko
1267b19de4
Merge pull request #4476 from thaJeztah/systemd_license_header
systemd: add license header to systemd unit
2020-08-14 15:08:29 -07:00
Sebastiaan van Stijn
77a33e3db6
systemd: add license header to systemd unit
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-13 13:22:50 +02:00
Sebastiaan van Stijn
c691c36614
systemd: use LimitNOFILE=infinity instead of hard-coded max value
According to the systemd documentation, `infinity` can be used for all limits;
https://www.freedesktop.org/software/systemd/man/systemd.exec.html#Process%20Properties

> Resource limits may be specified in two formats: either as single value to set a
> specific soft and hard limit to the same value, or as colon-separated pair soft:hard
> (...) Use the string infinity to configure no limit on a specific resource.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-13 13:06:41 +02:00
Wei Fu
433662502f
Merge pull request #4456 from crisesw/ctr-cpu-limit
Add --cpu-quota, --cpu-period flag to ctr
2020-08-12 20:14:13 +08:00
Wei Fu
73b1449278 runtime: ignore ErrNotExist when remove rootfs
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2020-08-12 20:04:50 +08:00