From a819cfdab413d5699dd5fc90e92144a69fcb0acb Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Fri, 20 Sep 2024 20:26:00 +0200 Subject: [PATCH] Revert "Merge pull request #703 from elezar/fix-no-persistenced-flag" This reverts commit c02b144ed4de77261178c883c76b5cedbfd361a3, reversing changes made to b061446694a04e1f63471016eb577151d1830f80. Signed-off-by: Evan Lezar --- cmd/nvidia-container-runtime-hook/main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/nvidia-container-runtime-hook/main.go b/cmd/nvidia-container-runtime-hook/main.go index a4a963f4..f53a649a 100644 --- a/cmd/nvidia-container-runtime-hook/main.go +++ b/cmd/nvidia-container-runtime-hook/main.go @@ -90,6 +90,11 @@ func doPrestart() { args := []string{getCLIPath(cli)} + // Only include the nvidia-persistenced socket if it is explicitly enabled. + if !hook.Features.IncludePersistencedSocket.IsEnabled() { + args = append(args, "--no-persistenced") + } + if cli.Root != "" { args = append(args, fmt.Sprintf("--root=%s", cli.Root)) } @@ -112,11 +117,6 @@ func doPrestart() { } args = append(args, "configure") - // Only include the nvidia-persistenced socket if it is explicitly enabled. - if !hook.Features.IncludePersistencedSocket.IsEnabled() { - args = append(args, "--no-persistenced") - } - if ldconfigPath := cli.NormalizeLDConfigPath(); ldconfigPath != "" { args = append(args, fmt.Sprintf("--ldconfig=%s", ldconfigPath)) }