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

33 lines
1.1 KiB
Diff
Raw Permalink Normal View History

2023-07-26 17:09:55 +08:00
From 0cbdce649f9086adc2e8c50734d37c2d31b45234 Mon Sep 17 00:00:00 2001
From: zhangsong34 <zhangsong34@huawei.com>
Date: Wed, 13 Mar 2019 15:40:12 +0800
2022-10-26 16:13:47 +08:00
Subject: [PATCH] runc:do not kill container if poststart hooks execute failed
reason:do not kill container if poststart hooks execute failed.
Change-Id: Ieb1e1e7eeefe4bbd3cdb38fbba5a2a003297a5b3
Signed-off-by: zhangsong34 <zhangsong34@huawei.com>
2022-10-26 16:13:47 +08:00
---
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
2023-07-26 17:09:55 +08:00
index 8fbd04d..e27cd7d 100644
2023-01-05 17:11:59 +08:00
--- a/libcontainer/container_linux.go
+++ b/libcontainer/container_linux.go
2023-07-26 17:09:55 +08:00
@@ -369,10 +369,7 @@ func (c *linuxContainer) start(process *Process) (retErr error) {
2022-10-26 16:13:47 +08:00
}
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))
}
}
}
--
2023-07-26 17:09:55 +08:00
2.33.0
2022-10-26 16:13:47 +08:00