mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-25 05:21:33 +00:00
Use 'none' instead of 'NONE' to skip containerd restart
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
d8ed16585a
commit
5d4ecc24cb
@ -91,7 +91,7 @@ testing::containerd::toolkit::test_config() {
|
|||||||
"${toolkit_container_image}" -c "containerd setup \
|
"${toolkit_container_image}" -c "containerd setup \
|
||||||
--config=${output_config} \
|
--config=${output_config} \
|
||||||
--socket=${containerd_dind_containerd_dir}/containerd.sock \
|
--socket=${containerd_dind_containerd_dir}/containerd.sock \
|
||||||
--restart-mode=NONE \
|
--restart-mode=none \
|
||||||
/usr/local/nvidia/toolkit"
|
/usr/local/nvidia/toolkit"
|
||||||
|
|
||||||
# As a basic test we check that the config has changed
|
# 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 \
|
"${toolkit_container_image}" -c "containerd cleanup \
|
||||||
--config=${output_config} \
|
--config=${output_config} \
|
||||||
--socket=${containerd_dind_containerd_dir}/containerd.sock \
|
--socket=${containerd_dind_containerd_dir}/containerd.sock \
|
||||||
--restart-mode=NONE \
|
--restart-mode=none \
|
||||||
/usr/local/nvidia/toolkit"
|
/usr/local/nvidia/toolkit"
|
||||||
|
|
||||||
if [[ -s "${input_config}" ]]; then
|
if [[ -s "${input_config}" ]]; then
|
||||||
|
@ -33,7 +33,7 @@ import (
|
|||||||
const (
|
const (
|
||||||
restartModeSignal = "signal"
|
restartModeSignal = "signal"
|
||||||
restartModeSystemd = "systemd"
|
restartModeSystemd = "systemd"
|
||||||
restartModeNone = "NONE"
|
restartModeNone = "none"
|
||||||
|
|
||||||
nvidiaRuntimeName = "nvidia"
|
nvidiaRuntimeName = "nvidia"
|
||||||
nvidiaRuntimeBinary = "nvidia-container-runtime"
|
nvidiaRuntimeBinary = "nvidia-container-runtime"
|
||||||
@ -154,7 +154,7 @@ func main() {
|
|||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "restart-mode",
|
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,
|
Value: defaultRestartMode,
|
||||||
Destination: &options.restartMode,
|
Destination: &options.restartMode,
|
||||||
EnvVars: []string{"CONTAINERD_RESTART_MODE"},
|
EnvVars: []string{"CONTAINERD_RESTART_MODE"},
|
||||||
|
@ -144,7 +144,7 @@ func main() {
|
|||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "restart-mode",
|
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,
|
Value: defaultRestartMode,
|
||||||
Destination: &options.restartMode,
|
Destination: &options.restartMode,
|
||||||
EnvVars: []string{"DOCKER_RESTART_MODE"},
|
EnvVars: []string{"DOCKER_RESTART_MODE"},
|
||||||
|
Loading…
Reference in New Issue
Block a user