From 530d66b5c7e9882965ea383f93d9c48d3c46fc21 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Fri, 27 May 2022 16:20:06 +0200 Subject: [PATCH] Also set default_runtime.options.BinaryName Signed-off-by: Evan Lezar --- tools/container/containerd/config_v1.go | 1 + tools/container/containerd/config_v1_test.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/container/containerd/config_v1.go b/tools/container/containerd/config_v1.go index f3121c18..e744cd7f 100644 --- a/tools/container/containerd/config_v1.go +++ b/tools/container/containerd/config_v1.go @@ -68,6 +68,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, "Runtime", runtimeBinary) + config.initRuntime(defaultRuntimePath, o.runtimeType, "BinaryName", runtimeBinary) } return nil } diff --git a/tools/container/containerd/config_v1_test.go b/tools/container/containerd/config_v1_test.go index 0b69f5aa..993d4f1d 100644 --- a/tools/container/containerd/config_v1_test.go +++ b/tools/container/containerd/config_v1_test.go @@ -336,7 +336,8 @@ func defaultRuntimeV1(binary string) map[string]interface{} { "runtime_engine": "", "privileged_without_host_devices": false, "options": map[string]interface{}{ - "Runtime": binary, + "BinaryName": binary, + "Runtime": binary, }, } }