Skip to content

Commit 03780e0

Browse files
Merge pull request #8443 from honza/master-nil
OCPBUGS-34082: baremetal: check if HardwareDetails is nil
2 parents 98c5d71 + 52aec6b commit 03780e0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/infrastructure/baremetal/variables.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@ func getMasterAddresses(dir string) ([]string, error) {
9999
}
100100

101101
for _, bmh := range hosts {
102+
logrus.Debug(" bmh:", bmh.Name)
103+
104+
if bmh.Status.HardwareDetails == nil {
105+
logrus.Debug(" HardwareDetails nil, skipping")
106+
continue
107+
}
108+
102109
for _, nic := range bmh.Status.HardwareDetails.NIC {
103110
masters = append(masters, nic.IP)
104111
}

0 commit comments

Comments
 (0)