diff --git a/containerd.spec b/containerd.spec index 15f7fe3473f8eb7f06a2daf781736c011e7b64dc..cca9894361b7fd2cfbafaec3b53de6d28bf13f28 100644 --- a/containerd.spec +++ b/containerd.spec @@ -2,7 +2,7 @@ %global debug_package %{nil} Version: 1.2.0 Name: containerd -Release: 213 +Release: 214 Summary: An industry-standard container runtime License: ASL 2.0 URL: https://containerd.io @@ -44,6 +44,12 @@ install -p -m 755 bin/ctr $RPM_BUILD_ROOT/%{_bindir}/ctr %{_bindir}/ctr %changelog +* Thu Dec 21 2023 zhongjiawei - 1.2.0-214 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:sync some patches + * Wed Nov 08 2023 zhongjiawei - 1.2.0-213 - Type:bugfix - ID:NA diff --git a/patch/0107-containerd-Fix-missing-closed-fifo.patch b/patch/0107-containerd-Fix-missing-closed-fifo.patch new file mode 100644 index 0000000000000000000000000000000000000000..e2c2ae97aaba189cb3e85e72e5eb19bb0f5a04af --- /dev/null +++ b/patch/0107-containerd-Fix-missing-closed-fifo.patch @@ -0,0 +1,38 @@ +From 1c93da5ded1b80338ae4014084ce005f89e20a94 Mon Sep 17 00:00:00 2001 +From: Shiming Zhang +Date: Mon, 31 Oct 2022 17:18:27 +0800 +Subject: [PATCH] Fix missing closed fifo + +Signed-off-by: Shiming Zhang +--- + runtime/v1/shim/service_linux.go | 1 + + runtime/v2/runc/service_linux.go | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/runtime/v1/shim/service_linux.go b/runtime/v1/shim/service_linux.go +index 307e20d..b8b85f6 100644 +--- a/runtime/v1/shim/service_linux.go ++++ b/runtime/v1/shim/service_linux.go +@@ -54,6 +54,7 @@ func (p *linuxPlatform) CopyConsole(ctx context.Context, console console.Console + io.CopyBuffer(epollConsole, in, *bp) + // we need to shutdown epollConsole when pipe broken + epollConsole.Shutdown(p.epoller.CloseConsole) ++ in.Close() + }() + } + +diff --git a/runtime/v2/runc/service_linux.go b/runtime/v2/runc/service_linux.go +index 195c230..de85993 100644 +--- a/runtime/v2/runc/service_linux.go ++++ b/runtime/v2/runc/service_linux.go +@@ -54,6 +54,7 @@ func (p *linuxPlatform) CopyConsole(ctx context.Context, console console.Console + io.CopyBuffer(epollConsole, in, *bp) + // we need to shutdown epollConsole when pipe broken + epollConsole.Shutdown(p.epoller.CloseConsole) ++ in.Close() + }() + } + +-- +2.33.0 + diff --git a/patch/0108-containerd-Update-TTRPC-and-Protobuild-dependencies.patch b/patch/0108-containerd-Update-TTRPC-and-Protobuild-dependencies.patch new file mode 100644 index 0000000000000000000000000000000000000000..97f66e0ef44aa5781eb9056ec2be1848c4a99125 --- /dev/null +++ b/patch/0108-containerd-Update-TTRPC-and-Protobuild-dependencies.patch @@ -0,0 +1,51 @@ +From 99580e0aad981d8be11a0d8e7ad2c24130b2dc8d Mon Sep 17 00:00:00 2001 +From: Maksym Pavlenko +Date: Thu, 19 Jan 2023 10:52:41 -0800 +Subject: [PATCH] Update TTRPC and Protobuild dependencies + +Signed-off-by: Maksym Pavlenko +--- + vendor/github.com/containerd/ttrpc/server.go | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/vendor/github.com/containerd/ttrpc/server.go b/vendor/github.com/containerd/ttrpc/server.go +index ab2fdf2..7445d93 100644 +--- a/vendor/github.com/containerd/ttrpc/server.go ++++ b/vendor/github.com/containerd/ttrpc/server.go +@@ -18,14 +18,15 @@ package ttrpc + + import ( + "context" ++ "errors" + "io" + "math/rand" + "net" + "sync" + "sync/atomic" ++ "syscall" + "time" + +- "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +@@ -446,14 +447,12 @@ func (c *serverConn) run(sctx context.Context) { + // branch. Basically, it means that we are no longer receiving + // requests due to a terminal error. + recvErr = nil // connection is now "closing" +- if err == io.EOF || err == io.ErrUnexpectedEOF { ++ if err == io.EOF || err == io.ErrUnexpectedEOF || errors.Is(err, syscall.ECONNRESET) { + // The client went away and we should stop processing + // requests, so that the client connection is closed + return + } +- if err != nil { +- logrus.WithError(err).Error("error receiving message") +- } ++ logrus.WithError(err).Error("error receiving message") + case <-shutdown: + return + } +-- +2.33.0 + diff --git a/series.conf b/series.conf index 8c8346a36f11f0bbd87a934dc205e80fba439e35..b5d503e3823602342bd5cbbc8efe872cf40075c9 100644 --- a/series.conf +++ b/series.conf @@ -108,3 +108,5 @@ patch/0103-containerd-fix-unable-to-checkpoint-the-container-more-than-onc.patch patch/0104-containerd-bugfix-add-nil-pointer-check-for-cgroup-v1-mem-usage.patch patch/0105-containerd-fix-allow-attaching-to-any-combination-of-stdin-stdo.patch patch/0106-containerd-Bump-ttrpc.patch +patch/0107-containerd-Fix-missing-closed-fifo.patch +patch/0108-containerd-Update-TTRPC-and-Protobuild-dependencies.patch