Skip to content

Commit 6537e38

Browse files
author
Graham Whaley
committed
gpu: do not fail if device scanning fails
If we fail to scan for GPU devices (note, that is potentially different from not finding any devices during a scan), then warn on it, and go around the poll loop again. Do not treat it as a fatal error or we might end up in a re-launch death deploy loop... Of course, getting a warning in your logs every 5s could also be annoying, but is somewhat 'less fatal'. Fixes: #260 Fixes: #230 Signed-off-by: Graham Whaley <[email protected]>
1 parent 9d76946 commit 6537e38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/gpu_plugin/gpu_plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func (dp *devicePlugin) Scan(notifier dpapi.Notifier) error {
6868
for {
6969
devTree, err := dp.scan()
7070
if err != nil {
71-
return err
71+
fmt.Println("WARNING: Failed to scan: ", err)
7272
}
7373

7474
notifier.Notify(devTree)

0 commit comments

Comments
 (0)