Commit Graph

11307 Commits

Author SHA1 Message Date
Ye Sijun
72b87ad004
add WithAdditionalGIDs test
Signed-off-by: Ye Sijun <junnplus@gmail.com>
2022-06-21 23:58:19 +08:00
Ye Sijun
5bf705255d
add WithAppendAdditionalGroups helper
Signed-off-by: Ye Sijun <junnplus@gmail.com>
2022-06-21 23:21:04 +08:00
Justin Terry
5cde04bc7c Forward ctr snapshotter flags on Windows
Signed-off-by: Justin Terry <jlterry@amazon.com>
2022-06-21 07:54:30 -07:00
Kazuyoshi Kato
16992a4a2e
Merge pull request #7065 from kzys/fuzz-quiet
Make CI Fuzz less noisy
2022-06-20 19:01:45 -07:00
Derek McGowan
4ac1031e0c
Add snapshotter key to snapshot events
Consumers of snapshot events require the snapshotter
field to refer to the related snapshot.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-06-20 18:25:53 -07:00
Akihiro Suda
b56cac143a
Merge pull request #7082 from samuelkarp/ctr-hostname
ctr: add --hostname flag to create, run
2022-06-20 19:35:15 -05:00
Kazuyoshi Kato
b27a229df6 Move contrib/fuzz/docker_fuzzer.go to remotes/docker
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-06-20 23:34:23 +00:00
Kazuyoshi Kato
f91616e45e Copy FuzzConvertManifest from cncf/cncf-fuzzing
This test is one of the noisiest and should be moved from
cncf/cncf-fuzzing first.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-06-20 23:34:23 +00:00
Kazuyoshi Kato
c9c5fee37e Do not hardcode fuzzing targets
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-06-20 23:34:13 +00:00
Kazuyoshi Kato
50f1a4e426 Don't log "ignored xattr ..." warnings
It is too noisy and not really useful if the input is random.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-06-20 23:34:13 +00:00
Kazuyoshi Kato
112497bc36 Make oss_fuzz_build.sh quiet
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-06-20 23:34:13 +00:00
Samuel Karp
6e53ffb105
ctr: add --hostname flag to create, run
Signed-off-by: Samuel Karp <me@samuelkarp.com>
2022-06-20 15:11:44 -07:00
Phil Estes
d59dcd0579
Merge pull request #7077 from my-git9/content-flow
improve content-flow
2022-06-20 15:20:30 -04:00
Nashwan Azhari
7002fc2c47 Ensure Windows Periodic workflow errors out while still uploading results.
This patch aims to ensure that any test failures in the Windows Periodic
workflow will lead to the workflow being marked as failed (red) while still
processing/uploading the JUnit result files to GCloud for them to show
up in testgrid.

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2022-06-20 20:46:49 +03:00
xin.li
2e288f5b1b improve content-flow
Signed-off-by: xin.li <xin.li@daocloud.io>
2022-06-18 14:26:16 +08:00
Nashwan Azhari
d4ab649881 Revert MinGW to oldest known working version in Windows setup script.
Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2022-06-17 15:42:50 +03:00
Maksym Pavlenko
9c6154bff1
Merge pull request #7067 from kzys/fuzz-optional
Make CI Fuzz optional
2022-06-15 21:19:26 -07:00
Kazuyoshi Kato
55dd56e52b Make CI Fuzz optional
Until we merge cncf/cncf-fuzzing into this repository (see #7066),
we should keep this step optional.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-06-15 22:35:42 +00:00
Maksym Pavlenko
8aa3459459
Merge pull request #7056 from kzys/go118-fuzz
Use Go 1.18's testing.F on simple fuzzers
2022-06-15 11:23:13 -07:00
Kazuyoshi Kato
bc452f83a3
Merge pull request #7062 from aznashwan/win-intergartion-downgrade-mingw
Downgrade MinGW in Windows setup scripts.
2022-06-15 10:34:29 -07:00
Kazuyoshi Kato
43cc649194
Merge pull request #7057 from ozhuraki/services-server-test
Make test path a constant
2022-06-15 09:26:39 -07:00
Kazuyoshi Kato
82adbc849a Run fuzzing tests with go test -fuzz
In addition to oss-fuzz's CIFuzz (see #7052), this commit adds a small
shell script that run all fuzzing tests with go test -fuzz.

While running for 30 seconds would be too short to acutally find issues,
we want to make sure that these fuzzing tests are not fundamentally
broken.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-06-15 16:23:37 +00:00
Kazuyoshi Kato
a1eb2d8a67 Use testing.F on FuzzPlatformsParse
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-06-15 14:56:20 +00:00
Kazuyoshi Kato
57200edf25 Use testing.F on FuzzParseProcPIDStatus
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-06-15 14:56:20 +00:00
Kazuyoshi Kato
04874d51a3
Merge pull request #7052 from AdamKorcz/fuzz3
Run fuzzers in CI
2022-06-15 07:46:04 -07:00
Nashwan Azhari
0b3c31dd7c Downgrade MinGW in Windows setup scripts.
After the switch to MinGW 11.2.0 in #6888, the containerd client
integration tests were crashing with an apparent  memory allocation
error as described in golang/go#46099.

This patch reverts MinGW to 10.3.0 to bypass the issue.

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2022-06-15 16:12:35 +03:00
Fu Wei
fbf76c201f
Merge pull request #6913 from wllenyj/devshm 2022-06-14 19:11:44 +08:00
wllenyj
42a386c816 CRI: change the /dev/shm mount options in Sandbox.
All containers except the pause container, mount `/dev/shm" with flags
`nosuid,nodev,noexec`. So change mount options for pause container to
keep consistence.
This also helps to solve issues of failing to mount `/dev/shm` when
pod/container level user namespace is enabled.

Fixes: #6911

Signed-off-by: Jiang Liu <gerry@linux.alibaba.com>
Signed-off-by: Lei Wang <wllenyj@linux.alibaba.com>
2022-06-14 10:45:06 +08:00
wllenyj
a62a95789c CRI: remove default /dev/shm mount in Sandbox.
This's an optimization to get rid of redundant `/dev/shm" mounts for pause container.
In `oci.defaultMounts`, there is a default `/dev/shm` mount which is redundant for
pause container.

Fixes: #6911

Signed-off-by: Jiang Liu <gerry@linux.alibaba.com>
Signed-off-by: Lei Wang  <wllenyj@linux.alibaba.com>
2022-06-14 10:45:06 +08:00
Oleg Zhurakivskyy
8245e35eb8 Make test path a constant
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2022-06-13 23:28:17 +03:00
AdamKorcz
ee14f93161 Run fuzzers in CI
Signed-off-by: AdamKorcz <Adam@adalogics.com>
2022-06-13 21:02:24 +01:00
Eric Ernst
52593cfc86 containerd-stress: add support for running through CRI
Introduce a --cri flag, which will enable running container-stress using the CRI,
instead of containerd's task API.

In doing so, we introduce cri_worker, rename the existing worker to ctr_worker, and introduce
a worker interface that each of these implement.

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
2022-06-11 09:59:07 +02:00
Fu Wei
a5d7185c72
Merge pull request #7008 from mmmmmmmxl/fix/userattr-unmount 2022-06-11 06:59:42 +08:00
Maksym Pavlenko
e71ffddb6b
Merge pull request #7042 from samuelkarp/freebsd-unit-tests
Port (some) unit tests to FreeBSD
2022-06-10 15:05:52 -07:00
Kazuyoshi Kato
b5ffeac6db
Merge pull request #6888 from aznashwan/bump-windows-ci-deps
Bump Golang and MinGW versions in Windows setup script.
2022-06-10 11:17:15 -07:00
Kazuyoshi Kato
4ec6a379c0
Merge pull request #6918 from dcantah/windows-snapshotter-cleanup
Windows snapshotter touch ups and new functionality
2022-06-10 11:08:18 -07:00
Kazuyoshi Kato
d6518b6da4
Merge pull request #7032 from swagatbora90/snapshotter-naming-comments
Improve naming consistencies in comments in snapshotter.go
2022-06-10 10:45:49 -07:00
Kazuyoshi Kato
fb0fe40c50
Merge pull request #7022 from kzys/static
Make building static binaries simpler
2022-06-10 10:11:35 -07:00
Samuel Karp
5560b622d6
archive: Explicitly specify stdio for tar(1)
Different tar(1) implementations default to different input and output
locations when none is specified.  This can include tape devices like
/dev/st0 (on Linux) or /dev/sa0 (on FreeBSD), but may be overridden by
compilation options or environment variables.  Using the f option with
the special value of - instructs tar(1) to read from stdin and write to
stdout instead of the default.

Signed-off-by: Samuel Karp <me@samuelkarp.com>
2022-06-09 18:54:10 -07:00
Samuel Karp
95f1d79718
platforms: Run goimports for FreeBSD
Signed-off-by: Samuel Karp <me@samuelkarp.com>
2022-06-09 18:54:10 -07:00
Samuel Karp
42e019e634
cri/server: Disable tests on FreeBSD
The TestPodAnnotationPassthroughContainerSpec test and the
TestContainerAnnotationPassthroughContainerSpec test both depend on a
platform-specific implementation of criService.containerSpec, which is
unimplemented on FreeBSD.

The TestSandboxContainerSpec depends on a platform-specific
implementation oc criService.sandboxContainerSpec, which is
unimplemented on FreeBSD.

Signed-off-by: Samuel Karp <me@samuelkarp.com>
2022-06-09 18:54:10 -07:00
Samuel Karp
ad8e598060
oci: Remove empty mount option slice for FreeBSD
Mount options are marked `json:omitempty`. An empty slice in the default
object caused TestWithSpecFromFile to fail.

Signed-off-by: Samuel Karp <me@samuelkarp.com>
2022-06-09 18:54:10 -07:00
Samuel Karp
c15f0cdaf0
oci: FreeBSD devices may have major number 0
Signed-off-by: Samuel Karp <me@samuelkarp.com>
2022-06-09 18:54:09 -07:00
Samuel Karp
2ab8c12fc8
archive: use Linkat on FreeBSD for hardlinks
Calling link(2) with a symlink as the target will cause FreeBSD to
attempt to create a new hard link pointing to the target of the symlink
rather than a hardlink to the symlink itself. By contrast, Linux creates
a hardlink to the symlink.

Use linkat(2) instead, which accepts a flag controlling this behavior.
If linkat(2) is called with AT_SYMLINK_FOLLOW, it will behave the same
as link(2).  If linkat(2) is called without AT_SYMLINK_FOLLOW, it will
behave the same as Linux's link(2) instead.

See FreeBSD's implementation of ln(1), which uses linkat(2) and controls
this behavior by way of the -P and -L flags:
3003117253/bin/ln/ln.c (L342-L343)

Signed-off-by: Samuel Karp <me@samuelkarp.com>
2022-06-09 18:54:09 -07:00
Kazuyoshi Kato
30436a061b
Merge pull request #7033 from mxpv/cri
Allow CRI on Darwin
2022-06-09 16:53:48 -07:00
Swagat Bora
61690d76d2 Improve naming consistencies in comments in snapshotter.go
Signed-off-by: Swagat Bora <sbora@amazon.com>
2022-06-09 17:16:37 +00:00
Maksym Pavlenko
c101f79996 Allow CRI on Darwin
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-06-09 10:13:00 -07:00
Akihiro Suda
e036bdc985
Merge pull request #7034 from thaJeztah/update_runc
update runc binary to v1.1.3
2022-06-09 19:32:29 +09:00
Sebastiaan van Stijn
0167e55abd
update runc binary to v1.1.3
full diff: https://github.com/opencontainers/runc/compare/v1.1.2...v1.1.3

This is the third release of the 1.1.z series of runc, and contains
various minor improvements and bugfixes.

- Our seccomp `-ENOSYS` stub now correctly handles multiplexed syscalls on
  s390 and s390x. This solves the issue where syscalls the host kernel did not
  support would return `-EPERM` despite the existence of the `-ENOSYS` stub
  code (this was due to how s390x does syscall multiplexing).
- Retry on dbus disconnect logic in libcontainer/cgroups/systemd now works as
  intended; this fix does not affect runc binary itself but is important for
  libcontainer users such as Kubernetes.
- Inability to compile with recent clang due to an issue with duplicate
  constants in libseccomp-golang.
- When using systemd cgroup driver, skip adding device paths that don't exist,
  to stop systemd from emitting warnings about those paths.
- Socket activation was failing when more than 3 sockets were used.
- Various CI fixes.
- Allow to bind mount `/proc/sys/kernel/ns_last_pid` to inside container.
- runc static binaries are now linked against libseccomp v2.5.4.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-06-09 07:29:43 +02:00
Samuel Karp
2b4b0cf28f
Merge pull request #7000 from akhramov/freebsd_linux_containers 2022-06-08 18:07:39 -07:00