Commit Graph

639 Commits

Author SHA1 Message Date
Kazuyoshi Kato
f1162b77a3
Merge pull request #7663 from lucacome/bump-k8s-deps
Bump k8s.io deps to v0.25.4
2022-11-14 12:09:56 -08:00
Luca Comellini
38ad785cef
Bump k8s.io deps to v0.25.4
Signed-off-by: Luca Comellini <luca.com@gmail.com>
2022-11-11 15:13:35 -08:00
Luca Comellini
bd66f588bf
Bump OpenTelemetry contrib to v0.36.4
Signed-off-by: Luca Comellini <luca.com@gmail.com>
2022-11-11 15:10:38 -08:00
Luca Comellini
b829e6f2d3
Bump OpenTelemetry to v1.11.1
Signed-off-by: Luca Comellini <luca.com@gmail.com>
2022-11-10 22:15:10 -08:00
Fu Wei
b5253df3ed
Merge pull request #7643 from lucacome/bump-grpc
Bump grpc to v1.50.1
2022-11-11 11:26:18 +08:00
Kazuyoshi Kato
02484f5e05
Merge pull request #7631 from thaJeztah/strings_cut
replace strings.Split(N) for strings.Cut() or alternatives
2022-11-10 15:28:22 -08:00
Luca Comellini
ab194e65f9
Bump grpc to v1.50.1
Signed-off-by: Luca Comellini <luca.com@gmail.com>
2022-11-09 18:30:31 -08:00
AdamKorcz
b742aa2e77 fuzzing: bump go-fuzz-headers
Signed-off-by: AdamKorcz <adam@adalogics.com>
2022-11-09 14:30:30 +00:00
Luca Comellini
202abf8fc1
Bump k8s.io deps to v0.25.3
Signed-off-by: Luca Comellini <luca.com@gmail.com>
2022-11-07 15:30:06 -08:00
Sebastiaan van Stijn
eaedadbed0
replace strings.Split(N) for strings.Cut() or alternatives
Go 1.18 and up now provides a strings.Cut() which is better suited for
splitting key/value pairs (and similar constructs), and performs better:

```go
func BenchmarkSplit(b *testing.B) {
        b.ReportAllocs()
        data := []string{"12hello=world", "12hello=", "12=hello", "12hello"}
        for i := 0; i < b.N; i++ {
                for _, s := range data {
                        _ = strings.SplitN(s, "=", 2)[0]
                }
        }
}

func BenchmarkCut(b *testing.B) {
        b.ReportAllocs()
        data := []string{"12hello=world", "12hello=", "12=hello", "12hello"}
        for i := 0; i < b.N; i++ {
                for _, s := range data {
                        _, _, _ = strings.Cut(s, "=")
                }
        }
}
```

    BenchmarkSplit
    BenchmarkSplit-10            8244206               128.0 ns/op           128 B/op          4 allocs/op
    BenchmarkCut
    BenchmarkCut-10             54411998                21.80 ns/op            0 B/op          0 allocs/op

While looking at occurrences of `strings.Split()`, I also updated some for alternatives,
or added some constraints; for cases where an specific number of items is expected, I used `strings.SplitN()`
with a suitable limit. This prevents (theoretical) unlimited splits.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-11-07 10:02:25 +01:00
Swagat Bora
3b87d46ce2 Add tracing spans in CRI image service and pull.go
Signed-off-by: Swagat Bora <sbora@amazon.com>

Add spans around image unpack operations
Use image.ref to denote image name and image.id for the image config digest
Add top-level spand and record errors in the CRI instrumentation service
2022-11-03 17:03:43 +00:00
Akihiro Suda
30c3078ae4
go.mod: golang.org/x/*: use tagged versions
golang.org/x/oauth2 is not updated due to its complex dependencies

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-11-03 10:18:31 +09:00
Samuel Karp
d577ef872a
Merge pull request #7537 from swagatbora90/fix-client-wait-start 2022-10-26 18:31:19 -07:00
Fu Wei
9b54eee718
Merge pull request #7419 from bart0sh/PR005-configure-CDI-registry-on-start 2022-10-22 08:17:33 +08:00
Swagat Bora
727b33c710 Retry client connection in waitForStart
Signed-off-by: Swagat Bora <sbora@amazon.com>
2022-10-19 16:24:07 +00:00
AdamKorcz
9a8611d635 bump go-fuzz-headers
Signed-off-by: AdamKorcz <adam@adalogics.com>
2022-10-19 00:13:07 +01:00
Samuel Karp
e8cdbee1e6
Merge pull request #7530 from kzys/critest-ginkgo-v2 2022-10-18 11:41:34 -07:00
Phil Estes
4fdebea98b
Merge pull request #7522 from thaJeztah/protobuf_extensions_tag
go.mod: matttproud/golang_protobuf_extensions v1.0.2 (use tag)
2022-10-17 09:55:36 -07:00
Kazuyoshi Kato
8e7ef890a5 Use logtest if possible to clean up logs
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-10-17 16:27:23 +00:00
Sebastiaan van Stijn
6a07a1c070
go.mod: matttproud/golang_protobuf_extensions v1.0.2 (use tag)
it's the same commit: https://github.com/matttproud/golang_protobuf_extensions/compare/v1.0.2...c182affec369

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-17 00:56:34 +02:00
Sebastiaan van Stijn
f9c80be1bb
remove unneeded nolint-comments (nolintlint), disable deprecated linters
Remove nolint-comments that weren't hit by linters, and remove the "structcheck"
and "varcheck" linters, as they have been deprecated:

    WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
    WARN [runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter.  Replaced by unused.
    WARN [linters context] structcheck is disabled because of generics. You can track the evolution of the generics support by following the https://github.com/golangci/golangci-lint/issues/2649.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-12 14:41:01 +02:00
Sebastiaan van Stijn
29c7fc9520
clean-up "nolint" comments, remove unused ones
- fix "nolint" comments to be in the correct format (`//nolint:<linters>[,<linter>`
  no leading space, required colon (`:`) and linters.
- remove "nolint" comments for errcheck, which is disabled in our config.
- remove "nolint" comments that were no longer needed (nolintlint).
- where known, add a comment describing why a "nolint" was applied.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-12 14:40:59 +02:00
Ed Bartosh
347397cf2f update go.mod and go.sum
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2022-10-12 14:00:59 +03:00
Kevin Parsons
e6b5311508
Merge pull request #7483 from jterry75/jterry75/update_image_config_argsescaped
Updates oci image config to support upstream ArgsEscaped
2022-10-11 16:32:31 -07:00
Justin Terry
d4b9dade13 Updates oci image config to support upstream ArgsEscaped
ArgsEscaped has now been merged into upstream OCI image spec.
This change removes the workaround we were doing in containerd
to deserialize the extra json outside of the spec and instead
just uses the formal spec types.

Signed-off-by: Justin Terry <jlterry@amazon.com>
2022-10-11 13:29:56 -07:00
Phil Estes
9b0ab84449
Merge pull request #7481 from qiutongs/netns-fix
Update container with sandbox metadata after NetNS is created
2022-10-10 15:48:54 -07:00
Qiutong Song
b41d6f40bb Update container with sandbox metadata after NetNS is created
Signed-off-by: Qiutong Song <songqt01@gmail.com>
2022-10-09 01:14:08 +00:00
Kazuyoshi Kato
260af5e1d2 TestTaskResize must use a terminal
The test was essentially no-op since it didn't use a terminal.

Fixes #6249.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-10-08 01:39:27 +00:00
Sebastiaan van Stijn
e2d8f3859a
vendor: github.com/opencontainers/selinux v1.10.2
full diff: https://github.com/opencontainers/selinux/compare/v1.10.1...v1.10.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-10-05 22:33:35 +02:00
Derek McGowan
1cc38f8df7
Merge pull request #5904 from qiutongs/ip-leakage-fix 2022-09-29 18:14:35 -07:00
Daniel Canter
acb2964d65 go.mod: Bump go-winio to v0.6.0
Some minor improvements, but biggest for here is ErrPipeListenerClosed
is no longer an errors.New where the string matches the text of the now
exported net.ErrClosed in the stdlib, but is just assigned to net.ErrClosed
directly. This should allow us to get rid of the string check for "use of closed
network connection" here now..

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2022-09-28 10:30:38 -07:00
Qiutong Song
4196fad027 Add integration tests with failpoint
Signed-off-by: Qiutong Song <songqt01@gmail.com>
2022-09-27 14:45:18 +00:00
Brian Goff
b4558bedc6 Add test flag for skipping shim cgroup test
For some shims (namely github.com/cpuguy83/containerd-shim-systemd-v1),
the shim cgroup test doesn't make sense since there is only a single
shim process for the entire node.

I use these integration tests to make sure the shim is compatible with
the runc shims and generally works as expected. This will let me skip
the shim cgroup test as there is no process for the shim to stick into
the cgroup... mostly.
There is a bootstrap process as well as a PTY copier proces which do use
the shim cgroup if provided, but the test is not able to check for
those (unless we enable tty on the test, which is a bit arbitrary and
not useful).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2022-09-23 17:39:04 +00:00
Fu Wei
e94e5b7fb4
Merge pull request #7397 from kzys/remove-deps
Upgrade fuzzing-related packages to reduce dependencies
2022-09-19 23:13:44 +08:00
Kazuyoshi Kato
f0fbc8dfdc Upgrade fuzzing-related packages to reduce dependencies
github.com/AdaLogics/go-fuzz-headers and
github.com/AdamKorcz/go-118-fuzz-build have less dependencies in
the last versions.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-09-15 23:25:03 +00:00
Tiger Kaovilai
524d3aca80 github.com/emicklei/go-restful CWE-285: Improper Authorization
https://security.snyk.io/vuln/SNYK-GOLANG-GITHUBCOMEMICKLEIGORESTFUL-2435653
Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
2022-09-14 14:38:00 -04:00
Fu Wei
99ee82d0b6
Merge pull request #7374 from soulseen/update-cdi-version 2022-09-07 13:37:41 +08:00
xiaoyang zhu
829dd2145f update cdi version to v0.5.1
Signed-off-by: xiaoyang zhu <zhuxiaoyang1996@gmail.com>
2022-09-07 09:34:55 +08:00
Sebastiaan van Stijn
0f743ce4ff
vendor: golang.org/x/net v0.0.0-20220906165146-f3363e06e74c
Update to the latest version that contains a fix for CVE-2022-27664;
f3363e06e7

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-09-06 22:46:21 +02:00
Kazuyoshi Kato
d99e62d8e5
Merge pull request #7367 from thaJeztah/cleanup_todo_comment
integration: TestUpdateContainerResources_MemoryLimit: remove TODO comment
2022-09-06 08:38:10 -07:00
lengrongfu
3c0e6c40ad feat: upgrade registry.k8s.io/pause version
Signed-off-by: rongfu.leng <1275177125@qq.com>
2022-09-06 15:59:20 +08:00
Sebastiaan van Stijn
e041d1a2c1
integration: TestUpdateContainerResources_MemoryLimit: remove TODO comment
This comment was added in 09a0c9471b when the
Windows integration tests were enabled. The PR (microsoft/hcsshim#931) was
merged, and part of hcsshim v0.9.0, and support for resource limits on Windows
was added in 2bc77b8a28, so it looks like this
comment is no longer current.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-09-05 09:52:29 +02:00
Samuel Karp
1bb39b833e
Merge pull request #7346 from kzys/fuzz-enable 2022-08-30 22:33:43 -07:00
Fu Wei
3b569fabeb
Merge pull request #7335 from thaJeztah/move_sys_forceremoveall 2022-08-31 07:35:36 +08:00
Kazuyoshi Kato
17e436c20c Pin github.com/AdamKorcz/go-118-fuzz-build
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-08-30 17:39:45 +00:00
Phil Estes
455127859b
Merge pull request #7342 from tklauser/losetup-unix
Use ioctl helpers from x/sys/unix
2022-08-30 12:32:20 -04:00
Sebastiaan van Stijn
2e677c9329
sys: move ForceRemoveAll to integration/client
ForceRemoveAll was only used in tests/fuzzing, but added hcsshim as dependency
for the sys package. Moving this to integration/client makes the "sys" package
slightly more lightweight, and may help simplifying dependency-management.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-30 17:39:18 +02:00
Tobias Klauser
0c6553bfda
go.mod, vendor: bump golang.org/x/sys to latest version
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2022-08-30 10:38:20 +02:00
Sebastiaan van Stijn
93342d637c
replace sys Sequential funcs with moby/sys/sequential
These functions were originally copied from the docker / moby repository in
4a7a8efc2d. Migrating these functions to use the
github.com/moby/sys/sequential module allows them being shared between moby,
docker/cli, and containerd, and to allow using them without importing all of sys
which also depends on hcsshim and more.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-29 18:36:34 +02:00
Phil Estes
91b9e5a00d
Merge pull request #7315 from AkihiroSuda/runc-1.1.4
update runc binary to v1.1.4
2022-08-26 09:39:59 -04:00
Fu Wei
0e7ff59098
Merge pull request #7325 from kzys/upgrade-compress 2022-08-26 21:23:00 +08:00
Kazuyoshi Kato
d063597e80 Upgrade github.com/klauspost/compress from v1.11.13 to v1.15.9
The package has multiple improvements and bug fixes.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-08-25 22:58:16 +00:00
Akihiro Suda
eb664aed0c
go.mod: github.com/opencontainers/runc v1.1.4
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-08-26 07:51:16 +09:00
zounengren
331066f87d update intergration
Signed-off-by: zounengren <zouyee1989@gmail.com>
2022-08-25 21:17:59 +08:00
Samuel Karp
36d0cfd0fd
Merge pull request #6517 from ruiwen-zhao/return-resource 2022-08-24 14:01:30 -07:00
Samuel Karp
8ce32aedd8
Merge pull request #7038 from pacoxu/registry-change 2022-08-24 13:04:13 -07:00
ruiwen-zhao
b7b1200dd3 ContainerStatus to return container resources
Signed-off-by: ruiwen-zhao <ruiwen@google.com>
2022-08-24 19:08:06 +00:00
Paco Xu
9525b3148a migrate from k8s.gcr.io to registry.k8s.io
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2022-08-24 13:46:46 +08:00
Kazuyoshi Kato
f318947b06 Do not rename test files on-the-fly to share functions
Instead this commit moves some functions that could be used by fuzzers.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-08-19 03:48:18 +00:00
Kazuyoshi Kato
470d3ee057 Upgrade containerd/cgroups to remove github.com/cilium/ebpf's fuzzer
The fuzzer is broken and it breaks OSS-Fuzz according to #7288.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-08-17 21:43:45 +00:00
Daniel Canter
0950447106 Remove Windows special case in TestContainerdRestart
Previously in the Windows shim, killing a task that has already exited
or a task that has not yet been started, yielded an ErrNotFound. We now
return nil, which is in line with how the linux runtime behaves, so remove
the special case we had in TestContainerdRestart for this.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2022-08-15 17:03:45 -07:00
Daniel Canter
1f8db2467b go.mod: Bump hcsshim to v0.10.0-rc.1
This contains quite a bit (also bumps google/uuid to 1.3.0). Some HostProcess
container improvements to get ready for whenever it goes to stable in
Kubernetes, Hyper-V (windows) container support for CRI, and a plethora of
other small additions and fixes.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2022-08-15 17:03:45 -07:00
ruiwen-zhao
6e4b6830f1 Update CRI-API
Signed-off-by: ruiwen-zhao <ruiwen@google.com>
2022-08-10 03:55:51 +00:00
Maksym Pavlenko
ca3b9b50fe Run gofmt 1.19
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-08-04 18:18:33 -07:00
Maksym Pavlenko
01a2b793b8
Merge pull request #7228 from mxpv/sb2
Initial sandbox API CRI integration.
2022-08-04 17:46:38 -07:00
Maksym Pavlenko
f51014f8d5 Add sandbox to in memory services
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-07-29 16:08:07 -07:00
Daniel Canter
b16c3e9adf Windows HostProcess container CRI stats test
Add a test to the CRI suite to validate stats functions for hostprocess
containers. hcsshim v0.9.3 had a bug in stats collection so this is
mainly for sanity and to avoid another regression.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2022-07-27 15:45:37 -07:00
Fu Wei
5ce1e46fa4
Merge pull request #7215 from Jenkins-J/ppc64le-cri-test-fix
Fix CRI image pull timeout test for ppc64le
2022-07-27 23:48:56 +08:00
Derek McGowan
6acde90772
Merge pull request #7069 from fuweid/failpoint-in-runc-shimv2
test: introduce failpoint control to runc-shimv2 and cni
2022-07-26 23:12:20 -07:00
Phil Estes
584110f0b6
Merge pull request #7210 from mxpv/image-list
Use image lists form integration/client tests
2022-07-26 12:09:41 -04:00
Maksym Pavlenko
2b92c70fa4 Fix command line parsing for image list
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-07-25 14:19:40 -07:00
Daniel Canter
14003683f0 go.mod: Bump hcsshim to v0.9.4
This tag contains some fixes for hostprocess containers, mainly around
fixing task stats which regressed from a change in v0.9.3.

https://github.com/microsoft/hcsshim/releases/tag/v0.9.4

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2022-07-25 13:24:34 -07:00
James Jenkins
1e0698e8e8 Fix CRI image pull timeout test for ppc64le
The ghcr.io/containerd/registry:2.7 image does not support the ppc64le
architecture, causing the TestCRIImagePullTimeout tests to fail when
executed on a ppc64le device.

Replace the ghcr.io/containerd/registry:2.7 image name and index with
the ghcr.io/containerd/volume-ownership:2.1 image and index in the
HoldingContentOpenWriter test.

Change the image pulled in the NoDataTransferred test to the
ghcr.io/containerd/volume-ownership:2.1 image.

Signed-off-by: James Jenkins <James.Jenkins@ibm.com>
2022-07-25 16:11:42 -04:00
Daniel Canter
c15d8e1560 go.mod: Bump hcsshim to 0.9.3
This tag brings in a new field to fix an HNS issue in ws2019 as well as
an optimization for collecting Windows stats (memory, cpu, iops).

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2022-07-25 13:03:39 -07:00
Maksym Pavlenko
a9514da757 Update image references for Windows tests
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-07-25 11:04:59 -07:00
Maksym Pavlenko
2ae5f405d2 Use image lists instead of hardcoded images
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-07-25 10:54:17 -07:00
Maksym Pavlenko
552d763447 Use image lists in client tests
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-07-25 10:47:00 -07:00
Wei Fu
e6a2c07902 integration: simplify CNI-fp and add README.md
* Use delegated plugin call to simplify cni-bridge-cni
* Add README.md for cni-bridge-cni

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-07-24 11:45:45 +08:00
Jeff Widman
050cd58ce6 Drop deprecated ioutil
`ioutil` has been deprecated by golang. All the code in `ioutil` just
forwards functionality to code in either the `io` or `os` packages.

See https://github.com/golang/go/pull/51961 for more info.

Signed-off-by: Jeff Widman <jeff@jeffwidman.com>
2022-07-23 08:36:20 -07:00
Maksym Pavlenko
500ff95f02 Make getServicesOpts a helper
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-07-22 19:38:45 -07: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
Wei Fu
be91a219c2 integration: CNI bridge wrapper with failpoint
Introduce cni-bridge-fp as CNI bridge plugin wrapper binary for CRI
testing.

With CNI `io.kubernetes.cri.pod-annotations` capability enabled, the user
can inject the failpoint setting by pod's annotation
`cniFailpointControlStateDir`, which stores each pod's failpoint setting
named by `${K8S_POD_NAMESPACE}-${K8S_POD_NAME}.json`.

When the plugin is invoked, the plugin will check the CNI_ARGS to get
the failpoint for the CNI_COMMAND from disk. For the testing, the user
can prepare setting before RunPodSandbox.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-07-22 23:25:40 +08:00
Wei Fu
5f9b318e50 bin/ctr,integration: new runc-shim with failpoint
Added new runc shim binary in integration testing.

The shim is named by io.containerd.runc-fp.v1, which allows us to use
additional OCI annotation `io.containerd.runtime.v2.shim.failpoint.*` to
setup shim task API's failpoint. Since the shim can be shared with
multiple container, like what kubernetes pod does, the failpoint will be
initialized during setup the shim server. So, the following the
container's OCI failpoint's annotation will not work.

This commit also updates the ctr tool that we can use `--annotation` to
specify annotations when run container. For example:

```bash
➜  ctr run -d --runtime runc-fp.v1 \
     --annotation "io.containerd.runtime.v2.shim.failpoint.Kill=1*error(sorry)" \
     docker.io/library/alpine:latest testing sleep 1d

➜  ctr t ls
TASK       PID       STATUS
testing    147304    RUNNING

➜  ctr t kill -s SIGKILL testing
ctr: sorry: unknown

➜  ctr t kill -s SIGKILL testing

➜  sudo ctr t ls
TASK       PID       STATUS
testing    147304    STOPPED
```

The runc-fp.v1 shim is based on core runc.v2. We can use it to inject
failpoint during testing complicated or big transcation API, like
kubernetes PodRunPodsandbox.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-07-22 23:25:40 +08:00
Derek McGowan
1455926416
Merge pull request #7114 from kinvolk/rata/userns-cri
Update k8s.io/cri-api to v0.25.0-alpha2
2022-07-20 13:06:58 -07:00
Akihiro Suda
f6bc986dc1
go.mod: github.com/stretchr/testify v1.8.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-07-20 08:36:10 +09:00
Derek McGowan
681aaf68b7
Merge pull request #7123 from kzys/fuzz
Copy fuzzers from github.com/cncf/cncf-fuzzing
2022-07-06 14:52:28 -07:00
Kazuyoshi Kato
b316318596 Upgrade github.com/AdaLogics/go-fuzz-headers
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-07-06 15:21:45 +00:00
Ikko Ashimine
6d4b61007b integration/client: fix typo in export_test.go
Seet -> Seek
begining -> beginning

Signed-off-by: Ikko Ashimine <eltociear@gmail.com>
2022-07-06 11:14:45 +09:00
Rodrigo Campos
b8403d2e15 Update k8s.io/cri-api to v0.25.0-alpha2
This version contains the CRI changes for user namespaces support.
Future patches will use the new fields in the CRI.

Updating the module without using the new fields doesn't cause any
behaviour change.

Updates: #7063

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2022-06-30 12:09:08 +02:00
Phil Estes
a44cabf517
Update go-restful/v3 to latest release
Signed-off-by: Phil Estes <estesp@amazon.com>
2022-06-29 15:23:10 -04:00
Kazuyoshi Kato
f7de1c8f90 Do not hardcode fuzzers
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-06-27 22:54:25 +00:00
Kazuyoshi Kato
2b60770c4b Move container_fuzzer.go under integration/client/
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-06-27 22:54:25 +00:00
Derek McGowan
99e210c50a
Move metadata plugin registration to seperate package
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-06-22 17:38:41 -07: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
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
Akihiro Suda
c3fb7dfa7f
go.mod: github.com/moby/sys/mountinfo v0.6.2
https://github.com/moby/sys/compare/mountinfo/v0.6.0...mountinfo/v0.6.2

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-06-08 13:25:08 +09:00
Kazuyoshi Kato
0532f666f6
Merge pull request #7027 from AkihiroSuda/containerd-cgroup-1.0.4
go.mod: github.com/containerd/cgroups v1.0.4
2022-06-07 20:10:33 -07:00
Akihiro Suda
5a6e4144ac
go.mod: github.com/containerd/cgroups v1.0.4
https://github.com/containerd/cgroups/compare/v1.0.3...v1.0.4

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-06-07 17:15:21 +09:00
Akihiro Suda
088c8df3ac
go.mod: github.com/containerd/continuity v0.3.0
https://github.com/containerd/continuity/compare/v0.2.2...v0.3.0

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-06-07 17:14:08 +09:00
Daniel Canter
44e12dc5d8 Windows snapshotter touch ups and new functionality
This change does a couple things to remove some cruft/unused functionality
in the Windows snapshotter, as well as add a way to specify the rootfs
size in bytes for a Windows container via a new field added in the CRI api in
k8s 1.24. Setting the rootfs/scratch volume size was assumed to be working
prior to this but turns out not to be the case.

Previously I'd added a change to pass any annotations in the containerd
snapshot form (containerd.io/snapshot/*) as labels for the containers
rootfs snapshot. This was added as a means for a client to be able to provide
containerd.io/snapshot/io.microsoft.container.storage.rootfs.size-gb as an
annotation and have that be translated to a label and ultimately set the
size for the scratch volume in Windows. However, this actually only worked if
interfacing with the CRI api directly (crictl) as Kubernetes itself will
fail to validate annotations that if split by "/" end up with > 2 parts,
which the snapshot labels will (containerd.io / snapshot / foobarbaz).

With this in mind, passing the annotations and filtering to
containerd.io/snapshot/* is moot, so I've removed this code in favor of
a new `snapshotterOpts()` function that will return platform specific
snapshotter options if ones exist. Now on Windows we can just check if
RootfsSizeInBytes is set on the WindowsContainerResources struct and
then return a snapshotter option that sets the right label.

So all in all this change:
- Gets rid of code to pass CRI annotations as labels down to snapshotters.

- Gets rid of the functionality to create a 1GB sized scratch disk if
the client provided a size < 20GB. This code is not used currently and
has a few logical shortcomings as it won't be able to create the disk
if a container is already running and using the same base layer. WCIFS
(driver that handles the unioning of windows container layers together)
holds open handles to some files that we need to delete to create the
1GB scratch disk is the underlying problem.

- Deprecates the containerd.io/snapshot/io.microsoft.container.storage.rootfs.size-gb
label in favor of a new containerd.io/snapshot/windows/rootfs.sizebytes label.
The previous label/annotation wasn't being used by us, and from a cursory
github search wasn't being used by anyone else either. Now that there is a CRI
field to specify the size, this should just be a field that users can set
on their pod specs and don't need to concern themselves with what it eventually
gets translated to, but non-CRI clients can still use the new label/deprecated
label as usual.

- Add test to cri integration suite to validate expanding the rootfs size.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2022-06-06 14:57:07 -07:00
Kazuyoshi Kato
8bf5995e12
Merge pull request #7018 from lucacome/bump-grpc
Bump grpc to v1.47.0
2022-06-06 10:04:10 -07:00
Luca Comellini
8bc6ccc073
Bump k8s.io deps to v0.24.1
Signed-off-by: Luca Comellini <luca.com@gmail.com>
2022-06-02 15:26:54 -07:00
Luca Comellini
5fcde823dd
Bump grpc to v1.47.0
Signed-off-by: Luca Comellini <luca.com@gmail.com>
2022-06-02 15:25:37 -07:00
Fu Wei
aa0aaa4947
Merge pull request #7009 from mikebrow/update-gocni 2022-06-02 11:09:46 +08:00
Mike Brown
e3b4d750db update go-cni/for cni update fixing plugins that don't respond with version
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2022-06-01 17:20:18 -05:00
Kazuyoshi Kato
c149e6c2ea
Merge pull request #6996 from dcantah/hpc-validations
Add validations for Windows HostProcess CRI configs
2022-06-01 11:37:12 -07:00
Paco Xu
1cf6f20320 promote pause image to 3.7
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2022-05-30 15:08:28 +08:00
Daniel Canter
978ff393d2 Add validations for Windows HostProcess CRI configs
HostProcess containers require every container in the pod to be a
host process container and have the corresponding field set. The Kubelet
usually enforces this so we'd error before even getting here but we recently
found a bug in this logic so better to be safe than sorry.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2022-05-27 21:17:07 -07:00
Sebastiaan van Stijn
5bb47fb956
vendor: github.com/urfave/cli v1.22.9
The regression in v1.22.2 has been resolved, so we can drop the
replace rule and use the latest v1.22.x version.

full diff: https://github.com/urfave/cli/compare/v1.22.1...v1.22.9

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-27 13:05:54 +02:00
Phil Estes
133978f893
Merge pull request #6932 from lucacome/bump-otel-deps
Bump OpenTelemetry dependencies
2022-05-12 19:28:35 +01:00
Sebastiaan van Stijn
c4ce13a282
vendor: github.com/opencontainers/runc v1.1.2
no changes in vendored code

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-12 13:40:43 +02:00
Luca Comellini
c1140aef65
Bump OpenTelemetry dependencies
Signed-off-by: Luca Comellini <luca.com@gmail.com>
2022-05-11 18:03:09 -07:00
Daniel Canter
d1c49781ed go.mod: Bump k8s deps to v0.24.0
This ends up bumping the prometheus client as well.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2022-05-06 13:37:15 -07:00
Kazuyoshi Kato
7a834516f6 Share images between TestRestartMonitor and TestRestartMonitorWithOnFailurePolicy
These tests are launching containerd and pulling busybox there, while
other tests are using busybox from TestMain().

This commit shares busybox at least between TestRestartMonitor and
TestRestartMonitorWithOnFailurePolicy to reduce the chance of
throttling from ghcr.io.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-05-04 16:50:19 +00:00
Kazuyoshi Kato
8160a3efc3 Reduce the number of the concurrent HTTP requests in TestUserNamespaces
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-29 22:51:39 +00:00
Kazuyoshi Kato
7183fc81d2 Skip TestImagePullWithConcurrencyLimit on Cirrus CI
This test tends to fail under Cirrus CI + Vagrant. Skipping for now
since running the test on GitHub Actions would be suffice.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-29 22:14:24 +00:00
Michael Zappa
5d0730370d Update go-cni to v1.1.5
Signed-off-by: Michael Zappa <Michael.Zappa@stateless.net>
2022-04-27 16:27:10 -06:00
Kazuyoshi Kato
cb84b5a1d2
Merge pull request #6865 from log1cb0mb/bump-opencontainers/selinux-to-v1.10.1
Bump opencontainers/selinux from 1.10.0 to 1.10.1
2022-04-27 14:46:21 -07:00
log1cb0mb
ae29594d0b Bump opencontainers/selinux from 1.10.0 to 1.10.1
Signed-off-by: Nabeel Rana <nabeelnrana@gmail.com>
2022-04-27 22:55:25 +03:00
Kazuyoshi Kato
7f23296b99 Upgrade google.golang.org/grpc and google.golang.org/protobuf
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-27 17:25:02 +00:00
Kazuyoshi Kato
7353006f69 Remove kzys/typeurl
I forgot to remove my fork from integration/client/go.mod.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-27 17:16:51 +00:00
Derek McGowan
6e0231f992
Merge pull request #6150 from fuweid/support-4984
feature: support image pull progress timeout
2022-04-26 12:15:09 -07:00
Wei Fu
00d102da9f feature: support image pull progress timeout
Kubelet sends the PullImage request without timeout, because the image size
is unknown and timeout is hard to defined. The pulling request might run
into 0B/s speed, if containerd can't receive any packet in that connection.
For this case, the containerd should cancel the PullImage request.

Although containerd provides ingester manager to track the progress of pulling
request, for example `ctr image pull` shows the console progress bar, it needs
more CPU resources to open/read the ingested files to get status.

In order to support progress timeout feature with lower overhead, this
patch uses http.RoundTripper wrapper to track active progress. That
wrapper will increase active-request number and return the
countingReadCloser wrapper for http.Response.Body. Each bytes-read
can be count and the active-request number will be descreased when the
countingReadCloser wrapper has been closed. For the progress tracker,
it can check the active-request number and bytes-read at intervals. If
there is no any progress, the progress tracker should cancel the
request.

NOTE: For each blob data, the containerd will make sure that the content
writer is opened before sending http request to the registry. Therefore, the
progress reporter can rely on the active-request number.

fixed: #4984

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-04-27 00:02:27 +08:00
Derek McGowan
3dbd6a2498
Merge pull request #6841 from kzys/proto-upgrade-6
Migrate off from github.com/gogo/protobuf
2022-04-25 15:12:51 -07:00
Kazuyoshi Kato
2ca54ee8ae
Merge pull request #6180 from claudiubelu/integration/windows-ip-leak
integration: Adds Windows equivalent for TestSandboxRemoveWithoutIPLeakage
2022-04-25 11:27:31 -07:00
Kazuyoshi Kato
aefd1849b6 go mod tidy and go mod vendor
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-22 15:41:05 +00:00
Kazuyoshi Kato
f616dd471e Upgrade containerd/typeurl
https://github.com/containerd/typeurl/pull/35 is needed to handle
types generated by protoc-gen-go.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-22 15:40:56 +00:00
Kazuyoshi Kato
1a095e18ba Rename Size_ to Size
Previouslty "Size" was reserved by protoc-gen-gogoctrd and user-generated
"Size" was automatically renamed to "Size_" to avoid conflicts.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-22 15:31:53 +00:00
Kazuyoshi Kato
e044759ebd Upgrade containerd/ttrpc
protoc-gen-go-ttrpc's generated Go code doesn't work with ttrpc v1.1.0.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-22 15:31:52 +00:00
Kazuyoshi Kato
dfa6e8763e diff: hide types.Any from clients
This commit hides types.Any from the diff package's interface. Clients
(incl. imgcrypt) shouldn't aware about gogo/protobuf.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-21 13:43:20 +00:00
Derek McGowan
902212651b
Merge pull request #6826 from kzys/ptypes
Consolidate gogo/protobuf dependencies under our own protobuf package
2022-04-19 10:13:56 -07:00
Fu Wei
9503d7219e
Merge pull request #6744 from Junnplus/restart-policy
Add restart policy for enhanced restart manager
2022-04-20 00:12:31 +08:00
Kazuyoshi Kato
88c0c7201e Consolidate gogo/protobuf dependencies under our own protobuf package
This would make gogo/protobuf migration easier.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-19 15:53:36 +00:00
Kazuyoshi Kato
80b825ca2c Remove gogoproto.stdtime
This commit removes gogoproto.stdtime, since it is not supported by
Google's official toolchain
(see https://github.com/containerd/containerd/issues/6564).

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-04-19 13:39:30 +00:00
Ye Sijun
3df7674058 add restart policy for enhanced restart manager
Signed-off-by: Ye Sijun <junnplus@gmail.com>
2022-04-09 01:04:11 +08:00
Ed Bartosh
825c1c58a9 CDI: update go.mod and vendor deps
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2022-04-06 13:10:59 +03:00
Gabriel Adrian Samfira
50921e71bb
Run go mod tidy in integration tests
make integration currently fails due to outdated go.mod.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-04-04 11:01:56 +03:00
Akihiro Suda
9f4e13973d
Merge pull request #6765 from thaJeztah/move_indirects
go.mod: move indirects, and update integration go.mod to 1.18
2022-04-03 07:09:20 +09:00
Sebastiaan van Stijn
99c194e033
go.mod: move indirects, and update integration go.mod to 1.18
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-02 12:02:13 +02:00
Maksym Pavlenko
871b6b6a9f Use testify
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-04-01 18:17:58 -07:00
Akihiro Suda
11a31320bb
go.mod: github.com/opencontainers/runc v1.1.1
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-04-01 15:16:08 +09:00
Phil Estes
3633cae64b
Merge pull request #6706 from kzys/typeurl-upgrade
Use typeurl.Any instead of github.com/gogo/protobuf/types.Any
2022-03-25 10:38:46 -04:00
Kazuyoshi Kato
96b16b447d Use typeurl.Any instead of github.com/gogo/protobuf/types.Any
This commit upgrades github.com/containerd/typeurl to use typeurl.Any.
The interface hides gogo/protobuf/types.Any from containerd's Go client.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-03-24 20:50:07 +00:00
Mike Brown
a51da91c1d moving up to go-cni v1.1.4
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2022-03-23 22:16:51 +00:00
Sebastiaan van Stijn
36612d692f
go.mod: remove replace and update github.com/gogo/googleapis v1.4.1
gogo/googleapis has a single dependency (github.com/gogo/protobuf), which is
currently the same version as we use, and we have a separate replace for that
dependency, so removing this override should not make a difference there.

gogo/googleapis v1.4.1 Includes updated protos with the gogo/protobuf fixes for
[CVE-2021-3121](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3121)

Change logs and diffs for each release:

- v1.3.3
  generate grpc service for google/longrunning/operations.proto
  full diff: https://github.com/gogo/googleapis/compare/v1.3.2...v1.3.3
- v1.4.0
  Add google geo type
  full diff: https://github.com/gogo/googleapis/compare/v1.3.3...v1.4.0
- v1.4.1
  This release contains sources generated with the version of gogo/protobuf
  containing a fix for the "skippy peanut butter" issue.
  full diff: https://github.com/gogo/googleapis/compare/v1.4.0...v1.4.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-23 16:56:30 +01:00
Kazuyoshi Kato
388ee880d2 Upgrade containerd/imgcrypt and opencontainers/image-spec
- Upgrade github.com/containerd/imgcrypt to prepare for typeurl upgrade
  (see https://github.com/containerd/imgcrypt/pull/72)
- Upgrade github.com/opencontainers/image-spec since imgcrypto needs at
  least 1.0.2.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-03-22 21:17:18 +00:00
Michael Crosby
0c701654a1
Merge pull request #6690 from estesp/update-prom-dep
Update prometheus client vendor
2022-03-18 12:40:57 -04:00
Phil Estes
c568752335
Update prometheus client vendor
Signed-off-by: Phil Estes <estesp@amazon.com>
2022-03-17 13:33:07 -04:00
Sebastiaan van Stijn
9aadef1bee
vendor: golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd
full diff: 32db794688...3147a52a75

This version contains a fix for CVE-2022-27191 (not sure if it affects us).

From the golang mailing list:

    Hello gophers,

    Version v0.0.0-20220315160706-3147a52a75dd of golang.org/x/crypto/ssh implements
    client authentication support for signature algorithms based on SHA-2 for use with
    existing RSA keys.

    Previously, a client would fail to authenticate with RSA keys to servers that
    reject signature algorithms based on SHA-1. This includes OpenSSH 8.8 by default
    and—starting today March 15, 2022 for recently uploaded keys.

    We are providing this announcement as the error (“ssh: unable to authenticate”)
    might otherwise be difficult to troubleshoot.

    Version v0.0.0-20220314234659-1baeb1ce4c0b (included in the version above) also
    fixes a potential security issue where an attacker could cause a crash in a
    golang.org/x/crypto/ssh server under these conditions:

    - The server has been configured by passing a Signer to ServerConfig.AddHostKey.
    - The Signer passed to AddHostKey does not also implement AlgorithmSigner.
    - The Signer passed to AddHostKey does return a key of type “ssh-rsa” from its PublicKey method.

    Servers that only use Signer implementations provided by the ssh package are
    unaffected. This is CVE-2022-27191.

    Alla prossima,

    Filippo for the Go Security team

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-17 14:13:41 +01:00
Fu Wei
79d7df70d6
Merge pull request #6681 from Juneezee/test/t.TempDir 2022-03-16 14:54:16 +08:00
Eng Zer Jun
18ec2761c0
test: use T.TempDir to create temporary test directory
The directory created by `T.TempDir` is automatically removed when the
test and all its subtests complete.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-03-15 14:03:50 +08:00
Henry Wang
2e080bf491 Add shared content label to namespaces
Signed-off-by: Henry Wang <henwang@amazon.com>
2022-03-11 23:37:02 -08:00
Paul "TBBle" Hampson
6a25be94e9 CRI integration test for Windows Device mounts
This test takes advantage of the fact that when you tell Windows to
mount the GUID_DEVINTERFACE_DISPLAY_ADAPTER class, it will also mount
the host's device store into the container, even if there is no real GPU
on the host.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2022-03-12 08:16:43 +11:00
Phil Estes
8047eb2fca
Merge pull request #6635 from gabriel-samfira/fix-deadline-exceeded-in-daemon-restart
[Windows] Fix deadline exceeded in daemon restart
2022-03-10 12:30:38 -05:00
Gabriel Adrian Samfira
80bc32f069
Use temp file for export/import test
Using a bytes buffer for this test increases the memory usage on Windows
to over 3 GB. Using a temporary file as a destination for the image
keeps memory usage at a reasonable level.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-03-10 11:48:38 +02:00
Phil Estes
b521429b67
Merge pull request #6495 from thaJeztah/improve_versions
strip path-info from `-v` (version) output, and implement -v flag for containerd-shim
2022-03-08 13:57:34 -05:00
Gabriel Adrian Samfira
14901335c1
Increase wait timeout for TestDaemonRestart
Windows needs a bit more time to finish the restarting containerd. With
the current 2 second timeout, we run the risk of exceeding that
deadline.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-03-08 18:09:42 +02:00
Paul "TBBle" Hampson
5b78a9a8f1 Remove hardcoded /tmp in tempfile paths
There's no specific need mentioned at the points it was added, and it
makes the Windows-hosted test run setup slightly weird.

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
2022-03-06 17:32:25 +11:00
Phil Estes
5427aec4f1
Merge pull request #6595 from zhsj/fix-cri-test
cri: fix integration test on cgroupsv2 system
2022-03-04 13:20:45 -05:00
Phil Estes
ab2f7dcdbc
Merge pull request #6568 from katiewasnothere/cri_integration_tests_windows
Update TestContainerSymlinkVolumes to use windows path
2022-03-03 10:19:56 -05:00
Shengjing Zhu
775facd573 cri: fix integration test on cgroupsv2 system
TestUpdateContainerResources_MemoryLimit still uses old method to
check memlimit in cgroup.

Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2022-02-28 21:27:53 +08:00
Shengjing Zhu
f1f69d4eeb integration: remove duplicated util pkg
Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2022-02-28 20:36:01 +08:00
Shengjing Zhu
ea3d2e6433 go.mod: update to github.com/tchap/go-patricia/v2 v2.3.1
Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2022-02-26 05:04:55 +08:00
Phil Estes
2b2372d43e
Merge pull request #6337 from thaJeztah/bump_go_restful
go.mod: update to github.com/emicklei/go-restful/v3 v3.7.3
2022-02-22 17:33:37 -05:00
Shengjing Zhu
f4f41296c2 Replace golang.org/x/net/context with std library
Signed-off-by: Shengjing Zhu <zhsj@debian.org>
2022-02-22 02:27:05 +08:00
Kathryn Baldauf
a3303e7214 Update TestContainerSymlinkVolumes to use windows path
Signed-off-by: Kathryn Baldauf <kabaldau@microsoft.com>
2022-02-18 16:21:40 -08:00
Sebastiaan van Stijn
481fb923c5
go.mod: update to github.com/emicklei/go-restful/v3 v3.7.3
full diff: https://github.com/emicklei/go-restful/compare/v2.9.5...v3.7.3

- Switch to using go modules
- Add check for wildcard to fix CORS filter
- Add check on writer to prevent compression of response twice
- Add OPTIONS shortcut WebService receiver
- Add Route metadata to request attributes or allow adding attributes to routes
- Add wroteHeader set
- Enable content encoding on Handle and ServeHTTP
- Feat: support google custom verb
- Feature: override list of method allowed without content-type
- Fix Allow header not set on '405: Method Not Allowed' responses
- Fix Go 1.15: conversion from int to string yields a string of one rune
- Fix WriteError return value
- Fix: use request/response resulting from filter chain
- handle path params with prefixes and suffixes
- HTTP response body was broken, if struct to be converted to JSON has boolean value
- List available representations in 406 body
- Support describing response headers
- Unwrap function in filter chain + remove unused dispatchWithFilters

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-18 21:54:27 +01:00
Phil Estes
39afc6fd47
Merge pull request #6515 from gabriel-samfira/enable-restart-monitor
[Windows][Integration] Enable TestRestartMonitor
2022-02-16 10:37:29 -05:00
Sebastiaan van Stijn
1a31772a7a
go.mod: github.com/moby/sys/signal v0.7.0
full diff: https://github.com/moby/sys/compare/signal/v0.6.0...signal/v0.7.0

- add LCOW supported signals to windows signal map

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-15 14:17:17 +01:00
Sebastiaan van Stijn
b1881bdc04
go.mod: github.com/moby/sys/mountinfo v0.6.0
full diff: https://github.com/moby/sys/compare/mountinfo/v0.5.0...mountinfo/v0.6.0

- Add MountedFast (Note: most users should keep using Mounted, which already
  incorporates all optimizations from MountedFast)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-15 14:15:32 +01:00
Sebastiaan van Stijn
b6a6757c11
go.mod: github.com/fsnotify/fsnotify v1.5.1
full diff: https://github.com/fsnotify/fsnotify/compare/v1.4.9...v1.5.1

Relevant changes:

- Fix unsafe pointer conversion
- Drop support/testing for Go 1.11 and earlier
- Update x/sys to latest
- add //go:build lines
- add go 1.17 to test matrix

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-02-15 14:11:18 +01:00
Maksym Pavlenko
7efd485b6e
Merge pull request #6543 from dmcgowan/update-cni-v1.1.2
Update go-cni to v1.1.3
2022-02-14 17:03:54 -08:00
Derek McGowan
fa19714db9
Update go-cni to v1.1.3
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-02-14 10:37:31 -08:00
Derek McGowan
c0f8188469
Update go-cni to v1.1.2
Fixes panic when exec is nil

Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-02-10 12:40:51 -08:00
Gabriel Adrian Samfira
4f0d5f0ee3 Enable TestContainerPTY and TestContainerUsername
Enables TestContainerPTY and TestContainerUsername on Windows.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-02-10 06:46:42 +00:00
Gabriel Adrian Samfira
b63000c65d
[Windows][Integration] Enable TestRestartMonitor
With the release of hcsshim v0.9.2, this test should pass without
issues on Windows.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2022-02-04 17:27:14 +02:00
Michael Crosby
9a08d6fcde
Merge pull request #6457 from kzys/otel-http
tracing: use OTLP/HTTP in addition to OTLP/gRPC
2022-02-02 14:24:15 -05:00
Derek McGowan
8d69c041c5
Update cgroups to v1.0.3
Pull in latest cgroups to pick up leak fixes

Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-02-01 16:57:51 -08:00
Sebastiaan van Stijn
e79aba10d4
integration/images/volume-ownership: strip path information from usage output
POSIX guidelines describes; https://www.gnu.org/prep/standards/html_node/_002d_002dversion.html#g_t_002d_002dversion

> The program’s name should be a constant string; don’t compute it from argv[0].
> The idea is to state the standard or canonical name for the program, not its
> file name.

We don't have a const for this, but let's make a start and just remove the path info.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-01-31 21:07:00 +01:00
Kazuyoshi Kato
e751f1f44f tracing: support OTLP/HTTP in addition to gRPC
This change adds OTLP/HTTP, specifically http/protobuf support.

http/protobuf is recommended in
https://github.com/open-telemetry/opentelemetry-specification/blob/v1.8.0/specification/protocol/exporter.md.

However kube-apiserver and CRI-O use gRPC, kubelet may support
gRPC in future. So we should support gRPC as well.

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
2022-01-29 00:41:18 +00:00
Wei Fu
31a710c492 fix: should not send 137 code event if cmd is notfound
ShimV2 has shim.Delete command to cleanup task's temporary resource,
like bundle folder. Since the shim server exits and no persistent store
is for task's exit code, the result of shim.Delete is always 137 exit
code, like the task has been killed.

And the result of shim.Delete can be used as task event only when the
shim server is killed somehow after container is running. Therefore,
dockerd, which watches task exit event to update status of container,
can report correct status.

Back to the issue #6429, the container is not running because the
entrypoint is not found. Based on this design, we should not send
137 exitcode event to subscriber.

This commit is aimed to remove shim instance first and then the
`cleanupAfterDeadShim` should not send event.

Similar Issue: #4769
Fix #6429

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2022-01-22 00:58:33 +08:00
Michael Crosby
f2c2d07683
Merge pull request #6458 from dcantah/change-to-constant-win2022
Integration: Change to Windows Server 2022 build number constant
2022-01-19 16:19:00 -05:00
Daniel Canter
7d7064e6b4 Integration: Change to Windows Server 2022 build number constant
The build number used to determine whether we need to pull the Windows
Server 2022 image for the integration tests was previously hardcoded as there
wasn't an hcsshim release with the build number. Now that there is and it's
vendored in, this change just swaps to it.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2022-01-19 11:54:22 -08:00
Derek McGowan
2898004a5b
Update kubernetes vendor to 0.22.5
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-01-19 11:24:12 -08:00
Derek McGowan
5089b12100
Merge pull request #6439 from dmcgowan/remove-submodule-go-mod
Remove submodule go mod
2022-01-19 11:20:04 -08:00
Phil Estes
778da8bae9
Merge pull request #6453 from dcantah/bump-hcsshim-0.9.2
go.mod: Update hcsshim to v0.9.2
2022-01-19 08:34:46 -05:00
Akihiro Suda
f0afdea2ad
Merge pull request #6375 from AkihiroSuda/runc-1.1.0
update runc to v1.1.0
2022-01-19 15:19:59 +09:00
Daniel Canter
af39d2ad71 go.mod: Update hcsshim to v0.9.2
This tag brings in some bug fixes related to waiting for containers to terminate and
trying to kill an already terminated process, as well as tty support (exec -it) for
Windows Host Process Containers.

Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2022-01-18 17:34:52 -08:00
Derek McGowan
fcb7bd6997
Remove api go submodule
Signed-off-by: Derek McGowan <derek@mcg.dev>
2022-01-18 14:48:33 -08:00
Akihiro Suda
21a748e381
go.mod: github.com/opencontainers/runc v1.1.0
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-01-18 13:35:22 +09:00
Brian Goff
d5e8edf2df Do not automatically inject client traces
This is a effective revert of 294143bf38
The one thing that makes it not a total revert is this keeps the usage
of chain interceptors, which prevents us from overwriting interceptors
passed into client options.

The automatic trace injection is unnecessary overhead since callers of
this function can add the necessary interceptors when creating the
client.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2022-01-13 22:11:18 +00:00
Phil Estes
c3177caf0c
Merge pull request #6435 from alunsin/dev/build-image-for-ppc64le
Add ppc64 support for test images
2022-01-12 14:44:49 -05:00
Aurelien Lun-Sin
c0a31a7a40
Add ppc64 support for test images
Signed-off-by: Aurelien Lun-Sin <alunsin@us.ibm.com>
2022-01-11 19:58:31 +01:00
宁明晓10296073
b35fb7d447 remove io/ioutil
Signed-off-by: ningmingxiao <ning.mingxiao@zte.com.cn>
2022-01-11 16:07:23 +08:00
Derek McGowan
468513820d
Merge pull request #6351 from adisky/update-k/k-1.23
Updates CRI API & Kubernetes to 1.23
2022-01-07 15:26:44 -08:00
Derek McGowan
647308bc47
Merge pull request #6410 from AkihiroSuda/update-go-mod-20220107
go.mod: update github.com/containerd/{continuity,go-cni,imgcrypt}
2022-01-07 12:34:44 -08:00
Akihiro Suda
d3724a6c17
go.mod: update github.com/containerd/{continuity,go-cni,imgcrypt}
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2022-01-07 18:54:15 +09:00
haoyun
bbe46b8c43 feat: replace github.com/pkg/errors to errors
Signed-off-by: haoyun <yun.hao@daocloud.io>
Co-authored-by: zounengren <zouyee1989@gmail.com>
2022-01-07 10:27:03 +08:00
Aditi Sharma
e43d4206af Update k/k to 1.23.0
Signed-off-by: Aditi Sharma <adi.sky17@gmail.com>
2022-01-06 11:18:23 +05:30
Markus Lehtonen
eba1048163 Update dependencies
Signed-off-by: Markus Lehtonen <markus.lehtonen@intel.com>
2022-01-04 09:27:54 +02:00