From b6efd3091d0251c00c32edbe3a4962b97b210847 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Tue, 21 Mar 2023 15:52:22 +0200 Subject: [PATCH] Use index and uuid as default device-name-strategies Signed-off-by: Evan Lezar --- CHANGELOG.md | 1 + cmd/nvidia-ctk/cdi/generate/generate.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2838e367..3863cef1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Add support for extracting device major number from `/proc/devices` if `nvidia` is used as a device name over `nvidia-frontend`. * Allow multiple device naming strategies for `nvidia-ctk cdi generate` command. This allows a single CDI spec to be generated that includes GPUs by index and UUID. +* Set the default `--device-name-strategy` for the `nvidia-ctk cdi generate` command to `[index, uuid]`. ## v1.15.0-rc.3 * Fix bug in `nvidia-ctk hook update-ldcache` where default `--ldconfig-path` value was not applied. diff --git a/cmd/nvidia-ctk/cdi/generate/generate.go b/cmd/nvidia-ctk/cdi/generate/generate.go index e6abf432..f3758176 100644 --- a/cmd/nvidia-ctk/cdi/generate/generate.go +++ b/cmd/nvidia-ctk/cdi/generate/generate.go @@ -112,7 +112,7 @@ func (m command) build() *cli.Command { &cli.StringSliceFlag{ Name: "device-name-strategy", Usage: "Specify the strategy for generating device names. If this is specified multiple times, the devices will be duplicated for each strategy. One of [index | uuid | type-index]", - Value: cli.NewStringSlice(nvcdi.DeviceNameStrategyIndex), + Value: cli.NewStringSlice(nvcdi.DeviceNameStrategyIndex, nvcdi.DeviceNameStrategyUUID), Destination: &opts.deviceNameStrategies, }, &cli.StringFlag{