33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
From 0cbdce649f9086adc2e8c50734d37c2d31b45234 Mon Sep 17 00:00:00 2001
|
|
From: zhangsong34 <zhangsong34@huawei.com>
|
|
Date: Wed, 13 Mar 2019 15:40:12 +0800
|
|
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>
|
|
---
|
|
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
|
|
|