runc/patch/0018-runc-do-not-kill-container-if-poststart-hooks-execut.patch

29 lines
1.0 KiB
Diff
Raw Normal View History

2022-10-26 16:13:47 +08:00
From ac414a8ac967e0fbbf27ea6364f0b134fe9ce9e2 Mon Sep 17 00:00:00 2001
From: zhong-jiawei-1 <zhongjiawei1@huawei.com>
Date: Mon, 24 Oct 2022 11:34:15 +0800
Subject: [PATCH] runc:do not kill container if poststart hooks execute failed
---
runc-1.1.3/libcontainer/container_linux.go | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/runc-1.1.3/libcontainer/container_linux.go b/runc-1.1.3/libcontainer/container_linux.go
index 425e44d..10890c1 100644
--- a/runc-1.1.3/libcontainer/container_linux.go
+++ b/runc-1.1.3/libcontainer/container_linux.go
@@ -367,10 +367,7 @@ func (c *linuxContainer) start(process *Process) (retErr error) {
}
if err := c.config.Hooks[configs.Poststart].RunHooks(s); err != nil {
- if err := ignoreTerminateErrors(parent.terminate()); err != nil {
- logrus.Warn(fmt.Errorf("error running poststart hook: %w, ContainerId: %s", err, s.ID))
- }
- return err
+ logrus.Warn(fmt.Errorf("error running poststart hook: %w, ContainerId: %s", err, s.ID))
}
}
}
--
2.30.0