102 Commits
Author SHA1 Message Date
Wei Fu 34b30428f6 integration: Add injected failpoint testing for RunPodSandbox
REF: https://github.com/containerd/containerd/pull/7069/commits/3c5e80b63e683453fee48093347c7c1e969450a7

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-10-24 08:41:07 +08:00
rongfu.leng f109930d54 fix install cni script
Signed-off-by: rongfu.leng <rongfu.leng@daocloud.io>
(cherry picked from commit 047e684bbb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-20 13:18:06 +02:00
Sebastiaan van Stijn 1c1045d799 [release/1.5] update golangci-lint to v1.49.0
For compatibility with Go 1.18

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-20 13:12:32 +02:00
Kazuyoshi Kato 699a1f90e2 Do not use go get to install executables
https://go.dev/doc/go-get-install-deprecation

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
(cherry picked from commit 6b0e2414c8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-20 13:12:32 +02:00
Sebastiaan van Stijn c24d508c93 update gotestsum to v1.7.0
Same as previous commit, but a release was tagged;

https://github.com/gotestyourself/gotestsum/compare/1a9438079330f60c1301fdfacafbfac8763214a5...v1.7.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 18d6cc1b06)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-20 13:12:22 +02:00
Sebastiaan van Stijn 79f119b439 update gotestsum to current master
removes golang.org/x/cryto dependency:
full diff: https://github.com/gotestyourself/gotestsum/compare/012a85e34a7ce5554057d512e55dcb54b6f2505e...1a9438079330f60c1301fdfacafbfac8763214a5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 603962bc81)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-20 13:12:22 +02:00
Brian Goff 4806c2400e Update gotestsum to add timestamps to junit output
The current release of gotestsum is missing timestamps in the junit
data, which makes it difficult to import in an external system later.

https://github.com/gotestyourself/gotestsum/commit/012a85e34a7ce5554057d512e55dcb
includes the necessary changes to add the timestamp for the test run to
the junit output.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit bfbebf02b7)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-20 13:12:19 +02:00
Akihiro Suda 4593d187a7 update runc binary to v1.1.4
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit ad597015cd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-26 16:23:28 +02:00
Sebastiaan van Stijn e549139d3c 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>
(cherry picked from commit 0167e55abd)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-06-09 07:31:02 +02:00
Sebastiaan van Stijn c2f7933497 update runc binary to v1.1.2
This is the second patch release of the runc 1.1 release branch. It
fixes CVE-2022-29162, a minor security issue (which appears to not be
exploitable) related to process capabilities.

This is a similar bug to the ones found and fixed in Docker and
containerd recently (CVE-2022-24769).

- A bug was found in runc where runc exec --cap executed processes with
  non-empty inheritable Linux process capabilities, creating an atypical Linux
  environment. For more information, see GHSA-f3fp-gc8g-vw66 and CVE-2022-29162.
- runc spec no longer sets any inheritable capabilities in the created
  example OCI spec (config.json) file.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 25858d621f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-13 22:21:27 +02:00
Akihiro Suda ef56dcafc3 update runc binary to v1.1.1
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit f2d5f71a78)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-04 11:47:56 +02:00
Akihiro Suda b8ab8dd3fb update runc binary to v1.1.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit dba897c35c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-04 11:47:44 +02:00
Derek McGowan b8d8266f47 Update get to install for cri tools
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-03-23 12:31:47 -07:00
Sebastiaan van Stijn a2d10ac7c5 install-dev-tools: use go install, and pin by version
the github.com/stevvooe/protobuild@v0.1.0 module was renamed to
github.com/containerd/protobuild, but go modules ignores the
rename and pulls v0.2.0 (which is after the rename)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-23 19:55:47 +01:00
Kazuyoshi Kato e7cd5a378e script: update golangci-lint from v1.38.0 and v1.36.0 to v1.42.0
golint has been deprecated and replaced by revive since v1.41.0.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
(cherry picked from commit 4dd5ca70fb)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-03 22:26:42 +01:00
Sebastiaan van Stijn eac65eac28 Update cpuguy83/go-md2man binary to v2.0.1
full diff: https://github.com/cpuguy83/go-md2man/compare/v2.0.0...v2.0.1

- Fix handling multiple definition descriptions
- Fix inline markup causing table cells to split
- Remove escaping tilde character (prevents tildes (`~`) from disappearing).
- Do not escape dash, underscore, and ampersand (prevents ampersands (`&`) from disappearing).
- Ignore unknown HTML tags to prevent noisy warnings

Note that this only updates the binaries we install. The vendor code also
includes go-md2man (as indirect dependency of urfave/cli). I don't think we use that
feature, so I did not add it to our go.mod

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d2b6d192db)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-03 22:26:37 +01:00
Akihiro Suda 16b5aa2c81 update runc binary to v1.0.3
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit 44995d4831)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-12-07 18:08:11 +09:00
Akihiro Suda 011fb4c0b9 update runc binary to v1.0.2
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit 3f8ea1b6a1)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-09-16 14:13:33 +09:00
Derek McGowan 25ad9449cb Merge pull request #5763 from thaJeztah/1.5_backport_install_apparmor_parser_for_arm64_env
[release/1.5 backport] install apparmor parser for arm64, and update seccomp to 2.5.1
2021-08-16 15:30:31 -07:00
Mike Brown 0bc1e1d8aa update seccomp version
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
(cherry picked from commit b56527cb7e)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-20 16:29:47 +02:00
Akihiro Suda 6807d070e8 update runc binary to v1.0.1
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit 43e0594ae9)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-07-20 13:57:42 +09:00
Akihiro Suda 78b95dff2a update runc binary to v1.0.0 GA
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit 28bb59c080)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-24 09:55:05 +02:00
Akihiro Suda ccfb9c509f update runc binary to v1.0.0-rc95
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit 599127f4df)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-05-19 19:21:11 +09:00
Mike Brown 47507a6e17 just release ctd-decoder not ctr-enc
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
(cherry picked from commit 3157392513)
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-05-13 15:10:08 -07:00
Davanum Srinivas 384b05a5ae Update the runc binary used with containerd to runc v1.0.0-rc94
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
(cherry picked from commit 5c99f150ae)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-05-11 17:15:37 +02:00
Mike Brown 7783f5893a update to new cri-tools make install
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
(cherry picked from commit c74a6c4194)
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-05-10 09:49:47 -05:00
Derek McGowan 7942ae68b1 Revert "Specify seccomp target arch for CC"
This reverts commit 969ec89493.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-04-29 15:05:54 -07:00
Brian Goff 969ec89493 Specify seccomp target arch for CC
seccomp's build scripts require setting the target arch that will be
built when cross compiling.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-04-28 17:07:44 +00:00
Phil Estes 6ef0d383e3 Merge pull request #5271 from cpuguy83/ci_output_junit
ci: upload junit formatted test results
2021-04-15 13:20:35 -04:00
Akihiro Suda 14f357b90f CI: update crun to 0.19
Release notes: https://github.com/containers/crun/releases

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-04-12 17:05:11 +09:00
Phil Estes b52727342c Merge pull request #5308 from AkihiroSuda/add-imgcrypt-bin
cri-cni-release: add imgcrypt binaries (v1.1.0)
2021-04-07 15:43:38 -04:00
Mike Brown da998c81eb move to gcr.io/k8s-staging-cri-tools test images
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-04-07 10:04:02 -05:00
Akihiro Suda 92ea98eda5 cri-cni-release: add imgcrypt binaries (v1.1.0)
Add `ctd-decoder` and `ctr-enc`.

Close issue 5265

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-04-07 17:38:42 +09:00
Brian Goff af1e2af720 ci: upload junit formatted test results
This allows us to dig more details out of test runs and maintain a
better history.

For this we can use `gotestsum`, which is a utility that wraps `go test`
so that it outputs test2json (go's format) and output junit (a format
more easily imported into other systems).

The PR makes it possible to override the Makefile's use of `go test` to
use any other command tto executet the test. For CI we'll use `gotestsum
--`, where `gotestsum` expects everything after the `--` to be flags for
`go test`.
We then use environment variables to configure `gotestsum` (e.g.
`GOTESTSUM_JUNITFILE` is an env var accepted by `gotestsum`).

For cri tests, the test suite supports outputing test results to a
directory, these are in junit format already. The file is not named
properly just because the code that creates it (in ginkgo) is not
configured well. We can fix that upstream to give us a better name...
until then I'm keeping those results in a separate dir.

A second workflow is also added so the test results can be summed up and
a report added to the workflow run. The 2nd workflow is required for
this since PR runs do not have access to do some of this due to safety
reasons
(https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-03-31 17:00:49 +00:00
Mike Brown 548d984f27 Merge pull request #5132 from mikebrow/add-some-debug-out-for-dep-setups
adds a new install-deps in the makefile; and some refactoring of the scripts
2021-03-24 15:28:16 -05:00
Mike Brown 9ad87b9ba7 adds critools-version
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-03-24 10:58:40 -05:00
Phil Estes a1138182d5 Merge pull request #5180 from dmcgowan/lint-enforce-comments
Fix exported comments enforcer in CI
2021-03-15 10:50:06 -04:00
Sebastiaan van Stijn 55a9bbc033 Prevent runc inheriting BUILDTAGS from containerd
Both runc and containerd use BUILDTAGS to customize go build-tags.

When building containerd with custom build-tags, runc inherited
those, causing the default to be overwritten, e.g.;

    make BUILDTAGS=no_btrfs cri-cni-release
    (in script/setup/install-runc)

    HEAD is now at 12644e61 VERSION: release 1.0.0~rc93
    make[1]: Entering directory '/tmp/tmp.ZJzc2KtI0A/runc'
    go build -trimpath "-mod=vendor" "-buildmode=pie"  -tags "no_btrfs" -ldflags "-X main.gitCommit="12644e614e25b05da6fd08a38ffa0cfe1903fdec" -X main.version=1.0.0-rc93 " -o runc .
                                                   ^^^^^^^^^^^^^^^^

This patch brings back the BUILDTAGS make-var in the runc-install
script, which fixates the buildtags to our defaults.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-12 18:37:18 +01:00
Derek McGowan 35eeb24a17 Fix exported comments enforcer in CI
Add comments where missing and fix incorrect comments

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-03-12 08:47:05 -08:00
Mike Brown 2205da64a6 clean up install-cni and install-critools
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-03-11 10:21:32 -06:00
Sebastiaan van Stijn 79a51cd16a move runc version to a separate file for easier consumption
This moves the runc version to build to scripts/setup/runc-version,
which makes it easier for packagers to find the default version
to use.

The RUNC_VERSION environment variable can still be used to override
the version, which can be used (e.g.) to test against different versions
in our CI.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-10 14:28:29 +01:00
Sebastiaan van Stijn 8325ba5d36 Separate runc binary version from libcontainer version
Now that the dependency on runc (libcontaienr) code has been reduced
considerably, it is probbaly ok to cut the version dependency between
libcontainer and the runc binary that is supported.

This patch separates the runc binary version from the version of
libcontainer that is defined in go.mod, and updates the documentation
accordingly.

The RUNC_COMMIT variable in the install-runc script is renamed to
RUNC_VERSION to encourage using tagged versions, and the Dockerfile
in contrib is updated to allow building with a custom version.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-10 13:41:12 +01:00
Sebastiaan van Stijn b89a63a235 Remove references to apparmor and selinux buildtags for runc
From the runc v1.0.0-rc93 release notes:

> The "selinux" and "apparmor" buildtags have been removed, and now all runc
> builds will have SELinux and AppArmor support enabled. Note that "seccomp"
> is still optional (though we very highly recommend you enable it).

Also adding a note about kmem support.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-10 12:16:54 +01:00
Sebastiaan van Stijn 164573897c script/setup: use git clone instead of go get -d
`go get -d` uses go modules by default in Go 1.16 and up, which results
in modules being fetched for the "latest" module version, after which we
tried to "git checkout" to `<VERSION>`.

For runc, this means that (possibly incorrectly), `go get` will download
runc `v0.1.1` (most recent non-"pre-release", which caused failures (e.g
the old `Sirupsen/logrus` being downloaded).

In addition, some of the dependencies we're installing use vendoring, and
thus would not require the modules to be downloaded (and vendored files
will be ignored when using `go get` with modules).

This patch switches several uses `go get -d` to use a regular
git clone, after which the desired version is checked out,
and the binaries are built.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Phil Estes <estesp@amazon.com>
2021-03-03 15:34:54 -05:00
Akihiro Suda 80243b8667 CI: update crun to 0.17
https://github.com/containers/crun/releases/tag/0.17

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-01-22 20:51:14 +09:00
Shengjing Zhu 56672b961d Change to GOPATH before go get
So it won't touch go.mod

Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2020-12-01 01:39:10 +08:00
Shengjing Zhu 553a369158 Fix reference to vendor.conf in scripts
Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2020-12-01 01:34:10 +08:00
Akihiro Suda a67dbdee79 CI: update crun to 0.16
Changes since 0.15:
- https://github.com/containers/crun/releases/tag/0.16
- https://github.com/containers/crun/releases/tag/0.15.1

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-11-30 18:10:24 +09:00
Sebastiaan van Stijn 1edeea7663 install-runc: remove unused USESUDO variable
This is no longer needed, as the script is already run with sudo.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-10 12:49:21 +01:00
Mike Brown 63f673a229 updates cri-tools to latest version
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2020-10-31 14:46:44 -05:00