From 5d4ecc24cb55ca072f4e93d423b74f33b2675170 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Fri, 18 Feb 2022 16:38:11 +0200 Subject: [PATCH] Use 'none' instead of 'NONE' to skip containerd restart Signed-off-by: Evan Lezar --- test/container/containerd_test.sh | 4 ++-- tools/container/containerd/containerd.go | 4 ++-- tools/container/docker/docker.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/container/containerd_test.sh b/test/container/containerd_test.sh index 8b2d53ba..98cfe165 100755 --- a/test/container/containerd_test.sh +++ b/test/container/containerd_test.sh @@ -91,7 +91,7 @@ testing::containerd::toolkit::test_config() { "${toolkit_container_image}" -c "containerd setup \ --config=${output_config} \ --socket=${containerd_dind_containerd_dir}/containerd.sock \ - --restart-mode=NONE \ + --restart-mode=none \ /usr/local/nvidia/toolkit" # As a basic test we check that the config has changed @@ -107,7 +107,7 @@ testing::containerd::toolkit::test_config() { "${toolkit_container_image}" -c "containerd cleanup \ --config=${output_config} \ --socket=${containerd_dind_containerd_dir}/containerd.sock \ - --restart-mode=NONE \ + --restart-mode=none \ /usr/local/nvidia/toolkit" if [[ -s "${input_config}" ]]; then diff --git a/tools/container/containerd/containerd.go b/tools/container/containerd/containerd.go index 9bd684d5..23566f67 100644 --- a/tools/container/containerd/containerd.go +++ b/tools/container/containerd/containerd.go @@ -33,7 +33,7 @@ import ( const ( restartModeSignal = "signal" restartModeSystemd = "systemd" - restartModeNone = "NONE" + restartModeNone = "none" nvidiaRuntimeName = "nvidia" nvidiaRuntimeBinary = "nvidia-container-runtime" @@ -154,7 +154,7 @@ func main() { }, &cli.StringFlag{ Name: "restart-mode", - Usage: "Specify how containerd should be restarted; [signal | systemd]", + Usage: "Specify how containerd should be restarted; If 'none' is selected, it will not be restarted [signal | systemd | none]", Value: defaultRestartMode, Destination: &options.restartMode, EnvVars: []string{"CONTAINERD_RESTART_MODE"}, diff --git a/tools/container/docker/docker.go b/tools/container/docker/docker.go index 65e972b1..21866a1b 100644 --- a/tools/container/docker/docker.go +++ b/tools/container/docker/docker.go @@ -144,7 +144,7 @@ func main() { }, &cli.StringFlag{ Name: "restart-mode", - Usage: "Specify how docker should be restarted; If NONE is selected, docker will not be restarted [signal | none]", + Usage: "Specify how docker should be restarted; If 'none' is selected it will not be restarted [signal | none]", Value: defaultRestartMode, Destination: &options.restartMode, EnvVars: []string{"DOCKER_RESTART_MODE"},