diff --git a/ansible/group_vars/all/bifrost b/ansible/group_vars/all/bifrost index 720dc7e5f..e6a57d571 100644 --- a/ansible/group_vars/all/bifrost +++ b/ansible/group_vars/all/bifrost @@ -49,7 +49,7 @@ kolla_bifrost_inspector_processing_hooks: "{{ inspector_processing_hooks }}" # Which MAC addresses to add as ports during introspection. One of 'all', # 'active' or 'pxe'. -kolla_bifrost_inspector_port_addition: "{{ inspector_port_addition }}" +kolla_bifrost_inspector_port_addition: "{{ inspector_add_ports }}" # List of extra kernel parameters for the inspector default PXE configuration. kolla_bifrost_inspector_extra_kernel_options: "{{ inspector_extra_kernel_options }}" diff --git a/ansible/group_vars/all/inspector b/ansible/group_vars/all/inspector index a89296601..ceaba4dfe 100644 --- a/ansible/group_vars/all/inspector +++ b/ansible/group_vars/all/inspector @@ -38,7 +38,10 @@ inspector_processing_hooks: > # Which MAC addresses to add as ports during introspection. One of 'all', # 'active' or 'pxe'. -inspector_port_addition: "all" +inspector_add_ports: "pxe" + +# Which ports to keep after introspection. One of 'all', 'present', or 'added'. +inspector_keep_ports: "added" # Whether to enable discovery of nodes not managed by Ironic. inspector_enable_discovery: True diff --git a/ansible/kolla-openstack.yml b/ansible/kolla-openstack.yml index d7eac4aeb..2616690d2 100644 --- a/ansible/kolla-openstack.yml +++ b/ansible/kolla-openstack.yml @@ -64,7 +64,8 @@ # Ironic inspector configuration. kolla_inspector_manage_firewall: "{{ inspector_manage_firewall }}" kolla_inspector_processing_hooks: "{{ inspector_processing_hooks }}" - kolla_inspector_port_addition: "{{ inspector_port_addition }}" + kolla_inspector_add_ports: "{{ inspector_add_ports }}" + kolla_inspector_keep_ports: "{{ inspector_keep_ports }}" kolla_inspector_enable_discovery: "{{ inspector_enable_discovery }}" kolla_inspector_discovery_enroll_node_driver: "{{ inspector_discovery_enroll_node_driver }}" kolla_inspector_extra_kernel_options: "{{ inspector_extra_kernel_options }}" diff --git a/ansible/roles/kolla-openstack/defaults/main.yml b/ansible/roles/kolla-openstack/defaults/main.yml index 66454f94f..fd6ea7d66 100644 --- a/ansible/roles/kolla-openstack/defaults/main.yml +++ b/ansible/roles/kolla-openstack/defaults/main.yml @@ -127,7 +127,10 @@ kolla_inspector_processing_hooks: # Which MAC addresses to add as ports during introspection. One of 'all', # 'active' or 'pxe'. -kolla_inspector_port_addition: +kolla_inspector_add_ports: + +# Which ports to keep after introspection. One of 'all', 'present', or 'added'. +kolla_inspector_keep_ports: # Whether to enable discovery of nodes not managed by Ironic. kolla_inspector_enable_discovery: diff --git a/ansible/roles/kolla-openstack/templates/ironic-inspector.conf.j2 b/ansible/roles/kolla-openstack/templates/ironic-inspector.conf.j2 index ae0e152e4..e304ea469 100644 --- a/ansible/roles/kolla-openstack/templates/ironic-inspector.conf.j2 +++ b/ansible/roles/kolla-openstack/templates/ironic-inspector.conf.j2 @@ -10,14 +10,16 @@ manage_firewall = {{ kolla_inspector_manage_firewall }} processing_hooks = {{ kolla_inspector_processing_hooks | join(',') }} {% endif %} -{% if kolla_inspector_port_addition %} +{% if kolla_inspector_add_ports %} # Which MAC addresses to add as ports during introspection. One of 'all', # 'active' or 'pxe'. -add_ports = {{ kolla_inspector_port_addition }} +add_ports = {{ kolla_inspector_add_ports }} {% endif %} +{% if kolla_inspector_keep_ports %} # Keep only those ports that were found during inspection. keep_ports = present +{% endif %} # Store logs returned by the inspection ramdisk. ramdisk_logs_dir = /var/log/kolla/ironic