Workflow of network interface naming¶
To simplify operations with L2 templates, before you start creating them, inspect the general workflow of a network interface name gathering and processing.
Network interface naming workflow:
The Operator creates a
baremetalHost
object.The
baremetalHost
object executes theintrospection
stage and becomesready
.The Operator collects information about NIC count, naming, and so on for further changes in the mapping logic.
At this stage, the NICs order in the object may randomly change during each introspection, but the NICs names are always the same. For more details, see Predictable Network Interface Names.
For example:
# Example commands: # kubectl -n managed-ns get bmh baremetalhost1 -o custom-columns='NAME:.metadata.name,STATUS:.status.provisioning.state' # NAME STATE # baremetalhost1 ready # kubectl -n managed-ns get bmh baremetalhost1 -o yaml # Example output: apiVersion: metal3.io/v1alpha1 kind: BareMetalHost ... status: ... nics: - ip: fe80::ec4:7aff:fe6a:fb1f%eno2 mac: 0c:c4:7a:6a:fb:1f model: 0x8086 0x1521 name: eno2 pxe: false - ip: fe80::ec4:7aff:fe1e:a2fc%ens1f0 mac: 0c:c4:7a:1e:a2:fc model: 0x8086 0x10fb name: ens1f0 pxe: false - ip: fe80::ec4:7aff:fe1e:a2fd%ens1f1 mac: 0c:c4:7a:1e:a2:fd model: 0x8086 0x10fb name: ens1f1 pxe: false - ip: 192.168.1.151 # Temp. PXE network adress mac: 0c:c4:7a:6a:fb:1e model: 0x8086 0x1521 name: eno1 pxe: true ...
The Operator selects from the following options:
Create an
l2template
object with theifMapping
configuration. For details, see Create L2 templates.Create a
Machine
object, with thel2TemplateIfMappingOverride
configuration. For details, see Override network interfaces naming and order.
The Operator creates a
Machine
orSubnet
object.The
baremetal-provider
service links theMachine
object to thebaremetalHost
object.The
kaas-ipam
andbaremetal-provider
services collect hardware information from thebaremetalHost
object and use it to configure host networking and services.The
kaas-ipam
service:Spawns the
IpamHost
object.Renders the
l2template
object.Spawns the
ipaddr
object.Updates the
IpamHost
object status with all rendered and linked information.
The
baremetal-provider
service collects the rendered networking information from theIpamHost
objectThe
baremetal-provider
service proceeds with theIpamHost
object provisioning.