Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

containerd2: fix ptest after adding tardev-snapshotter patch #12206

Draft
wants to merge 2 commits into
base: 3.0-dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions SPECS/containerd2/add-tardev-support.patch
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
From 33ac7f6f513934a0ef59cc6739eee0efdac3631c Mon Sep 17 00:00:00 2001
From b4c672fcfc8faad7d0534d887d72e2a68c112d20 Mon Sep 17 00:00:00 2001
From: Mitch Zhu <[email protected]>
Date: Fri, 22 Nov 2024 20:41:27 +0000
Date: Mon, 3 Feb 2025 22:42:14 +0000
Subject: [PATCH] Enhance snapshot handling and CRI runtime compatibility for
tardev-snapshotter

---
client/image.go | 4 +-
internal/cri/server/container_status_test.go | 2 +-
internal/cri/server/images/image_pull.go | 37 +++++++++++--------
internal/cri/server/images/image_pull_test.go | 2 +-
internal/cri/server/podsandbox/controller.go | 2 +-
internal/cri/server/podsandbox/sandbox_run.go | 30 ++++++++-------
internal/cri/server/service.go | 2 +-
internal/cri/store/image/image.go | 29 ++++++++++++---
7 files changed, 68 insertions(+), 38 deletions(-)
8 files changed, 69 insertions(+), 39 deletions(-)

diff --git a/client/image.go b/client/image.go
index 355bcba..791db88 100644
Expand Down Expand Up @@ -126,6 +127,19 @@ index e59b88b..f9c90b7 100644
}

// TODO: Ensure error is returned if runtime not found?
diff --git a/internal/cri/server/images/image_pull_test.go b/internal/cri/server/images/image_pull_test.go
index bc79e35..af6a451 100644
--- a/internal/cri/server/images/image_pull_test.go
+++ b/internal/cri/server/images/image_pull_test.go
@@ -429,7 +429,7 @@ func TestSnapshotterFromPodSandboxConfig(t *testing.T) {
Platform: platforms.DefaultSpec(),
Snapshotter: runtimeSnapshotter,
}
- snapshotter, err := cri.snapshotterFromPodSandboxConfig(context.Background(), "test-image", tt.podSandboxConfig)
+ snapshotter, err := cri.snapshotterFromPodSandboxConfig(context.Background(), "test-image", tt.podSandboxConfig, "")
assert.Equal(t, tt.expectedSnapshotter, snapshotter)
if tt.expectedErr {
assert.Error(t, err)
diff --git a/internal/cri/server/podsandbox/controller.go b/internal/cri/server/podsandbox/controller.go
index a185a4c..8fd032b 100644
--- a/internal/cri/server/podsandbox/controller.go
Expand Down
7 changes: 5 additions & 2 deletions SPECS/containerd2/containerd2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Summary: Industry-standard container runtime
Name: %{upstream_name}2
Version: 2.0.0
Release: 3%{?dist}
Release: 4%{?dist}
License: ASL 2.0
Group: Tools/Container
URL: https://www.containerd.io
Expand Down Expand Up @@ -81,7 +81,10 @@ fi
%dir /opt/containerd/lib

%changelog
* Sun Jan 26 2024 Mitch Zhu <[email protected]> - 2.0.0-3
* Mon Feb 03 2025 Mitch Zhu <[email protected]> - 2.0.0-4
- Fix ptest in tardev-snapshotter support patch

* Sun Jan 26 2025 Mitch Zhu <[email protected]> - 2.0.0-3
- Added patch to support tardev-snapshotter for Kata CC.

* Thu Jan 23 2025 Kavya Sree Kaitepalli <[email protected]> - 2.0.0-2
Expand Down
Loading