From 247d4ac3d383c135d94d0d17de87da8040136b8c Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 5 Nov 2023 01:15:56 +0900 Subject: [PATCH] inspector: Show warning when dhcp hostsdir is not configured The dnsmasq_dhcp_hostsdir should be set to a specific path when dnsmasq PXE filter is used. This adds a warning message to inform possible mis-configuration. Note that dhcp hostsdir is not needed when the other PXE filter such as iptables PXE filter is used, thus we avoid updating the default value. Closes-Bug: #2042731 Change-Id: If127bd4661709835ab0d9d39e0341367fdef51b7 --- manifests/inspector/pxe_filter/dnsmasq.pp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/manifests/inspector/pxe_filter/dnsmasq.pp b/manifests/inspector/pxe_filter/dnsmasq.pp index 31406efc..5af888ff 100644 --- a/manifests/inspector/pxe_filter/dnsmasq.pp +++ b/manifests/inspector/pxe_filter/dnsmasq.pp @@ -39,6 +39,10 @@ class ironic::inspector::pxe_filter::dnsmasq ( include ironic::deps include ironic::inspector + if $::ironic::inspector::dnsmasq_dhcp_hostsdir == undef { + warning("The ironic::inspector::dnsmasq_dhcp_hostsdir parameter should be \ +configured properly to use dnsmasq PXE filter.") + } $hostsdir = pick($::ironic::inspector::dnsmasq_dhcp_hostsdir, $facts['os_service_default']) ironic_inspector_config {