infiniband: Handle iWARP* RDMA modules N/A (#974)

* infiniband: Add not connected i40iw0/ports/1 fixtures
* infiniband: Handle issue when iWARP* RDMA modules are not available

This is related to #966, and handle this error,

Jun 07 13:33:24 hostname node_exporter[81888]: time="2018-06-07T13:33:24+02:00" level=error msg="ERROR: infiniband
collector failed after 0.000929s: strconv.ParseUint: parsing \"N/A (no PMA)\": invalid syntax" source="collector.go:132"

Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
This commit is contained in:
Mario Trangoni 2018-10-04 15:05:59 +02:00 committed by Ben Kochie
commit 3659260b66
5 changed files with 116 additions and 1 deletions

View file

@ -23,7 +23,7 @@ func TestInfiniBandDevices(t *testing.T) {
t.Fatal(err)
}
if l := len(devices); l != 1 {
if l := len(devices); l != 2 {
t.Fatalf("Retrieved an unexpected number of InfiniBand devices: %d", l)
}
}