File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -456,11 +456,17 @@ func (c *Config) UpdateFromFile(path string) error {
456456 t := new (tomlConfig )
457457 t .fromConfig (c )
458458
459- _ , err = toml .Decode (string (data ), t )
459+ metadata , err : = toml .Decode (string (data ), t )
460460 if err != nil {
461461 return fmt .Errorf ("unable to decode configuration %v: %v" , path , err )
462462 }
463463
464+ runtimesKey := []string {"crio" , "runtime" , "default_runtime" }
465+ if metadata .IsDefined (runtimesKey ... ) &&
466+ t .Crio .Runtime .RuntimeConfig .DefaultRuntime != defaultRuntime {
467+ delete (c .Runtimes , defaultRuntime )
468+ }
469+
464470 t .toConfig (c )
465471 c .singleConfigPath = path
466472 return nil
Original file line number Diff line number Diff line change @@ -110,7 +110,8 @@ grpc_max_recv_msg_size = {{ .GRPCMaxRecvMsgSize }}
110110{{ range $ulimit := .DefaultUlimits }}{{ printf "#\t%q,\n" $ulimit }}{{ end }}#]
111111
112112# default_runtime is the _name_ of the OCI runtime to be used as the default.
113- # The name is matched against the runtimes map below.
113+ # The name is matched against the runtimes map below. If this value is changed,
114+ # the corresponding existing entry from the runtimes map below will be ignored.
114115default_runtime = "{{ .DefaultRuntime }}"
115116
116117# If true, the runtime will not use pivot_root, but instead use MS_MOVE.
You can’t perform that action at this time.
0 commit comments