Use 'none' instead of 'NONE' to skip containerd restart

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2022-02-18 16:38:11 +02:00
parent d8ed16585a
commit 5d4ecc24cb
3 changed files with 5 additions and 5 deletions

View File

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

View File

@ -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"},

View File

@ -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"},