从pod annotations获取信息挂载device new 6

This commit is contained in:
funnyfunny
2023-08-12 15:31:05 +08:00
parent 522ee8e4a6
commit 817e10af4c

View File

@@ -501,7 +501,8 @@ func addDevice(spec *specs.Spec) error {
// 获取对应pod annotation中的设备信息
annotationDevices, err := getDeviceFromPod(spec)
if err != nil && err != notMatchError {
return fmt.Errorf("failed to get pod device: %#v", err)
hwlog.RunLog.Errorf("getDeviceFromPod failed: %#v", err)
//return fmt.Errorf("failed to get pod device: %#v", err)
}
// 如果没有匹配到pod或annotation则通过环境变量挂载设备