Merge "Turn on DHCP logging in ironic-inspector when debug is true"

This commit is contained in:
Zuul
2017-10-20 01:23:05 +00:00
committed by Gerrit Code Review
4 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
features:
- |
When ``inspector::debug`` is set to ``true``, DHCP queries and responses
will be logged by the ironic-inspector dnsmasq services.

View File

@@ -227,6 +227,12 @@ describe 'ironic::inspector' do
is_expected.to contain_file('/etc/ironic-inspector/dnsmasq.conf').with_content(
/dhcp-range=192.168.0.100,192.168.0.120,10m/
)
is_expected.to contain_file('/etc/ironic-inspector/dnsmasq.conf').with_content(
/log-dhcp/
)
is_expected.to contain_file('/etc/ironic-inspector/dnsmasq.conf').with_content(
/log-queries/
)
end
it 'should contain file /var/www/httpboot/inspector.ipxe' do
is_expected.to contain_file('/var/www/httpboot/inspector.ipxe').with(

View File

@@ -1,6 +1,10 @@
port=0
interface=<%= @dnsmasq_interface %>
bind-interfaces
<% if @debug %>
log-dhcp
log-queries
<% end %>
<% @dnsmasq_ip_subnets_real.each do |s| -%>
<% if s['tag'] and s['netmask'] -%>
dhcp-range=set:<%= s['tag'] -%>,<%= s['ip_range'] -%>,<%= s['netmask'] -%>,10m

View File

@@ -1,6 +1,10 @@
port=0
interface=<%= @dnsmasq_interface %>
bind-interfaces
<% if @debug %>
log-dhcp
log-queries
<% end %>
<% @dnsmasq_ip_subnets_real.each do |s| -%>
<% if s['tag'] and s['netmask'] -%>
dhcp-range=set:<%= s['tag'] -%>,<%= s['ip_range'] -%>,<%= s['netmask'] -%>,10m