Commit Graph

232 Commits

Author SHA1 Message Date
Daniel Canter
e1c5d71c0c Update golang to 1.18.5, 1.17.13
Update Go runtime to 1.18.5 to address CVE-2022-32189.

Full diff:
https://github.com/golang/go/compare/go1.18.4...go1.18.5

--------------------------------------------------------

From the security announcement:
https://groups.google.com/g/golang-announce/c/YqYYG87xB10

We have just released Go versions 1.18.5 and 1.17.13, minor point
releases.

These minor releases include 1 security fixes following the security
policy:

encoding/gob & math/big: decoding big.Float and big.Rat can panic

Decoding big.Float and big.Rat types can panic if the encoded message is
too short.

This is CVE-2022-32189 and Go issue https://go.dev/issue/53871.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.18.5

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2022-08-02 11:54:45 -07:00
fahed dorgaa
426fcfbc52 fix protobuf aarch64
Signed-off-by: fahed dorgaa <fahed.dorgaa@gmail.com>
2022-08-01 18:12:41 +02:00
Wei Fu
3c5e80b63e integration: Add injected failpoint testing for RunPodSandbox
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-07-22 23:25:40 +08:00
Maksym Pavlenko
60f51c1aa3 Update and align golangci-lint version
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-07-15 13:22:06 -07:00
Fu Wei
e4fefea554
Merge pull request #7153 from mxpv/install-protobuf 2022-07-15 15:44:29 +08:00
Sebastiaan van Stijn
4ffef752d0
update golang to 1.18.4, 1.17.12
go1.18.4 (released 2022-07-12) includes security fixes to the compress/gzip,
encoding/gob, encoding/xml, go/parser, io/fs, net/http, and path/filepath
packages, as well as bug fixes to the compiler, the go command, the linker,
the runtime, and the runtime/metrics package. See the Go 1.18.4 milestone on the
issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.18.4+label%3ACherryPickApproved

This update addresses:

CVE-2022-1705, CVE-2022-1962, CVE-2022-28131, CVE-2022-30630, CVE-2022-30631,
CVE-2022-30632, CVE-2022-30633, CVE-2022-30635, and CVE-2022-32148.

Full diff: https://github.com/golang/go/compare/go1.18.3...go1.18.4

From the security announcement;
https://groups.google.com/g/golang-announce/c/nqrv9fbR0zE

We have just released Go versions 1.18.4 and 1.17.12, minor point releases. These
minor releases include 9 security fixes following the security policy:

- net/http: improper sanitization of Transfer-Encoding header

  The HTTP/1 client accepted some invalid Transfer-Encoding headers as indicating
  a "chunked" encoding. This could potentially allow for request smuggling, but
  only if combined with an intermediate server that also improperly failed to
  reject the header as invalid.

  This is CVE-2022-1705 and https://go.dev/issue/53188.

- When `httputil.ReverseProxy.ServeHTTP` was called with a `Request.Header` map
  containing a nil value for the X-Forwarded-For header, ReverseProxy would set
  the client IP as the value of the X-Forwarded-For header, contrary to its
  documentation. In the more usual case where a Director function set the
  X-Forwarded-For header value to nil, ReverseProxy would leave the header
  unmodified as expected.

  This is https://go.dev/issue/53423 and CVE-2022-32148.

  Thanks to Christian Mehlmauer for reporting this issue.

- compress/gzip: stack exhaustion in Reader.Read

  Calling Reader.Read on an archive containing a large number of concatenated
  0-length compressed files can cause a panic due to stack exhaustion.

  This is CVE-2022-30631 and Go issue https://go.dev/issue/53168.

- encoding/xml: stack exhaustion in Unmarshal

  Calling Unmarshal on a XML document into a Go struct which has a nested field
  that uses the any field tag can cause a panic due to stack exhaustion.

  This is CVE-2022-30633 and Go issue https://go.dev/issue/53611.

- encoding/xml: stack exhaustion in Decoder.Skip

  Calling Decoder.Skip when parsing a deeply nested XML document can cause a
  panic due to stack exhaustion. The Go Security team discovered this issue, and
  it was independently reported by Juho Nurminen of Mattermost.

  This is CVE-2022-28131 and Go issue https://go.dev/issue/53614.

- encoding/gob: stack exhaustion in Decoder.Decode

  Calling Decoder.Decode on a message which contains deeply nested structures
  can cause a panic due to stack exhaustion.

  This is CVE-2022-30635 and Go issue https://go.dev/issue/53615.

- path/filepath: stack exhaustion in Glob

  Calling Glob on a path which contains a large number of path separators can
  cause a panic due to stack exhaustion.

  Thanks to Juho Nurminen of Mattermost for reporting this issue.

  This is CVE-2022-30632 and Go issue https://go.dev/issue/53416.

- io/fs: stack exhaustion in Glob

  Calling Glob on a path which contains a large number of path separators can
  cause a panic due to stack exhaustion.

  This is CVE-2022-30630 and Go issue https://go.dev/issue/53415.

- go/parser: stack exhaustion in all Parse* functions

  Calling any of the Parse functions on Go source code which contains deeply
  nested types or declarations can cause a panic due to stack exhaustion.

  Thanks to Juho Nurminen of Mattermost for reporting this issue.

  This is CVE-2022-1962 and Go issue https://go.dev/issue/53616.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-07-13 11:59:05 +02:00
Maksym Pavlenko
22dfc68ade Fix protobuf script to install protobuf on darwin
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-07-11 15:01:21 -07: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
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
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
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
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
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
Nashwan Azhari
d25b4e6f35 Bump Golang and MinGW versions in Windows setup script.
Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2022-06-03 21:07:53 +03:00
Sebastiaan van Stijn
a3a2d14ecc
fix verify-vendor if go.mod does not contain replace rules
Before this patch, if the go.mod did not contain a replace rule, jq would fail
(Cannot iterate over null), and Bash would produce an error when trying to add
an empty `$key` to `map_requires`:

    make verify-vendor
    + verify-vendor
      jq: error (at <stdin>:581): Cannot iterate over null (null)
      /go/src/github.com/containerd/containerd//script/verify-go-modules.sh: line 44: map_replaces_1[$key]: bad array subscript
      make: *** [Makefile:435: verify-vendor] Error 1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-27 12:57:12 +02:00
Derek McGowan
b9bffd1f38
Merge pull request #6938 from psschwei/fix-parallel
Reverts removal of parallel run from critest
2022-05-12 12:51:26 -07:00
Paul S. Schweigert
7300296cb6
reverts removal of parallel run from critest
Signed-off-by: Paul S. Schweigert <paulschw@us.ibm.com>

As discussed in https://github.com/containerd/containerd/issues/6903,
running ginkgo tests in parallel while trying to skip wasn't working.
However, now that
https://github.com/kubernetes-sigs/cri-tools/pull/930 has fixed the
issue upstream, we can revert back to running our tests in parallel
with the skip.
2022-05-12 13:41:55 -04:00
Sebastiaan van Stijn
25858d621f
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>
2022-05-12 13:38:56 +02:00
Paul S. Schweigert
bb11c9d24f
update critools to v1.24
Signed-off-by: Paul S. Schweigert <paulschw@us.ibm.com>
2022-05-06 13:28:41 -04:00
Kazuyoshi Kato
180c7535d7 Upgrade protoc, protoc-gen-go and protoc-gen-go-grpc
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-27 21:36:04 +00:00
Kazuyoshi Kato
5f43118cee Move Vagrant-based tests from GitHub Actions to Cirrus CI
Cirrus CI supports nested virtualization and free to use from open
source projects. runc has been using the service since
https://github.com/opencontainers/runc/pull/3088.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-26 17:18:19 +00:00
Kazuyoshi Kato
fd37cc75be Use protoc-gen-go instead of protoc-gen-gogoctrd
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-22 15:31:53 +00:00
Kazuyoshi Kato
237ef0de9b Remove all gogoproto extensions
This commit removes the following gogoproto extensions;

- gogoproto.nullable
- gogoproto.customename
- gogoproto.unmarshaller_all
- gogoproto.stringer_all
- gogoproto.sizer_all
- gogoproto.marshaler_all
- gogoproto.goproto_unregonized_all
- gogoproto.goproto_stringer_all
- gogoproto.goproto_getters_all

None of them are supported by Google's toolchain (see #6564).

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-20 07:23:28 +00:00
Maksym Pavlenko
549cc6890d
Merge pull request #6757 from gabriel-samfira/address-test-timeouts
[Windows CI] Address some timeout issues
2022-04-01 10:32:41 -07:00
Gabriel Adrian Samfira
c7bdcdfbef
Address some timeout issues in the Windows CI
This change disables Windows Defender real-time monitoring on the test
workers, and increases the test timeout to 20 minutes (default is 10).

The Windows Defender real time monitoring feature scans any newly
created files for malitious contents. This takes up a lot of CPU when
expanding image archives, which contain lots of files. The CI has been
timing out due to the fact that tests take longer than 10 minutes. This
change should address that issue.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-04-01 14:02:20 +03:00
Akihiro Suda
f2d5f71a78
update runc binary to v1.1.1
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-04-01 15:20:26 +09:00
Akihiro Suda
b1030e7b68
CI: bump up crun to 1.4.4
https://github.com/containers/crun/compare/1.3...1.4.4

Also adds `crun-version` file for consistency with `runc-version`.
(Note: unlike runc, crun does not prepend "v" to a version tag)

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-03-30 21:08:17 +09:00
Kazuyoshi Kato
a19ad9bb6f Use Go 1.18 to build and test containerd
Go 1.18 is released. Go 1.16 is no longer supported by the Go team.
golangci-lint is updated since 1.44.2 doesn't support Go 1.18.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-03-18 16:48:25 +00:00
Sebastiaan van Stijn
e0a6f9c7d0
update to go 1.16.15, 1.17.8 to address CVE-2022-24921
Addresses [CVE-2022-24921](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24921)

go 1.16.15
--------------------

go1.16.15 (released 2022-03-03) includes a security fix to the regexp/syntax package,
as well as bug fixes to the compiler, runtime, the go command, and to the net package.
See the Go 1.16.15 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.16.15+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.16.14...go1.16.15

go 1.17.8
--------------------

go1.17.8 (released 2022-03-03) includes a security fix to the regexp/syntax package,
as well as bug fixes to the compiler, runtime, the go command, and the crypto/x509,
and net packages. See the Go 1.17.8 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.17.8+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.17.7...go1.17.8

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-04 16:53:51 +01:00
Kazuyoshi Kato
77c0539e9a Use containerd/protobuild instead of stevvooe/protobuild
The new version still supports gogo/protobuf, but can be used with newer
protobuf packages if version = 2.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-02-22 00:03:31 +00:00
Sebastiaan van Stijn
f261498e0e
Update Go to 1.16.14, 1.17.7
Includes security fixes for crypto/elliptic (CVE-2022-23806), math/big (CVE-2022-23772),
and cmd/go (CVE-2022-23773).

go1.17.7 (released 2022-02-10) includes security fixes to the crypto/elliptic,
math/big packages and to the go command, as well as bug fixes to the compiler,
linker, runtime, the go command, and the debug/macho, debug/pe, and net/http/httptest
packages. See the Go 1.17.7 milestone on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.17.7+label%3ACherryPickApproved

full diff: https://github.com/golang/go/compare/go1.17.6...go1.17.7

Update Go to 1.17.6

go1.17.6 (released 2022-01-06) includes fixes to the compiler, linker, runtime,
and the crypto/x509, net/http, and reflect packages. See the Go 1.17.6 milestone
on our issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.17.6+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-15 16:28:23 +01:00
Akihiro Suda
dba897c35c
update runc binary to v1.1.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-01-18 13:33:45 +09:00
Kevin Parsons
e0a433abfb
Merge pull request #6347 from gabriel-samfira/fix-windows-test-setup
cri-integration: Add Windows defaults and fix spaces issue
2021-12-17 11:49:03 -08:00
Gabriel Adrian Samfira
78ad7a2d3a
cri-integration: Add Windows default paths
This change adds the following:

  * Default paths to REPORT_DIR, CONTAINERD_STATE and
CONTAINERD_ROOT for Windows
  * Removes the need for nssm on Windows. The nssm service
has issues dealing with paths that contain spaces. Also, the
containerd binary is perfectly capable of registering itself
as a service in Windows, and Windows itself can take care of
any failure handling of the service. NSSM is useful for binaries
that do not have any kind of Windows service logic built into
them. That is not the case of containerd.
  * Use wrapper functions that run containerd, ctr and criclt
with properly quoted paths to pipes, sockets, state and root dirs.
Currently, if the state and root dirs contain spaces in them, the
command line flags on both Windows and Linux are not properly set.
The wrapper functions will allow us to use the readiness_check
and keepalive functions to retry the commands, while properly
quoting the paths and avoiding eval.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2021-12-15 14:11:58 +02:00
Sebastiaan van Stijn
0e472420bf
Update Go to 1.17.5
go1.17.5 (released 2021-12-09) includes security fixes to the syscall and net/http
packages. See the Go 1.17.5 milestone on the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.17.5+label%3ACherryPickApproved

Update Go to 1.17.4
--------------------

go1.17.4 (released 2021-12-02) includes fixes to the compiler, linker, runtime,
and the go/types, net/http, and time packages. See the Go 1.17.4 milestone on
the issue tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.17.4+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-12-12 01:25:02 +01:00
Akihiro Suda
44995d4831
update runc binary to v1.0.3
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-12-06 15:06:39 +09:00
Kazuyoshi Kato
6b0e2414c8 Do not use go get to install executables
https://go.dev/doc/go-get-install-deprecation

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2021-12-03 14:56:33 -08:00
Gabriel Adrian Samfira
7ccd733d25 Add image build workflow
This change adds a new workflow that builds the volume test images
and pushes them to a remote registry.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2021-11-25 09:26:17 +00:00
Nashwan Azhari
444ef2f6d7 Generalize Windows CI setup script for any user.
The current Windows CI setup script assumes it will always be run under
the `azureuser` username.

While this username is defined in the Windows CI GitHub action, the
current version of the script both exposes us to a future risk of
breaking should the CI action be changed, and is also unfriendly to
`curl | sh`-ing it for quick test environment setups.

This patch makes the Windows CI setup script work with any username
provided they have administrative privileges.

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2021-11-16 17:30:40 +02:00
Nashwan Azhari
3d6bfa3f55 Standardize cmdlet capitalization in Windows CI scripts.
This patch standardizes the capitalization of PowerShell commandlets in
the Windows CI setup script in accordance with general PowerShell best
practices.

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
2021-11-16 17:25:54 +02:00
Brian Goff
27d7c50384 Add arm64 to releases
This moves all the release builds into a Dockerfile which is a bit
cleaner for setting up our build environment.

Non-linux/amd64 builds are cross-compiled.
Currently onlinux linux/amd64, linux/arm64, and windows/amd64 are
supported, but is easy to add more, provided their is a cross-compile
toolchain available for it.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-11-11 20:00:34 +00:00
Phil Estes
432ddecaae
Merge pull request #6211 from thaJeztah/bump_go_1.17.3
Update Go to 1.17.3
2021-11-08 11:49:23 -08:00
Akihiro Suda
a22346622b
CI: bump up crun: 1.0 -> 1.3
Release notes: https://github.com/containers/crun/releases

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-11-08 14:32:53 +09:00
Sebastiaan van Stijn
869ccc01c1
Update Go to 1.17.3
go1.17.3 (released 2021-11-04) includes security fixes to the archive/zip and
debug/macho packages, as well as bug fixes to the compiler, linker, runtime, the
go command, the misc/wasm directory, and to the net/http and syscall packages.
See the Go 1.17.3 milestone on our issue tracker for details.

From the announcement e-mail:

[security] Go 1.17.3 and Go 1.16.10 are released

We have just released Go versions 1.17.3 and 1.16.10, minor point releases.
These minor releases include two security fixes following the security policy:

- archive/zip: don't panic on (*Reader).Open
  Reader.Open (the API implementing io/fs.FS introduced in Go 1.16) can be made
  to panic by an attacker providing either a crafted ZIP archive containing
  completely invalid names or an empty filename argument.
  Thank you to Colin Arnott, SiteHost and Noah Santschi-Cooney, Sourcegraph Code
  Intelligence Team for reporting this issue. This is CVE-2021-41772 and Go issue
  golang.org/issue/48085.
- debug/macho: invalid dynamic symbol table command can cause panic
  Malformed binaries parsed using Open or OpenFat can cause a panic when calling
  ImportedSymbols, due to an out-of-bounds slice operation.
  Thanks to Burak Çarıkçı - Yunus Yıldırım (CT-Zer0 Crypttech) for reporting this
  issue. This is CVE-2021-41771 and Go issue golang.org/issue/48990.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-11-05 12:46:33 +01:00
zounengren
a217b5ac8f bump CNI to spec v1.0.0
Signed-off-by: zounengren <zouyee1989@gmail.com>
2021-10-22 10:58:40 +08:00
Derek McGowan
d252a293df
Remove extra test_teardown
Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-10-08 13:08:13 -07:00
Derek McGowan
4a569c8894
Check the pid in cri test teardown
Prevent the test from failing when no pid is found
during teardown.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-10-08 13:06:18 -07:00
Derek McGowan
26ee1b1ee5
Merge pull request #4695 from crosbymichael/cri-class
[cri] Add CNI conf based on runtime class
2021-10-08 09:27:49 -07:00
Sebastiaan van Stijn
de1a39bf32
Update Go to 1.17.2
go1.17.2 (released 2021-10-07) includes a security fix to the linker and misc/wasm
directory, as well as bug fixes to the compiler, the runtime, the go command, and
to the time and text/template packages. See the Go 1.17.2 milestone on our issue
tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.17.2+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-10-08 15:26:34 +02:00
Adelina Tuvenie
9734b40393 Pin mingw to version 10.2.0
Signed-off-by: Adelina Tuvenie <atuvenie@cloudbasesolutions.com>
2021-10-04 16:44:31 +03:00
Adelina Tuvenie
d19af5afbf Update to golang 1.17.1
Signed-off-by: Adelina Tuvenie <atuvenie@cloudbasesolutions.com>
2021-10-04 16:44:22 +03:00
Adelina Tuvenie
3cb0ec01ec Install nssm
Signed-off-by: Adelina Tuvenie <atuvenie@cloudbasesolutions.com>
2021-10-04 16:44:06 +03:00
Phil Estes
5162238c7d
Merge pull request #5853 from claudiubelu/integration/windows-hostprocess
integration: Adds Windows HostProcess tests
2021-09-26 20:35:00 -04:00
Michael Crosby
55893b9be7 Add CNI conf based on runtime class
Signed-off-by: Michael Crosby <michael@thepasture.io>
2021-09-17 19:05:06 +00:00
Akihiro Suda
f700ae8732
CI: bump up crun to 1.0
Release notes: https://github.com/containers/crun/releases

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-09-15 14:45:06 +09:00
Michael Crosby
9954147c03
pin protobuild version to tag
Signed-off-by: Michael Crosby <michael@thepasture.io>
2021-09-09 15:26:25 -04:00
Claudiu Belu
f42513112f integration: Adds Windows HostProcess tests
Windows HostProcess containers can run containerized workloads on a Windows host.
These containers operate as normal processes but have access to the host network
namespace, storage, and devices when given the appropriate user privileges.

HostProcess containers support the ability to run as one of the following Windows
service accounts: LocalSystem, LocalService, NetworkService.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-09-07 00:30:28 -07:00
Akihiro Suda
3f8ea1b6a1
update runc binary to v1.0.2
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-08-23 23:24:10 +09:00
Kazuyoshi Kato
4dd5ca70fb 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>
2021-08-19 16:27:16 -07:00
Adelina Tuvenie
e6538b8bce Add trap to cri-integration test script
The cri-integration.sh script sets errexit option. This does not
work properly on Bash in Windows, espectially when the script is
piped to something else ( tee in this case ). In this particular
case, the problem arises from the fact that if the script exits
prematurely, it will not get a chance to call test_teardown and
thus clean the remaining containerd process, thus the whole
command will hang indefinetly.

Adding a simple trap on EXIT to call test_teardown will easily
fix this.

Signed-off-by: Adelina Tuvenie <atuvenie@cloudbasesolutions.com>
2021-08-10 13:37:05 +03:00
Sebastiaan van Stijn
42a28ad2ca
Update Go to 1.16.7
go1.16.7 (released 2021-08-05) includes a security fix to the net/http/httputil
package, as well as bug fixes to the compiler, the linker, the runtime, the go
command, and the net/http package. See the Go 1.16.7 milestone on the issue
tracker for details:

https://github.com/golang/go/issues?q=milestone%3AGo1.16.7+label%3ACherryPickApproved

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-07 18:07:50 +02:00
Maksym Pavlenko
10eab21a4d Cleanup CI
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-08-06 14:59:05 -07:00
Sebastiaan van Stijn
6c257552a7
scripts: declare ROOT closer to where it's used, and some DRY changes
This also prevents shellcheck from complaining about a possibly
undefined variable.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-03 17:27:03 +02:00
Sebastiaan van Stijn
dba0ef4eb5
scripts: add missing quotes, and minor linting issues
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-03 17:23:18 +02:00
Derek McGowan
2b9f8334c6
Merge pull request #5792 from dims/script-to-check-if-entries-in-go.mod-files-are-in-sync
Script to check if entries in go.mod files are in sync
2021-07-28 17:55:49 -07:00
Derek McGowan
0d93936507
Update protobuf install to use correct repository
The protobuf repository is under the protocolbuffers org

Signed-off-by: Derek McGowan <derek@mcg.dev>
2021-07-28 09:51:27 -07:00
Davanum Srinivas
43117cf919
Script to check if entries in go.mod files are in sync
- ensure that the root go.mod and the module specific go.mod have the
  same `require` and `replace` directives for different dependencies.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-07-27 17:52:32 -04:00
Sebastiaan van Stijn
18d6cc1b06
update gotestsum to v1.7.0
Same as previous commit, but a release was tagged;

1a94380793...v1.7.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-26 13:13:17 +02:00
Sebastiaan van Stijn
d2b6d192db
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>
2021-07-21 12:21:03 +02:00
Phil Estes
b809212b18
Merge pull request #5750 from thaJeztah/cleanup_test_dockerfile
Refactor / optimize contrib/Dockerfile.test
2021-07-20 10:33:55 -04:00
Phil Estes
1292c50fe9
Merge pull request #5754 from thaJeztah/update_gotestsum
update gotestsum to current master
2021-07-19 14:01:16 -04:00
Sebastiaan van Stijn
603962bc81
update gotestsum to current master
removes golang.org/x/cryto dependency:
full diff: 012a85e34a...1a94380793

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-19 10:00:02 +02:00
Akihiro Suda
43e0594ae9
update runc binary to v1.0.1
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-07-18 20:18:14 +09:00
Sebastiaan van Stijn
546538971c
install-critools: make sure DESTDIR exists
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-17 14:00:58 +02:00
Akihiro Suda
e72046f86b
Update Go to 1.16.6
Release notes: https://golang.org/doc/devel/release#go1.16

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-07-13 14:05:37 +09:00
Maksym Pavlenko
7eceeb950b
Merge pull request #5571 from adelina-t/win_set_specific_go_version
Install specific golang version in Windows CI.
2021-07-02 14:54:58 -07:00
Akihiro Suda
28bb59c080 update runc binary to v1.0.0 GA
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-06-22 10:26:46 -04:00
Brian Goff
bfbebf02b7 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>
2021-06-16 16:17:40 +00:00
Adelina Tuvenie
419d616fec Install specific golang version in Windows CI.
For Periodic Windows runs we installed the latest available golang version.
It seems 1.16.5 is creating problems with go.sum. We now introduce the
ability to install specific versions for required packages when preparing
the testing env.

Signed-off-by: Adelina Tuvenie <atuvenie@cloudbasesolutions.com>
2021-06-07 15:17:02 +03:00
Claudiu Belu
2f870aa896 integration: Cleanup containerd on test teardown
On Windows, we were only killing the keepalive process, and the
containerd process would keep running.

keepalive and containerd have the same PGID, so we can use that information
to kill both of them.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-06-01 15:22:43 +00:00
Derek McGowan
334e74765e
Merge pull request #5165 from adelina-t/azure_ci_workflow
Add CI periodic Windows Jobs.
2021-05-28 08:12:25 -07:00
Akihiro Suda
599127f4df
update runc binary to v1.0.0-rc95
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-05-19 19:18:59 +09:00
Claudiu Belu
09a0c9471b tests: Adds support for Windows cri-integration tests
Currently, the cri-integration tests do not work on Windows due to various reasons.
One of the reasons is because all the tests are using Linux-specific images.
Previous commits refactored the image pulling / usage in the cri-integration tests,
making it easier to update, and easier to configure a custom registry to pull images
with Windows support.

For Windows runs, custom registries can be created, which will also contain Windows
images, and the cri-integration tests can be configured to use those registries by
specifying the "--repo-list" argument, a YAML file which will contain an alternative
mapping of the default registries. This is similar to how E2E tests are handled for
Windows runs in Kubernetes.

Some of the tests are Skipped, as they do not pass yet on Windows.

Windows does not collect inodes used stats, thus, the tests that were expecting non-zero
inodes stats were failing.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-05-14 11:27:35 +00:00
Mike Brown
3157392513 just release ctd-decoder not ctr-enc
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-05-13 15:56:45 -05:00
Davanum Srinivas
5c99f150ae
Update the runc binary used with containerd to runc v1.0.0-rc94
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-05-10 13:11:07 -04:00
Derek McGowan
1ecc98f1de
Merge pull request #5462 from mikebrow/correct-critools-release
update to new cri-tools make install
2021-05-07 13:05:13 -07:00
Mike Brown
c74a6c4194 update to new cri-tools make install
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-05-07 12:45:24 -05:00
Mike Brown
b56527cb7e update seccomp version
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-05-03 19:36:16 -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
Derek McGowan
f0b4258904
Merge pull request #5429 from cpuguy83/fix_libseccomp_cc
Specify seccomp target arch for CC
2021-04-28 12:00:04 -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
Claudiu Belu
5847340a7d tests: Refactors container image usage
Currently, the cri-integration tests do not work on Windows due to various reasons.
One of the reasons is because all the tests are using Linux-specific images. This
commit refactors the image pulling / usage in the cri-integration tests, making it
easier to update, and easier to configure the a custom registry to pull those images
from.

For Windows runs, custom registries can be created, which will also contain Windows
images, and the cri-integration tests can be configured to use those registries by
specifying the "--image-list" argument, a TOML file which will contain an alternative
mapping of the default images.

Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-04-27 08:44:21 +00:00
Adelina Tuvenie
421fc6ea73 Add CI periodic Windows Jobs.
Signed-off-by: Adelina Tuvenie <atuvenie@cloudbasesolutions.com>
2021-04-20 17:18:46 +03: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
Davanum Srinivas
9ad087947d
Switch all our tests to version 2
Also warn when someone uses version 1

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-04-12 13:18:33 -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