Abel Feng
32bf805e57
sandbox: add a sandboxService interface to criService
...
so that we can add a fakeSandboxService to the criService in tests.
Signed-off-by: Abel Feng <fshb1988@gmail.com>
2023-11-15 09:25:58 +08:00
Derek McGowan
5fdf55e493
Update go module to github.com/containerd/containerd/v2
...
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-10-29 20:52:21 -07:00
Wei Fu
337cc21719
pkg/cri: should ignore no sandbox bucket
...
The sandbox might be recovered from v1.x release. It doesn't have
metadata bucket. We should ignore the not-found error.
How to reproduce the issue:
```bash
➜ containerd git:(main) sudo ctr version
Client:
Version: 1.6.22
Revision: 8165feabfdfe38c65b599c4993d227328c231fca
Go version: go1.19.11
Server:
Version: 1.6.22
Revision: 8165feabfdfe38c65b599c4993d227328c231fca
UUID: be4216aa-8a2e-4305-9186-efeacd2d9a17
➜ containerd git:(main) cat /tmp/pod.json
{
"metadata": {
"name": "nginx-sandbox",
"namespace": "default",
"attempt": 1,
"uid": "hdishd83djaidwnduwk28bcsb"
},
"log_directory": "/tmp",
"linux": {
}
}
➜ containerd git:(main) sudo crictl runp /tmp/pod.json
616ea1cc657c57e80abf74e707a8177878ac2ec1ab7c346b4adb7bc0fadf986e
➜ containerd git:(main) sudo crictl pods
POD ID CREATED STATE NAME NAMESPACE ATTEMPT RUNTIME
616ea1cc657c5 9 seconds ago Ready nginx-sandbox default 1 (default)
➜ containerd git:(main) make BUILDTAGS=no_btrfs
➜ containerd git:(main) sudo PREFIX=/usr make install
+ install bin/ctr bin/containerd bin/containerd-stress bin/containerd-shim-runc-v2
➜ containerd git:(main) sudo systemctl restart containerd
➜ containerd git:(main) sudo ctr version
Client:
Version: v1.7.0-943-g980767551
Revision: 9807675518
Go version: go1.20.10
Server:
Version: v1.7.0-943-g980767551
Revision: 9807675518
UUID: be4216aa-8a2e-4305-9186-efeacd2d9a17
➜ containerd git:(main) sudo crictl stopp 616ea1cc657c5
Stopped sandbox 616ea1cc657c5
➜ containerd git:(main) sudo crictl rmp 616ea1cc657c5
E1019 14:03:37.885162 2052643 remote_runtime.go:295] "RemovePodSandbox from runtime service failed" err="rpc error: code = Unknown desc = failed to remove sandbox metadata from store: failed to delete sandbox \"616ea1cc657c57e80abf74e707a8177878ac2ec1ab7c346b4adb7bc0fadf986e\": bucket not found" podSandboxID="616ea1cc657c5"
removing the pod sandbox "616ea1cc657c5": rpc error: code = Unknown desc = failed to remove sandbox metadata from store: failed to delete sandbox "616ea1cc657c57e80abf74e707a8177878ac2ec1ab7c346b4adb7bc0fadf986e": bucket not found
```
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-10-20 15:20:18 +08:00
Maksym Pavlenko
1b31993240
Rename sbserver to server
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-12 15:46:57 -07:00
Maksym Pavlenko
536abf1b35
Remove legacy CRI
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-12 09:18:45 -07:00
Derek McGowan
508aa3a1ef
Move to use github.com/containerd/log
...
Add github.com/containerd/log to go.mod
Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-09-22 07:53:23 -07:00
Maksym Pavlenko
6f34da5f80
Cleanup logrus imports
...
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-05-05 11:54:14 -07:00
Krisztian Litkey
8a1dca0f4a
pkg/cri: split out NRI API from pkg/cri/server.
...
Split out the criService-agnostic bits of nri-api* from
pkg/cri/server to pkg/cri/nri to allow sharing a single
implementation betwen the server and sbserver versions.
Rework the interfaces to not require access to package
internals.
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2023-02-13 22:05:45 +02:00
ruiwen-zhao
a338abc902
Add container event support to containerd
...
Signed-off-by: ruiwen-zhao <ruiwen@google.com>
2022-12-08 19:30:39 +00:00
Krisztian Litkey
b27ef6f169
pkg/cri/server: experimental NRI integration for CRI.
...
Implement the adaptation interface required by the NRI
service plugin to handle CRI sandboxes and containers.
Hook the NRI service plugin into CRI request processing.
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
2022-11-28 21:51:08 +02: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
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
Michael Crosby
91bbaf6799
[cri] add sandbox and container latency metrics
...
These are simple metrics that allow users to view more fine grained metrics on
internal operations.
Signed-off-by: Michael Crosby <michael@thepasture.io>
2021-11-09 21:07:38 +00:00
zounengren
fcffe0c83a
switch usage directly to errdefs.(ErrAlreadyExists and ErrNotFound)
...
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2021-09-24 18:26:58 +08:00
Claudiu Belu
24cec9be56
sandbox: Allows the sandbox to be deleted in NotReady state
...
The Pod Sandbox can enter in a NotReady state if the task associated
with it no longer exists (it died, or it was killed). In this state,
the Pod network namespace could still be open, which means we can't
remove the sandbox, even if --force was used.
Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
2021-09-02 03:40:56 -07:00
Mike Brown
a5c417ac06
move up to CRI v1 and support v1alpha in parallel
...
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2021-06-28 09:34:12 -05:00
Daniel Canter
d74225b588
Fix comment in RemovePodSandbox
...
Signed-off-by: Daniel Canter <dcanter@microsoft.com>
2020-10-12 17:59:08 -07:00
Derek McGowan
b22b627300
Move cri server packages under pkg/cri
...
Organizes the cri related server packages under pkg/cri
Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-10-07 13:09:37 -07:00