You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a device id is not present in the pci id file it defaults to using the device id as the device name. However device name normalization and capitalization for use in the environment variable only occurs in getDeviceName during pci id lookup. This results in the resource name staying lowercase as well as the resource name portion of the environment variable. Kubevirt expects an all uppercase environment variable.
Suggested fixes include:
+++ b/pkg/device_plugin/device_plugin.go
@@ -101,7 +101,7 @@ func createDevicePlugins() {
deviceName := getDeviceName(k)
if deviceName == "" {
log.Printf("Error: Could not find device name for device id: %s", k)
- deviceName = k
+ deviceName = strings.ToUpper(k)
}
log.Printf("DP Name %s", deviceName)
dp := NewGenericDevicePlugin(deviceName, "/sys/kernel/iommu_groups/", devs)
@@ -123,7 +123,7 @@ func createDevicePlugins() {
}
deviceName := getDeviceName(k)
if deviceName == "" {
- deviceName = k
+ deviceName = strings.ToUpper(k)
}
log.Printf("DP Name %s", deviceName)
dp := NewGenericVGpuDevicePlugin(deviceName, vGpuBasePath, devs)
We've decided to use the internal kubevirt device plugin but I thought I'd drop a note since I ran across this during some testing. I'm unsure which method would be preferred and I have to focus my efforts elsewhere (depending on the fix some test cases will also need to be adjusted and/or added). I should also note that the capitalization test Returns the device name from pci.ids in capital letters test in pkg/device_plugin/device_plugin_test.go is using a device name that is already in all caps.
If a device id is not present in the pci id file it defaults to using the device id as the device name. However device name normalization and capitalization for use in the environment variable only occurs in getDeviceName during pci id lookup. This results in the resource name staying lowercase as well as the resource name portion of the environment variable. Kubevirt expects an all uppercase environment variable.
Suggested fixes include:
or possibly
The text was updated successfully, but these errors were encountered: