diff --git a/agent/patches/0011-agent-fix-agent-reap-agent-process-blocked-problem.patch b/agent/patches/0011-agent-fix-agent-reap-agent-process-blocked-problem.patch deleted file mode 100644 index 272e0b51ac239d68752c8dad68e8fe685d4e9ee9..0000000000000000000000000000000000000000 --- a/agent/patches/0011-agent-fix-agent-reap-agent-process-blocked-problem.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 3ac1232a2e3fbfc0465473e5d81cde41847c4252 Mon Sep 17 00:00:00 2001 -From: jiangpengfei -Date: Wed, 19 Aug 2020 11:47:37 +0800 -Subject: [PATCH 11/16] agent: fix agent reap agent process blocked problem - -reason: add container waitProcess() timeout when -container process status is D/T. - -Signed-off-by: jiangpengfei ---- - grpc.go | 43 +++++++++++++++++++++++++++++++++---------- - 1 file changed, 33 insertions(+), 10 deletions(-) - -diff --git a/grpc.go b/grpc.go -index de2cae7..3dd088e 100644 ---- a/grpc.go -+++ b/grpc.go -@@ -49,6 +49,11 @@ const ( - libcontainerPath = "/run/libcontainer" - ) - -+// keep waitProcessTimeout value same as value in kata-runtime wait WaitProcessRequest response -+const ( -+ waitProcessTimeOut = 10 -+) -+ - var ( - sysfsCPUOnlinePath = "/sys/devices/system/cpu" - sysfsMemOnlinePath = "/sys/devices/system/memory" -@@ -996,17 +1001,35 @@ func (a *agentGRPC) WaitProcess(ctx context.Context, req *pb.WaitProcessRequest) - ctr.deleteProcess(proc.id) - }) - -- // Using helper function wait() to deal with the subreaper. -- libContProcess := (*reaperLibcontainerProcess)(&(proc.process)) -- exitCode, err := a.sandbox.subreaper.wait(proc.exitCodeCh, libContProcess) -- if err != nil { -- return &pb.WaitProcessResponse{}, err -+ done := make(chan error) -+ var exitCode int = 0 -+ go func() { -+ // Using helper function wait() to deal with the subreaper. -+ libContProcess := (*reaperLibcontainerProcess)(&(proc.process)) -+ var err error -+ exitCode, err = a.sandbox.subreaper.wait(proc.exitCodeCh, libContProcess) -+ if err != nil { -+ done <- err -+ close(done) -+ return -+ } -+ // refill the exitCodeCh with the exitcode which can be read out -+ // by another WaitProcess(). Since this channel isn't be closed, -+ // here the refill will always success and it will be free by GC -+ // once the process exits. -+ proc.exitCodeCh <- exitCode -+ -+ close(done) -+ }() -+ -+ select { -+ case err := <-done: -+ if err != nil { -+ return &pb.WaitProcessResponse{}, err -+ } -+ case <-time.After(time.Duration(waitProcessTimeOut) * time.Second): -+ return &pb.WaitProcessResponse{}, grpcStatus.Errorf(codes.DeadlineExceeded, "agent wait reap container process timeout reached after %ds", waitProcessTimeOut) - } -- //refill the exitCodeCh with the exitcode which can be read out -- //by another WaitProcess(). Since this channel isn't be closed, -- //here the refill will always success and it will be free by GC -- //once the process exits. -- proc.exitCodeCh <- exitCode - - return &pb.WaitProcessResponse{ - Status: int32(exitCode), --- -2.14.3 (Apple Git-98) - diff --git a/agent/series.conf b/agent/series.conf index 6f69da3c82ce383035084132dae5bfa6b90c777a..0c2b8486c0d990e8bea7abdb5cc523c28638dfed 100644 --- a/agent/series.conf +++ b/agent/series.conf @@ -8,7 +8,6 @@ 0008-agent-support-get-root-bus-path-dynamically.patch 0009-storage-add-pkg-storage-for-mount.patch 0010-storage-mount-nfs-and-gpath-in-agent.patch -0011-agent-fix-agent-reap-agent-process-blocked-problem.patch 0012-network-support-set-dns-without-nameserver.patch 0013-agent-support-setting-multi-queues-of-interface.patch 0014-agent-fix-init-hugepages-failed-problem.patch diff --git a/kata-containers.spec b/kata-containers.spec index d636c124d39445bd80029c43a50b4c4e772697af..6ae4ce30eec439ccba23aa8c587fd9e5ad6393de 100644 --- a/kata-containers.spec +++ b/kata-containers.spec @@ -2,7 +2,7 @@ %global debug_package %{nil} %define VERSION v1.11.1 -%define RELEASE 14 +%define RELEASE 15 Name: kata-containers Version: %{VERSION} @@ -92,6 +92,12 @@ install -p -m 640 -D ./runtime/cli/config/configuration-qemu.toml %{buildroot}/u %changelog +* Fri May 7 2021 gaohuatao - 1.11.1-15 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:delete agent wait process timeout to support shimv2 + * Wed Apr 28 2021 gaohuatao - 1.11.1-14 - Type:feature - ID:NA