From 27a286c9bb03e33a352e54a299dd67560f3cfa54 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Wed, 15 Mar 2017 09:44:30 +0000 Subject: [PATCH] Add an inspector rule to store the PXE interface MAC address This is useful for configuring the IP address on the correct interface when the node first boots. --- ansible/group_vars/all/bifrost | 1 + ansible/group_vars/all/inspector | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/ansible/group_vars/all/bifrost b/ansible/group_vars/all/bifrost index 9d691b714..3929c039a 100644 --- a/ansible/group_vars/all/bifrost +++ b/ansible/group_vars/all/bifrost @@ -72,6 +72,7 @@ kolla_bifrost_inspector_rules: - "{{ inspector_rule_local_boot }}" - "{{ inspector_rule_root_hint_init }}" - "{{ inspector_rule_root_hint_serial }}" + - "{{ inspector_rule_set_pxe_interface_mac }}" - "{{ inspector_rule_eno3_lldp_switch_port_desc_to_name }}" # Ironic inspector IPMI username to set. diff --git a/ansible/group_vars/all/inspector b/ansible/group_vars/all/inspector index 01b73989b..837086f46 100644 --- a/ansible/group_vars/all/inspector +++ b/ansible/group_vars/all/inspector @@ -97,6 +97,18 @@ inspector_rule_root_hint_serial: path: "properties/root_device/serial" value: "{data[root_disk][serial]}" +# Ironic inspector rule to set the interface on which the node PXE booted. +inspector_rule_set_pxe_interface_mac: + description: "Set node PXE interface MAC address" + conditions: + - field: "data://boot_interface" + op: "is-empty" + invert: True + actions: + - action: "set-attribute" + path: "extra/pxe_interface_mac" + value: "{data[boot_interface]}" + # Ironic inspector rule to set the node's name from eno3's LLDP switch port # description. inspector_rule_eno3_lldp_switch_port_desc_to_name: