From 4c9a6da3f15c260eadc6dc00c15bad1fa9d6a8a0 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Thu, 15 Jun 2017 14:52:23 +0100 Subject: [PATCH] Support interface name map for Dell LLDP switch port workaround The current implementation only works if all compute nodes in the system have the same interface name for their provisioning network. This change adds a default value and a map for exceptions --- ansible/group_vars/all/inspector | 10 +++++++--- ...rcloud-introspection-rules-dell-lldp-workaround.yml | 2 +- etc/kayobe/inspector.yml | 10 +++++++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ansible/group_vars/all/inspector b/ansible/group_vars/all/inspector index a4440c78e..6474f8e41 100644 --- a/ansible/group_vars/all/inspector +++ b/ansible/group_vars/all/inspector @@ -58,9 +58,13 @@ inspector_ipmi_username: "{{ ipmi_username }}" # Ironic inspector IPMI password to set. inspector_ipmi_password: "{{ ipmi_password }}" -# Ironic inspector network interface name on which to check for an LLDP switch -# port description to use as the node's name. -inspector_lldp_switch_port_interface: +# Ironic inspector default network interface name on which to check for an LLDP +# switch port description to use as the node's name. +inspector_lldp_switch_port_interface_default: + +# Ironic inspector map from hostname to network interface name on which to +# check for an LLDP switch port description to use as the node's name. +inspector_lldp_switch_port_interface_map: {} ############################################################################### # Ironic inspector introspection rules configuration. diff --git a/ansible/overcloud-introspection-rules-dell-lldp-workaround.yml b/ansible/overcloud-introspection-rules-dell-lldp-workaround.yml index 6cc68b65a..a7af1c232 100644 --- a/ansible/overcloud-introspection-rules-dell-lldp-workaround.yml +++ b/ansible/overcloud-introspection-rules-dell-lldp-workaround.yml @@ -53,7 +53,7 @@ - action: "set-attribute" path: "name" value: "{{ item.1.1.description }}" - inspector_rule_var_lldp_switch_port_interface: "{{ inspector_lldp_switch_port_interface }}" + inspector_rule_var_lldp_switch_port_interface: "{{ inspector_lldp_switch_port_interface_map.get(item.1.1.description, inspector_lldp_switch_port_interface_default) }}" pre_tasks: - name: Validate OpenStack password authentication parameters diff --git a/etc/kayobe/inspector.yml b/etc/kayobe/inspector.yml index 7d5448770..3bbb5ac7e 100644 --- a/etc/kayobe/inspector.yml +++ b/etc/kayobe/inspector.yml @@ -45,9 +45,13 @@ # Ironic inspector IPMI password to set. #inspector_ipmi_password: -# Ironic inspector network interface name on which to check for an LLDP switch -# port description to use as the node's name. -#inspector_lldp_switch_port_interface: +# Ironic inspector default network interface name on which to check for an LLDP +# switch port description to use as the node's name. +#inspector_lldp_switch_port_interface_default: + +# Ironic inspector map from hostname to network interface name on which to +# check for an LLDP switch port description to use as the node's name. +#inspector_lldp_switch_port_interface_map: ############################################################################### # Ironic inspector introspection rules configuration.