Skip to content

Commit

Permalink
Don't override preprovisioningNetworkDataName
Browse files Browse the repository at this point in the history
If already set in the BMH and not provided in baremetalSpec
don't override preprovisioningNetworkDataName.

Signed-off-by: rabi <[email protected]>
  • Loading branch information
rabi committed Mar 18, 2024
1 parent e5f6ab9 commit 06947f2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/openstackbaremetalset/baremetalhost.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,10 @@ func BaremetalHostProvision(
foundBaremetalHost.Spec.AutomatedCleaningMode = metal3v1.AutomatedCleaningMode(instance.Spec.AutomatedCleaningMode)

// Ensure PreprovisioningNetworkDataName is set as per spec
foundBaremetalHost.Spec.PreprovisioningNetworkDataName = instance.Spec.BaremetalHosts[hostName].PreprovisioningNetworkDataName
preprovNetworkData := instance.Spec.BaremetalHosts[hostName].PreprovisioningNetworkDataName
if preprovNetworkData != "" {
foundBaremetalHost.Spec.PreprovisioningNetworkDataName = preprovNetworkData
}

//
// Ensure the image url is up to date unless already provisioned
Expand Down

0 comments on commit 06947f2

Please sign in to comment.