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 <bergwolf@hyper.sh>
This commit is contained in:
Peng Tao 2020-04-29 03:20:04 -07:00
parent 6de95bf36c
commit 06b3f313a2

View File

@ -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)