31 lines
971 B
Diff
31 lines
971 B
Diff
|
|
From fe778eb160fc1e3a492b5304890af3843aa91f32 Mon Sep 17 00:00:00 2001
|
||
|
|
From: liuzekun <liuzekun@huawei.com>
|
||
|
|
Date: Tue, 5 Nov 2019 23:07:49 -0500
|
||
|
|
Subject: [PATCH] containerd: containerd-shim exit initiative after 3s
|
||
|
|
|
||
|
|
reason: containerd-shim exit initiative after 3s
|
||
|
|
|
||
|
|
Signed-off-by: liuzekun <liuzekun@huawei.com>
|
||
|
|
---
|
||
|
|
runtime/v1/shim/service.go | 4 ++++
|
||
|
|
1 file changed, 4 insertions(+)
|
||
|
|
|
||
|
|
diff --git a/runtime/v1/shim/service.go b/runtime/v1/shim/service.go
|
||
|
|
index 326096c..3abaa99 100644
|
||
|
|
--- a/runtime/v1/shim/service.go
|
||
|
|
+++ b/runtime/v1/shim/service.go
|
||
|
|
@@ -548,6 +548,10 @@ func (s *Service) checkProcesses(e runc.Exit) {
|
||
|
|
ns := filepath.Base(filepath.Dir(ip.Bundle))
|
||
|
|
events.ExitAddFile(ns, events.ExitFile(s.id, uint32(e.Pid), uint32(e.Status)), "init exited")
|
||
|
|
events.InitExitWrite(ip.Bundle, e.Pid)
|
||
|
|
+ go func() {
|
||
|
|
+ time.Sleep(3 * time.Second)
|
||
|
|
+ os.Exit(0)
|
||
|
|
+ }()
|
||
|
|
}
|
||
|
|
if shouldKillAll {
|
||
|
|
if ip, ok := p.(*proc.Init); ok {
|
||
|
|
--
|
||
|
|
2.20.1
|
||
|
|
|