From 06b3f313a2e20afd4720e6ed8debf7cff146772a Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Wed, 29 Apr 2020 03:20:04 -0700 Subject: [PATCH] shimv2: do not reset service config Only load runtime config when it is not set. We do not expect a service's runtime config to change while it is running. Signed-off-by: Peng Tao --- src/runtime/containerd-shim-v2/create.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/runtime/containerd-shim-v2/create.go b/src/runtime/containerd-shim-v2/create.go index 01949908f..e981039f9 100644 --- a/src/runtime/containerd-shim-v2/create.go +++ b/src/runtime/containerd-shim-v2/create.go @@ -148,6 +148,9 @@ func loadSpec(r *taskAPI.CreateTaskRequest) (*specs.Spec, string, error) { // 2. shimv2 create task option // 3. environment func loadRuntimeConfig(s *service, r *taskAPI.CreateTaskRequest, anno map[string]string) (*oci.RuntimeConfig, error) { + if s.config != nil { + return s.config, nil + } configPath := oci.GetSandboxConfigPath(anno) if configPath == "" && r.Options != nil { v, err := typeurl.UnmarshalAny(r.Options)