diff --git a/VERSION-openeuler b/VERSION-openeuler index fa1cead438a6950b890c924aadb9a8fc6509a193..7c351c924b49fd3dc7abcb4b886a14c9127a40e9 100644 --- a/VERSION-openeuler +++ b/VERSION-openeuler @@ -1 +1 @@ -18.09.0.103 +18.09.0.104 diff --git a/docker-engine-openeuler.spec b/docker-engine-openeuler.spec index 9098317e1591aec1a57d094a6eb017f9d1f3e1c3..5a700de3b7bc69a6d68174433e5c973403d5c21a 100644 --- a/docker-engine-openeuler.spec +++ b/docker-engine-openeuler.spec @@ -1,6 +1,6 @@ Name: docker-engine Version: 18.09.0 -Release: 103 +Release: 104 Summary: The open-source application container engine Group: Tools/Docker diff --git a/patch/0163-docker-stat-process-exit-file-when-kill-process-dire.patch b/patch/0163-docker-stat-process-exit-file-when-kill-process-dire.patch new file mode 100644 index 0000000000000000000000000000000000000000..4fbb7de09a189176b829d21c1910a9227ca37ce7 --- /dev/null +++ b/patch/0163-docker-stat-process-exit-file-when-kill-process-dire.patch @@ -0,0 +1,36 @@ +From 3f285224ade14c9d64dfc81cf9b5d969343a641e Mon Sep 17 00:00:00 2001 +From: liuzekun +Date: Wed, 8 Apr 2020 19:49:38 +0800 +Subject: [PATCH] docker: stat process exit file when kill process directly + +reason: stat process exit file when kill process directly + +Signed-off-by: liuzekun +--- + components/engine/daemon/container_operations_unix.go | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/components/engine/daemon/container_operations_unix.go b/components/engine/daemon/container_operations_unix.go +index 2cc2b2e3..df2f3261 100644 +--- a/components/engine/daemon/container_operations_unix.go ++++ b/components/engine/daemon/container_operations_unix.go +@@ -346,6 +346,16 @@ func killProcessDirectly(cntr *container.Container) error { + // Ensure that we don't kill ourselves + if pid := cntr.GetPID(); pid != 0 { + logrus.Infof("Container %s failed to exit within 10 seconds of kill - trying direct SIGKILL", stringid.TruncateID(cntr.ID)) ++ pattern := fmt.Sprintf("/var/run/docker/containerd/exit/moby/%s.%d.*", cntr.ID, pid) ++ efiles, err := filepath.Glob(pattern) ++ if err != nil { ++ logrus.Warnf("Match exit file with pattern %q failed: %s", pattern, err.Error()) ++ } ++ if len(efiles) != 0 { ++ logrus.Infof("Find process exit files with pattern %q: %+v, skip force kill because the process is exit already", pattern, efiles) ++ return errNoSuchProcess{pid, 9} ++ } ++ + if err := unix.Kill(pid, 9); err != nil { + if err != unix.ESRCH { + return err +-- +2.19.1 + diff --git a/series.conf b/series.conf index d8ce86d0f656b25c399956c317368972d5efca9f..4fe3e7e803d45da56a93d22c9312e1c2a1abdb7e 100644 --- a/series.conf +++ b/series.conf @@ -158,3 +158,4 @@ patch/0159-docker-extend-timeout-in-cli-testcases.patch patch/0160-docker-create-a-soft-link-from-runtime-default-to-ru.patch patch/0161-docker-Delete-stale-containerd-object-on-start-f.patch patch/0162-docker-delete-event-is-not-need-to-process.patch +patch/0163-docker-stat-process-exit-file-when-kill-process-dire.patch