Use BinaryName for v1 containerd runtime config

This fixes a bug where the runtime path for v1 containerd configs
was specified in the options.Runtime setting (which is used
for the default runtime) instead of options.BinaryName.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar
2022-05-25 20:09:18 +02:00
parent b940294557
commit 4cd719692e
4 changed files with 32 additions and 23 deletions

View File

@@ -31,10 +31,9 @@ type configV1 struct {
func newConfigV1(cfg *toml.Tree) UpdateReverter {
c := configV1{
config: config{
Tree: cfg,
version: 1,
cri: "cri",
binaryKey: "Runtime",
Tree: cfg,
version: 1,
cri: "cri",
},
}
@@ -68,7 +67,7 @@ func (config *configV1) Update(o *options) error {
log.Warnf("Setting default_runtime is deprecated")
defaultRuntimePath := append(config.containerdPath(), "default_runtime")
config.initRuntime(defaultRuntimePath, o.runtimeType, runtimeBinary)
config.initRuntime(defaultRuntimePath, o.runtimeType, "Runtime", runtimeBinary)
}
return nil
}