Merge "Add configuration for Ironic introspection DNS servers"

This commit is contained in:
Zuul
2025-12-15 13:10:37 +00:00
committed by Gerrit Code Review
6 changed files with 26 additions and 2 deletions

View File

@@ -99,6 +99,7 @@
kolla_inspector_dhcp_pool_end: "{{ inspection_net_name | net_inspection_allocation_pool_end }}"
kolla_inspector_netmask: "{{ inspection_net_name | net_mask }}"
kolla_inspector_default_gateway: "{{ inspection_net_name | net_inspection_gateway or inspection_net_name | net_gateway }}"
kolla_inspector_dns_servers: "{{ inspection_net_name | net_inspection_dns_servers }}"
kolla_inspector_extra_kernel_options: "{{ inspector_extra_kernel_options }}"
kolla_libvirt_tls: "{{ compute_libvirt_enable_tls | bool }}"
kolla_globals_paths_static:

View File

@@ -200,6 +200,9 @@ kolla_inspector_netmask:
# Default gateway to use for inspection network.
kolla_inspector_default_gateway:
# DNS servers for inspection network.
kolla_inspector_dns_servers: []
# List of extra kernel parameters for the inspector default PXE configuration.
kolla_inspector_extra_kernel_options: []

View File

@@ -401,6 +401,9 @@ ironic_dnsmasq_dhcp_ranges:
{% if kolla_inspector_default_gateway %}
routers: "{{ kolla_inspector_default_gateway }}"
{% endif %}
{% if kolla_inspector_dns_servers %}
dns_servers: "{{ kolla_inspector_dns_servers | join(',') }}"
{% endif %}
{% endif %}
{% if kolla_inspector_extra_kernel_options %}
ironic_kernel_cmdline_extras:

View File

@@ -39,6 +39,8 @@ supported:
IP address of the gateway for the hardware introspection network.
``neutron_gateway``
IP address of the gateway for a neutron subnet based on this network.
``inspection_dns_servers``
List of DNS servers used during hardware introspection.
``vlan``
VLAN ID.
``mtu``
@@ -827,19 +829,22 @@ If using the overcloud to inspect bare metal workload (compute) hosts, it is
necessary to define a DHCP allocation pool for the overcloud's ironic inspector
DHCP server using the ``inspection_allocation_pool_start`` and
``inspection_allocation_pool_end`` attributes of the workload provisioning
network.
network. If ``kolla_internal_fqdn`` is set, it is mandatory to also supply one
or more DNS servers using ``inspection_dns_servers``.
.. note::
This example assumes that the ``example`` network is mapped to
``provision_wl_net_name``.
To configure a network called ``example`` with an inspection allocation pool:
To configure a network called ``example`` with an inspection allocation pool
and inspection DNS servers:
.. code-block:: yaml
example_inspection_allocation_pool_start: 10.0.1.196
example_inspection_allocation_pool_end: 10.0.1.254
example_inspection_dns_servers: [10.0.1.10, 10.0.1.11]
.. note::

View File

@@ -246,6 +246,12 @@ def net_inspection_allocation_pool_end(context, name, inventory_hostname=None):
net_inspection_gateway = _make_attr_filter('inspection_gateway')
@jinja2.pass_context
def net_inspection_dns_servers(context, name, inventory_hostname=None):
return net_attr(context, name, 'inspection_dns_servers',
inventory_hostname)
@jinja2.pass_context
def net_neutron_allocation_pool_start(context, name, inventory_hostname=None):
return net_attr(context, name, 'neutron_allocation_pool_start',
@@ -791,6 +797,7 @@ def get_filters():
'net_inspection_allocation_pool_end': (
net_inspection_allocation_pool_end),
'net_inspection_gateway': net_inspection_gateway,
'net_inspection_dns_servers': net_inspection_dns_servers,
'net_neutron_allocation_pool_start': net_neutron_allocation_pool_start,
'net_neutron_allocation_pool_end': net_neutron_allocation_pool_end,
'net_neutron_gateway': net_neutron_gateway,

View File

@@ -0,0 +1,5 @@
---
features:
- |
Configure inspection network DNS servers to enable Ironic inspection
when ``kolla_internal_fqdn`` is set.