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

29 lines
989 B
Diff
Raw Normal View History

2023-01-05 17:11:59 +08:00
From 7140cab44cd368e987089b66948cfc7f8a414b83 Mon Sep 17 00:00:00 2001
From: zhongjiawei <zhongjiawei1@huawei.com>
Date: Thu, 5 Jan 2023 16:35:55 +0800
2022-10-26 16:13:47 +08:00
Subject: [PATCH] runc:do not kill container if poststart hooks execute failed
---
2023-01-05 17:11:59 +08:00
libcontainer/container_linux.go | 5 +----
2022-10-26 16:13:47 +08:00
1 file changed, 1 insertion(+), 4 deletions(-)
2023-01-05 17:11:59 +08:00
diff --git a/libcontainer/container_linux.go b/libcontainer/container_linux.go
2022-10-26 16:13:47 +08:00
index 425e44d..10890c1 100644
2023-01-05 17:11:59 +08:00
--- a/libcontainer/container_linux.go
+++ b/libcontainer/container_linux.go
2022-10-26 16:13:47 +08:00
@@ -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