From 37e4dba87920c86aa50e426ac7ae152b414b08ab Mon Sep 17 00:00:00 2001 From: Maksim Malchuk Date: Sat, 9 Oct 2021 03:20:03 +0300 Subject: [PATCH] Add support for Ironic inspection through DHCP-relay This change updates documentation, examples and tests to support Ironic inspection through DHCP-relay. The dnsmasq service should be configured with more specific format set in the variable ``ironic_dnsmasq_dhcp_range``. See the dnsmasq manual page [1]. [1] https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html Change-Id: I9488a72db588e31289907668f1997596a8ccdec6 Signed-off-by: Maksim Malchuk --- doc/source/reference/bare-metal/ironic-guide.rst | 9 +++++---- etc/kolla/globals.yml | 4 ++-- tests/templates/globals-default.j2 | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/source/reference/bare-metal/ironic-guide.rst b/doc/source/reference/bare-metal/ironic-guide.rst index d5624e7f65..349bb2c5d3 100644 --- a/doc/source/reference/bare-metal/ironic-guide.rst +++ b/doc/source/reference/bare-metal/ironic-guide.rst @@ -17,14 +17,15 @@ Enable Ironic in ``/etc/kolla/globals.yml``: enable_ironic: "yes" -In the same file, define a network interface as the default NIC for dnsmasq, -a range of IP addresses that will be available for use by Ironic inspector, -as well as a network to be used for the Ironic cleaning network: +In the same file, define a network interface as the default NIC for dnsmasq and +a range of IP addresses that will be available for use by Ironic inspector. +The optional netmask of the network should be provided in case when DHCP-relay +is used. Finally, define a network to be used for the Ironic cleaning network: .. code-block:: yaml ironic_dnsmasq_interface: "eth1" - ironic_dnsmasq_dhcp_range: "192.168.5.100,192.168.5.110" + ironic_dnsmasq_dhcp_range: "192.168.5.100,192.168.5.110,255.255.255.0" ironic_cleaning_network: "public1" In the same file, optionally a default gateway to be used for the Ironic diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml index d7c89b774e..c813782549 100644 --- a/etc/kolla/globals.yml +++ b/etc/kolla/globals.yml @@ -595,8 +595,8 @@ ############################# # dnsmasq bind interface for Ironic Inspector, by default is network_interface #ironic_dnsmasq_interface: "{{ network_interface }}" -# The following value must be set when enabling ironic, -# the value format is "192.168.0.10,192.168.0.100". +# The following value must be set when enabling ironic, the value format is +# "192.168.0.10,192.168.0.100,255.255.255.0" the last being an optional netmask. #ironic_dnsmasq_dhcp_range: # PXE bootloader file for Ironic Inspector, relative to /tftpboot. #ironic_dnsmasq_boot_file: "pxelinux.0" diff --git a/tests/templates/globals-default.j2 b/tests/templates/globals-default.j2 index 94ef7683d3..72d74067fa 100644 --- a/tests/templates/globals-default.j2 +++ b/tests/templates/globals-default.j2 @@ -103,7 +103,7 @@ enable_aodh: "yes" {% if scenario == "ironic" %} enable_ironic: "yes" -ironic_dnsmasq_dhcp_range: "10.42.0.2,10.42.0.254" +ironic_dnsmasq_dhcp_range: "10.42.0.2,10.42.0.254,255.255.255.0" {% endif %} {% if scenario == "masakari" %}