Commit Graph

909 Commits

Author SHA1 Message Date
Samuel Karp
18725f010b
integration: regression test for issue 10589
This issue was caused by a race between init exits and new exec process
tracking inside the shim. The test operates by controlling the time
between when the shim invokes "runc exec" and when the actual "runc
exec" is triggered. This allows validating that races for shim state
tracking between pre- and post-start of the exec process do not exist.

Relates to https://github.com/containerd/containerd/issues/10589

Signed-off-by: Samuel Karp <samuelkarp@google.com>
2024-09-05 16:17:09 -07:00
Derek McGowan
50b06182f8
Register local content plugin from separate package
Update the local content plugin to register itself in a consistent way
as other plugins. This also allows the separate package to define its
own configuration more cleanly.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-08-22 11:18:30 -07:00
Akhil Mohan
f8e0753366
remove windows check in linux_test file
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-08-14 14:22:03 +05:30
Wei Fu
4cfeb7b19e core/metadata: migrate sandboxes bucket into v1
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-07-30 21:37:35 +08:00
Henry Wang
243b803a19 Add pprof to runc-shim
Signed-off-by: Henry Wang <henwang@amazon.com>
2024-06-20 23:12:31 +00:00
Derek McGowan
b1a23c495a
Fail integration test early when a plugin load fails
Avoid running tests when a plugin fails to load and return the init
error from the plugin. This prevents the test failing later with an
unhelpful error and attempting to find the actual error in the daemon
logs.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-06-05 16:58:03 -07:00
Wei Fu
4123170a39 *: export RemoveVolatileOption for CRI image volumes
Remove volatile option when CRI prepares image volumes.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-05-30 09:56:37 +08:00
bzsuni
22f2af40c0 update pause image to 3.10
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
2024-05-25 08:17:46 +08:00
Maksym Pavlenko
b168147ca8
Merge pull request #10193 from henry118/shim-sock
fix: delete sockets on shim exit
2024-05-09 05:06:41 +00:00
Henry Wang
d9dc2811ae fix: delete sockets on shim exit
Signed-off-by: Henry Wang <henwang@amazon.com>
2024-05-08 21:53:39 +00:00
Danny Canter
9ecfac7f6a Integration: Change to grpc.NewClient
Fun times: In grpc 1.63 grpc.Dial and a few of the options we use (WithBlock) are
deprecated in favor of the no-IO variant NewClient. The uses in the integration tests
should be easy to swap however as they don't use WithBlock anyways, so that's what this
change aims to do. This also removes some context.WithTimeout's as I don't see anywhere
the context is actually used in Dial if you don't also specify WithBlock (and it's
especially not used now with NewClient as it doesn't even take in a context).

Signed-off-by: Danny Canter <danny@dcantah.dev>
2024-05-07 17:13:15 -07:00
Derek McGowan
2ac2b9c909
Make api a Go sub-module
Allow the api to stay at the same v1 go package name and keep using a
1.x version number. This indicates the API is still at 1.x and allows
sharing proto types with containerd 1.6 and 1.7 releases.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-02 11:03:00 -07:00
Derek McGowan
e1b94c0e7d
Move protobuf package under pkg
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-02 10:52:03 -07:00
Derek McGowan
4a45507772
Move runc options to api directory
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-05-02 10:52:00 -07:00
Derek McGowan
888fd315fd
Update CNI to v1.2.0
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-04-22 14:12:15 -07:00
Kirtana Ashok
5b6ae0f796 Use different containerd sock address in tests
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-03-27 19:04:48 -07:00
Akihiro Suda
5a23e8878c
Merge pull request #9917 from AkihiroSuda/mv-testutil
mv internal/testutil pkg/testutil
2024-03-12 12:01:16 +00:00
Maksym Pavlenko
6a96e45012
Move shim package to pkg
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-03-07 10:05:26 -08:00
Akihiro Suda
d9b9160ae1
mv internal/testutil pkg/testutil
The package is consumed by several snapshotter plugins

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-03-04 17:00:39 +09:00
Fu Wei
6333db7701
Merge pull request #9891 from dmcgowan/move-events-plugin
Move events to plugins and core
2024-02-29 12:45:25 +00:00
Fu Wei
2cdf012387
Merge pull request #9617 from abel-von/sandbox-plugin-0109
sandbox: use sandboxService in CRI plugin instead of calling controller API directly
2024-02-28 15:49:12 +00:00
Derek McGowan
72f21833b1
Move events to plugins and core
Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-02-27 22:09:20 -08:00
Abel Feng
0f1d27412f sandbox: add methods to sandboxService
so that we cri service don't have to get sandbox controller everytime it
needs to call sandbox controller api.

Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-02-26 10:10:11 +08:00
Maksym Pavlenko
464319b3ab
Remove pause package from runc shim
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-22 11:42:16 -08:00
Akihiro Suda
fcdfd923cb
Merge pull request #8970 from cpuguy83/otel_off_by_default
Configure otel from env instead of config.toml
2024-02-22 04:57:50 +00:00
Brian Goff
4fbc9842d5 Changes to configuring otel from env only
These are standard environment variables described by the otel spec in
https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/.

The old config options are removed

Also since otel will by default try to connect to https://localhost:4318
if no endpoint is set, this will also just disable the otlp plugin when
there is no endpoint so we don't have otel continuously trying to
connect to the default endpoint, littering the logs with connection
failure messages and collecting traces that won't go anywhere.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2024-02-20 21:59:45 +00:00
Akhil Mohan
0693b936d2
replace deprecated Prestart to CreateRuntime hook
Prestart Hook is deprecated and can be replaced with CreateRuntime hook

Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
2024-02-20 21:54:47 +05:30
Samuel Karp
b87d78f456
Merge pull request #9765 from AkihiroSuda/remove-schema1
Disable the support for Schema 1 images
2024-02-17 09:20:15 +00:00
Phil Estes
0f5586ee09
Merge pull request #9748 from fuweid/upgrade-testcase
test: update upgrade test suite in integration
2024-02-16 16:11:25 +00:00
Wei Fu
c86c8a16f0 integration: add case related to ContainerStats in upgrade suite
It's used to check new release containerd can parse metric data from existing
shim created by previous release.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-02-16 12:18:38 +08:00
Wei Fu
acec60f554 integration: update recover case for upgrade
The new release containerd should detect dead shim during recover.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-02-16 12:18:38 +08:00
Wei Fu
e659cd2752 integration: connect to shim by bridge client
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-02-16 12:18:38 +08:00
Wei Fu
51689b6618 integration: introduce hook for upgrade test suite
We can inject failpoint in beforeUpgradeHookFunc.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-02-16 12:18:38 +08:00
Wei Fu
a95c8ed591 integration: check data dir after delete container or pod
The new release containerd should cleanup old pod's data dir after
RemovePodSandbox.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-02-16 12:18:38 +08:00
Wei Fu
ec759f5be4 integration/*: extend Runtime.Status response
CRI Runtime Status contains `Info` and it can help us check current
configuration.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-02-16 12:18:38 +08:00
Wei Fu
401d4b491f integration: add some helper function to release upgrade cases
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-02-16 12:18:30 +08:00
Maksym Pavlenko
7cf8a00c77
Run failpoints tests only for runc
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-15 12:19:31 -08:00
Akihiro Suda
99721c27e1
Disable the support for Schema 1 images
Schema 1 (`application/vnd.docker.distribution.manifest.v1+prettyjws`) has been
officially deprecated since containerd v1.7 (PR 6884).

We have planned to remove the support for Schema 1 in containerd v2.0, but this
removal may still surprise some users.
So, in containerd v2.0 we will just disable it by default.

The support for Schema 1 can be still enabled by setting an environment variable
`CONTAINERD_ENABLE_DEPRECATED_PULL_SCHEMA_1_IMAGE=1`, however, this workaround
will be completely removed in containerd v2.1.

Schema 2 was introduced in Docker 1.10 (Feb 2016), so most users should
have been already using Schema 2 or OCI.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-02-15 11:11:35 +09:00
Kirtana Ashok
4c775fcfbf Pass runtimehandler from CRI pull image request
Starting with k8s cri-api v0.29.1, CRI supports new runtime handler flag

Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
2024-02-14 13:31:23 -08:00
Maksym Pavlenko
48c8c5f502 Remove ParseSignal from client
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2024-02-10 18:02:05 -08:00
Maksym Pavlenko
128f249f0e
Merge pull request #9790 from dmcgowan/mv-transfer-packages
Move transfer and unpack packages to core
2024-02-10 16:49:55 +00:00
Akihiro Suda
b466b7ef85
Merge pull request #9747 from AkihiroSuda/revert-9713
Revert "cri: make read-only mounts recursively read-only"
2024-02-08 10:29:03 +00:00
Derek McGowan
f46aea6187
Move transfer and unpack packages
Packages related to transfer and unpacking provide core interfaces which
use other core interfaces and part of common functionality.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2024-02-07 22:40:15 -08:00
Henry Wang
1eaf0c1f04 bug fix: make sure cri image is pinned when it is pulled outside cri
Signed-off-by: Henry Wang <henwang@amazon.com>
2024-02-07 16:03:40 +00:00
Fu Wei
de14037133
Merge pull request #9744 from klihub/devel/enable-nri-by-default
Flip NRI on by default.
2024-02-07 07:55:29 +00:00
Zoe
a9060cda4a Support inject delay running with the old version (4.x) of strace for test case.
Only the newer version of strace can support `--detach-on` options
and set time duration with human readable string.

In the 4.x version of strace, using `-b` to replace `--detach-on`,
and injecting a delay with int usecs.

Signed-off-by: Zoe <hi@zoe.im>
2024-02-05 21:27:41 +08:00
Krisztian Litkey
fe24b918f6
pkg/nri, docs: enable NRI by default.
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2024-02-04 11:41:56 +02:00
Abel Feng
e230ed939c sandbox: add sandbox recover ut and e2e test
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2024-02-04 11:55:46 +08:00
Akihiro Suda
6670695836
Revert "cri: make read-only mounts recursively read-only"
Revert PR 9713, as it appeared to break the compatibility too much
https://github.com/kubernetes/enhancements/pull/3858#issuecomment-1925441072

This reverts commit b2f254fff0.

> Conflicts:
>	internal/cri/opts/spec_linux_opts.go

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-02-04 01:17:14 +09:00
Samuel Karp
96bf529cbf
Merge pull request #9742 from mxpv/envelope
Move Message proto to types
2024-02-03 06:32:01 +00:00