!117 Fix the abnormal logic of starting the container time out.

From: @xu_lei_123 
Reviewed-by: @zhong-jiawei-1, @zhangsong234, @duguhaotian 
Signed-off-by: @duguhaotian
This commit is contained in:
openeuler-ci-bot 2023-10-25 06:33:52 +00:00 committed by Gitee
commit dbc8a45bdd
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -92,7 +92,7 @@ diff --git a/vendor/github.com/containerd/go-runc/runc.go b/vendor/github.com/co
index 0feedeb..15fc8e1 100644
--- a/vendor/github.com/containerd/go-runc/runc.go
+++ b/vendor/github.com/containerd/go-runc/runc.go
@@ -54,8 +54,22 @@ const (
@@ -54,8 +54,20 @@ const (
Text Format = "text"
// DefaultCommand is the default command for Runc
DefaultCommand = "runc"
@ -105,9 +105,7 @@ index 0feedeb..15fc8e1 100644
+
+func init() {
+ runtimeTimeout, err := convertTime(os.Getenv("DOCKER_RUNTIME_START_TIMEOUT"))
+ if err != nil {
+ logrus.Warnf("init error, wrong runtimeTimeout format: %v", err)
+ } else {
+ if err == nil {
+ createTimeout = runtimeTimeout
+ }
+}