diff --git a/pkg/openstackbaremetalset/baremetalhost.go b/pkg/openstackbaremetalset/baremetalhost.go index 93b2dd4..45cd0f6 100644 --- a/pkg/openstackbaremetalset/baremetalhost.go +++ b/pkg/openstackbaremetalset/baremetalhost.go @@ -253,7 +253,11 @@ func BaremetalHostProvision( // Update status with BMH provisioning details // bmhStatus.UserDataSecretName = userDataSecret.Name - bmhStatus.NetworkDataSecretName = networkDataSecret.Name + if networkDataSecret != nil { + bmhStatus.NetworkDataSecretName = networkDataSecret.Name + } else { + bmhStatus.NetworkDataSecretName = preProvNetworkData + } bmhStatus.ProvisioningState = baremetalv1.ProvisioningState(foundBaremetalHost.Status.Provisioning.State) instance.Status.BaremetalHosts[hostName] = bmhStatus