puppet-ironic/templates/inspector_dnsmasq_http.erb
Harald Jensås 51ea0c95ea Fix name of iPXE efi bootrom
In change Ia30aff290ec24972f387612851f8f630ddc9403b
the file in tftproot was renamed from ipxe.efi to
snponly.efi. Later in the filename was parameterized
in change I565e3ae6388812c358e86fac49b17e0cce97b9df.

The dnsmasq DHCP configuration was not updated to
point to use the new filename, nor the parameter.

This change adds 'uefi_ipxe_bootfile_name' to
ironic::pxe::common, updates the other manifests to
use ironic::pxe::common::uefi_ipxe_bootfile_name if
set.

Also add the 'uefi_ipxe_bootfile_name' parameter to
the ironic::inspector class and update the dnsmasq
DHCP tempalte to use the parameter.

Closes-Bug: #1952652
Change-Id: I1b3ccd8ad8f3ce66c66c58b1dfdca158d749c287
2021-11-30 11:48:32 +01:00

71 lines
2.6 KiB
Plaintext

port=0
interface=<%= @dnsmasq_interface %>
<% if @dhcp_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
<% elsif s['tag'] -%>
dhcp-range=set:<%= s['tag'] -%>,<%= s['ip_range'] -%>,10m
<% else -%>
dhcp-range=<%= s['ip_range'] -%>,10m
<% end -%>
<% if s['gateway'] -%>
<% if s['tag'] -%>
dhcp-option=tag:<%= s['tag'] -%>,option:router,<%= s['gateway'] %>
<% else -%>
dhcp-option=option:router,<%= s['gateway'] %>
<% end -%>
<% end -%>
<% if s['mtu'] -%>
<% if s['tag'] -%>
dhcp-option-force=tag:<%= s['tag'] -%>,option:mtu,<%= s['mtu'] %>
<% else -%>
dhcp-option-force=option:mtu,<%= s['mtu'] %>
<% end -%>
<% end -%>
<% if s['classless_static_routes'] -%>
<%- @_routes = [] -%>
<%- s['classless_static_routes'].each do |route| -%>
<%- @_routes << route['destination'] + ',' + route['nexthop'] -%>
<% end -%>
<% if s['tag'] -%>
dhcp-option=tag:<%= s['tag'] -%>,option:classless-static-route,<%= @_routes.join(',') -%>
<% else -%>
dhcp-option=option:classless-static-route,<%= @_routes.join(',') -%>
<% end -%>
<% end -%>
<% end -%>
<% if @dnsmasq_dhcp_sequential_ip -%>
dhcp-sequential-ip
<% end -%>
dhcp-match=ipxe,175
dhcp-match=set:efi,option:client-arch,7
dhcp-match=set:efi,option:client-arch,9
dhcp-match=set:efi,option:client-arch,11
# dhcpv6s for Client System Architecture Type (61)
dhcp-match=set:efi6,option6:61,0007
dhcp-match=set:efi6,option6:61,0009
dhcp-match=set:efi6,option6:61,0011
dhcp-userclass=set:ipxe6,iPXE
# Client is already running iPXE; move to next stage of chainloading
dhcp-boot=tag:ipxe,http://<%= @dnsmasq_local_ip_real %>:<%= @http_port_real %>/inspector.ipxe
dhcp-option=tag:ipxe6,option6:bootfile-url,http://<%= @dnsmasq_local_ip_real %>:<%= @http_port_real %>/inspector.ipxe
# Client is PXE booting over EFI without iPXE ROM; send EFI version of iPXE chainloader
dhcp-boot=tag:efi,tag:!ipxe,<%= @uefi_ipxe_bootfile_name_real %>
dhcp-option=tag:efi6,tag:!ipxe6,option6:bootfile-url,tftp://<%= @dnsmasq_local_ip_real %>/<%= @uefi_ipxe_bootfile_name_real %>
# Client is running PXE over BIOS; send BIOS version of iPXE chainloader
dhcp-boot=undionly.kpxe,localhost.localdomain,<%= @dnsmasq_local_ip %>
<% if @dnsmasq_dhcp_hostsdir %>
dhcp-hostsdir=<%= @dnsmasq_dhcp_hostsdir %>
<% end %>
<% if @enable_ppc64le -%>
# Client is ppc64le (OPAL) box and doesn't need a chain loader, but does need a custom config
dhcp-match=set:ppc64le,option:client-arch,14
dhcp-boot=tag:ppc64le,
dhcp-option=tag:ppc64le, 210,<%= @tftp_root_real %>/ppc64le/
dhcp-option=tag:ppc64le, 209,default
<% end -%>