Merge "Fix ppc64le support to coexist with PXE preference" into stable/victoria
This commit is contained in:
commit
f9264ba02a
|
@ -31,7 +31,8 @@
|
|||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*pxe_transfer_protocol*]
|
||||
# (optional) Protocol to be used for transferring the ramdisk
|
||||
# (optional) Protocol preferred for transferring the ramdisk.
|
||||
# Some archtecture require tftp is used exclusively.
|
||||
# Defaults to 'tftp'. Valid values are 'tftp' or 'http'.
|
||||
#
|
||||
# [*dhcp_debug*]
|
||||
|
@ -364,16 +365,6 @@ Use ironic::inspector::ironic::endpoint_override instead.')
|
|||
content => template('ironic/inspector_pxelinux_cfg.erb'),
|
||||
require => Anchor['ironic-inspector::config::begin'],
|
||||
}
|
||||
if $enable_ppc64le {
|
||||
file { "${tftp_root_real}/ppc64le/default":
|
||||
ensure => 'present',
|
||||
seltype => 'tftpdir_t',
|
||||
owner => 'ironic-inspector',
|
||||
group => 'ironic-inspector',
|
||||
content => template('ironic/inspector_pxelinux_cfg.erb'),
|
||||
require => Anchor['ironic-inspector::config::begin'],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if $pxe_transfer_protocol == 'http' {
|
||||
|
@ -392,6 +383,18 @@ Use ironic::inspector::ironic::endpoint_override instead.')
|
|||
}
|
||||
}
|
||||
|
||||
# NOTE: ppc64le hardware supports only tftp
|
||||
if $enable_ppc64le {
|
||||
file { "${tftp_root_real}/ppc64le/default":
|
||||
ensure => 'present',
|
||||
seltype => 'tftpdir_t',
|
||||
owner => 'ironic-inspector',
|
||||
group => 'ironic-inspector',
|
||||
content => template('ironic/inspector_pxelinux_cfg.erb'),
|
||||
require => Anchor['ironic-inspector::config::begin'],
|
||||
}
|
||||
}
|
||||
|
||||
# Configure inspector.conf
|
||||
|
||||
#Processing hooks string
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixes support for ppc64le to allow its operation to co-exist with
|
||||
``pxe_transfer_protocol`` being set to ``http``. This is because the
|
||||
ppc64le archtecture does not use an intermediate boot loader to perform
|
||||
PXE operations, and only supports use of TFTP based transfers.
|
|
@ -353,6 +353,38 @@ describe 'ironic::inspector' do
|
|||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when enabling ppc64le support with http default transport' do
|
||||
let :pre_condition do
|
||||
"class { 'ironic::inspector::authtoken': password => 'password', }
|
||||
class { 'ironic::pxe': enable_ppc64le => true, }"
|
||||
end
|
||||
|
||||
before do
|
||||
params.merge!(
|
||||
:enable_ppc64le => true,
|
||||
:pxe_transfer_protocol => 'http',
|
||||
)
|
||||
end
|
||||
|
||||
it 'should contain file /etc/ironic-inspector/dnsmasq.conf' do
|
||||
is_expected.to contain_file('/etc/ironic-inspector/dnsmasq.conf').with_content(
|
||||
/dhcp-match=set:ppc64le,option:client-arch,14/)
|
||||
end
|
||||
it 'should contain file /tftpboot/ppc64le/default' do
|
||||
is_expected.to contain_file('/tftpboot/ppc64le/default').with(
|
||||
'owner' => 'ironic-inspector',
|
||||
'group' => 'ironic-inspector',
|
||||
'seltype' => 'tftpdir_t',
|
||||
'ensure' => 'present',
|
||||
'require' => 'Anchor[ironic-inspector::config::begin]',
|
||||
'content' => /default/,
|
||||
)
|
||||
is_expected.to contain_file('/tftpboot/ppc64le/default').with_content(
|
||||
/initrd=agent.ramdisk ipa-inspection-callback-url=http:\/\/192.168.0.1:5050\/v1\/continue ipa-inspection-collectors=default/
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
|
|
|
@ -59,3 +59,10 @@ 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 -%>
|
||||
|
|
Loading…
Reference in New Issue