Revert "Merge pull request #694 from elezar/add-opt-in-to-sockets"

This reverts commit b061446694, reversing
changes made to c490baab63.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar
2024-09-20 20:26:16 +02:00
parent a819cfdab4
commit 5145b0a4b6
12 changed files with 52 additions and 103 deletions

View File

@@ -89,12 +89,6 @@ func doPrestart() {
rootfs := getRootfsPath(container)
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))
}

View File

@@ -60,8 +60,6 @@ type options struct {
files cli.StringSlice
ignorePatterns cli.StringSlice
}
includePersistencedSocket bool
}
// NewCommand constructs a generate-cdi command with the specified logger
@@ -171,11 +169,6 @@ func (m command) build() *cli.Command {
Usage: "Specify a pattern the CSV mount specifications.",
Destination: &opts.csv.ignorePatterns,
},
&cli.BoolFlag{
Name: "include-persistenced-socket",
Usage: "Include the nvidia-persistenced socket in the generated CDI specification.",
Destination: &opts.includePersistencedSocket,
},
}
return &c
@@ -280,7 +273,6 @@ func (m command) generateSpec(opts *options) (spec.Interface, error) {
nvcdi.WithLibrarySearchPaths(opts.librarySearchPaths.Value()),
nvcdi.WithCSVFiles(opts.csv.files.Value()),
nvcdi.WithCSVIgnorePatterns(opts.csv.ignorePatterns.Value()),
nvcdi.WithOptInFeature("include-persistenced-socket", opts.includePersistencedSocket),
)
if err != nil {
return nil, fmt.Errorf("failed to create CDI library: %v", err)