29 lines
990 B
Diff
29 lines
990 B
Diff
From 0cbdce649f9086adc2e8c50734d37c2d31b45234 Mon Sep 17 00:00:00 2001
|
|
From: zhongjiawei <zhongjiawei1@huawei.com>
|
|
Date: Mon, 24 Jul 2023 20:31:00 +0800
|
|
Subject: [PATCH] runc:do not kill container if poststart hooks execute failed
|
|
|
|
---
|
|
libcontainer/container_linux.go | 5 +----
|
|
1 file changed, 1 insertion(+), 4 deletions(-)
|
|
|
|
diff --git a/libcontainer/container_linux.go b/libcontainer/container_linux.go
|
|
index 8fbd04d..e27cd7d 100644
|
|
--- a/libcontainer/container_linux.go
|
|
+++ b/libcontainer/container_linux.go
|
|
@@ -369,10 +369,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.33.0
|
|
|