Skip to content

Commit e9b8903

Browse files
authored
Merge pull request #54 from elezar/fix-is-fabric-attached
Treat zero cluster UUID as non-fabric-attached
2 parents 94240b4 + 311c577 commit e9b8903

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

pkg/nvlib/device/device.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,9 @@ func (d *device) IsFabricAttached() (bool, error) {
222222
if info.State != nvml.GPU_FABRIC_STATE_COMPLETED {
223223
return false, nil
224224
}
225+
if info.ClusterUuid == [16]uint8{} {
226+
return false, nil
227+
}
225228
if nvml.Return(info.Status) != nvml.SUCCESS {
226229
return false, nil
227230
}
@@ -240,6 +243,9 @@ func (d *device) IsFabricAttached() (bool, error) {
240243
if info.State != nvml.GPU_FABRIC_STATE_COMPLETED {
241244
return false, nil
242245
}
246+
if info.ClusterUuid == [16]uint8{} {
247+
return false, nil
248+
}
243249
if nvml.Return(info.Status) != nvml.SUCCESS {
244250
return false, nil
245251
}

0 commit comments

Comments
 (0)