Skip to content

Commit 0abd37f

Browse files
committed
pkg/ifaceprobe: note error only when res.Err is not null
Seeing iface-probe run exits abnormally: ``` [FATAL] interface probing failed: failed to execute prog: %!w(<nil>) (Crashed) r0 = openat(0xffffffffffffff9c, &(0x7f0000000080)='/sys/devices/pci0000:00/0000:00:01.1/ ata1/host0/target0:0:0/0:0:0:0/block/sda/queue/scheduler', 0x1, 0x0) write(r0, &(0x7f0000000100)=' ', 0x1) exit status 1 ``` The node to have this `%!w(nil>) (Crashed)` is random, but continue when res.Err is null bypass the problem.
1 parent 77908e5 commit 0abd37f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/ifaceprobe/ifaceprobe.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,10 @@ func (pr *prober) submitFile(file string) {
217217
for _, req := range reqs {
218218
res := req.Wait(pr.ctx)
219219
if res.Status != queue.Success {
220-
pr.noteError(fmt.Errorf("failed to execute prog: %w (%v)\n%s\n%s",
221-
res.Err, res.Status, req.Prog.Serialize(), res.Output))
220+
if res.Err != nil {
221+
pr.noteError(fmt.Errorf("failed to execute prog: %w (%v)\n%s\n%s",
222+
res.Err, res.Status, req.Prog.Serialize(), res.Output))
223+
}
222224
continue
223225
}
224226
desc.results = append(desc.results, res)

0 commit comments

Comments
 (0)