Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions data/data/install.openshift.io_installconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1435,6 +1435,11 @@ spec:
description: APIVIP is the VIP to use for internal API communication
format: ip
type: string
boostrapProvisioningInterfaceOverride:
description: BootstrapProvisioningInterface override. If set,
it sets the interface that the bootstrap node will use to host
its ProvisioningIP.
type: string
bootstrapOSImage:
description: BootstrapOSImage is a URL to override the default
OS image for the bootstrap node. The URL must contain a sha256
Expand Down
12 changes: 10 additions & 2 deletions pkg/asset/ignition/bootstrap/baremetal/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ func GetTemplateData(config *baremetal.Platform, networks []types.MachineNetwork
cidr, _ := config.ProvisioningNetworkCIDR.Mask.Size()
templateData.ProvisioningCIDR = cidr
templateData.ProvisioningIPv6 = config.ProvisioningNetworkCIDR.IP.To4() == nil
templateData.ProvisioningInterface = "ens4"
if config.BootstrapProvisioningInterfaceOverride == "" {
templateData.ProvisioningInterface = "ens4"
} else {
templateData.ProvisioningInterface = config.BootstrapProvisioningInterfaceOverride
}
templateData.ProvisioningDNSMasq = true
}

Expand All @@ -95,7 +99,11 @@ func GetTemplateData(config *baremetal.Platform, networks []types.MachineNetwork
}
templateData.ProvisioningDHCPAllowList = strings.Join(dhcpAllowList, " ")
case baremetal.DisabledProvisioningNetwork:
templateData.ProvisioningInterface = "ens3"
if config.BootstrapProvisioningInterfaceOverride == "" {
templateData.ProvisioningInterface = "ens3"
} else {
templateData.ProvisioningInterface = config.BootstrapProvisioningInterfaceOverride
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This nic is defined in the (installer created) bootstrap VM - so I'm not sure it's reasonable to expect the user to somehow know what the appropriate nic name is here?

I'm wondering why the VM nic name is different in your environment (which is ARM I believe) - is there some way we can make the nic name consistent between architectures instead, or else detect the required value based on the architecture?

}
templateData.ProvisioningDNSMasq = false

if templateData.ProvisioningIP != "" {
Expand Down
5 changes: 5 additions & 0 deletions pkg/types/baremetal/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ type Platform struct {
// +optional
ProvisioningNetworkInterface string `json:"provisioningNetworkInterface"`

// BootstrapProvisioningInterface override. If set, it sets the interface that the
// bootstrap node will use to host its ProvisioningIP.
// +optional
BootstrapProvisioningInterfaceOverride string `json:"bootstrapProvisioningInterfaceOverride"`

// ProvisioningNetworkCIDR defines the network to use for provisioning.
// +optional
ProvisioningNetworkCIDR *ipnet.IPNet `json:"provisioningNetworkCIDR,omitempty"`
Expand Down