Turn on DHCP logging in ironic-inspector when debug is true
Thanks to Dan Radez for pointing out this cool feature to me. Change-Id: Ica31ab87b646e3bad21d55ba939437094f42cf9c
This commit is contained in:
5
releasenotes/notes/log-dhcp-700336a5fa27096d.yaml
Normal file
5
releasenotes/notes/log-dhcp-700336a5fa27096d.yaml
Normal 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.
|
@@ -227,6 +227,12 @@ describe 'ironic::inspector' do
|
|||||||
is_expected.to contain_file('/etc/ironic-inspector/dnsmasq.conf').with_content(
|
is_expected.to contain_file('/etc/ironic-inspector/dnsmasq.conf').with_content(
|
||||||
/dhcp-range=192.168.0.100,192.168.0.120,10m/
|
/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
|
end
|
||||||
it 'should contain file /var/www/httpboot/inspector.ipxe' do
|
it 'should contain file /var/www/httpboot/inspector.ipxe' do
|
||||||
is_expected.to contain_file('/var/www/httpboot/inspector.ipxe').with(
|
is_expected.to contain_file('/var/www/httpboot/inspector.ipxe').with(
|
||||||
|
@@ -1,6 +1,10 @@
|
|||||||
port=0
|
port=0
|
||||||
interface=<%= @dnsmasq_interface %>
|
interface=<%= @dnsmasq_interface %>
|
||||||
bind-interfaces
|
bind-interfaces
|
||||||
|
<% if @debug %>
|
||||||
|
log-dhcp
|
||||||
|
log-queries
|
||||||
|
<% end %>
|
||||||
<% @dnsmasq_ip_subnets_real.each do |s| -%>
|
<% @dnsmasq_ip_subnets_real.each do |s| -%>
|
||||||
<% if s['tag'] and s['netmask'] -%>
|
<% if s['tag'] and s['netmask'] -%>
|
||||||
dhcp-range=set:<%= s['tag'] -%>,<%= s['ip_range'] -%>,<%= s['netmask'] -%>,10m
|
dhcp-range=set:<%= s['tag'] -%>,<%= s['ip_range'] -%>,<%= s['netmask'] -%>,10m
|
||||||
|
@@ -1,6 +1,10 @@
|
|||||||
port=0
|
port=0
|
||||||
interface=<%= @dnsmasq_interface %>
|
interface=<%= @dnsmasq_interface %>
|
||||||
bind-interfaces
|
bind-interfaces
|
||||||
|
<% if @debug %>
|
||||||
|
log-dhcp
|
||||||
|
log-queries
|
||||||
|
<% end %>
|
||||||
<% @dnsmasq_ip_subnets_real.each do |s| -%>
|
<% @dnsmasq_ip_subnets_real.each do |s| -%>
|
||||||
<% if s['tag'] and s['netmask'] -%>
|
<% if s['tag'] and s['netmask'] -%>
|
||||||
dhcp-range=set:<%= s['tag'] -%>,<%= s['ip_range'] -%>,<%= s['netmask'] -%>,10m
|
dhcp-range=set:<%= s['tag'] -%>,<%= s['ip_range'] -%>,<%= s['netmask'] -%>,10m
|
||||||
|
Reference in New Issue
Block a user