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{