Deprecate ironic::pxe::enable_ppc64le
The boolean parameter ironic::pxe::enable_ppc64le is now undefined and setting it has no effect. Previously, setting it to true resulted in the creation of /tftpboot/ppc64le/. This directory is only required for the creation of inspector file /tftpboot/ppc64le/default. For this reason the directory creation is moved to inspector.pp and both are created when ironic::inspector::enable_ppc64le is set to true. Change-Id: I52e02f0ce21a88288cf97244dfb6f0d664b643dc
This commit is contained in:
parent
feea417bef
commit
f1aefe228a
|
@ -404,6 +404,13 @@ Use ironic::inspector::ironic::endpoint_override instead.')
|
|||
|
||||
# NOTE: ppc64le hardware supports only tftp
|
||||
if $enable_ppc64le {
|
||||
file { "${tftp_root_real}/ppc64le":
|
||||
ensure => 'directory',
|
||||
seltype => 'tftpdir_t',
|
||||
owner => 'ironic-inspector',
|
||||
group => 'ironic-inspector',
|
||||
require => Anchor['ironic-inspector::config::begin'],
|
||||
}
|
||||
file { "${tftp_root_real}/ppc64le/default":
|
||||
ensure => 'present',
|
||||
seltype => 'tftpdir_t',
|
||||
|
|
|
@ -47,10 +47,6 @@
|
|||
# (optional) The IP address TFTP server will listen on for TFTP.
|
||||
# Defaults to undef (listen on all ip addresses).
|
||||
#
|
||||
# [*enable_ppc64le*]
|
||||
# (optional) Boolean value to dtermine if ppc64le support should be enabled
|
||||
# Defaults to false (no ppc64le support)
|
||||
#
|
||||
# [*ipxe_name_base*]
|
||||
# (optional) Beginning of the source file name which is copied to
|
||||
# $tftproot/ipxe.efi. Setting this to 'ipxe-snponly' on CentOS8 would result
|
||||
|
@ -68,6 +64,12 @@
|
|||
# service facilitator.
|
||||
# Defaults to ironic::params::xinetd_available
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*enable_ppc64le*]
|
||||
# (optional) Boolean value to dtermine if ppc64le support should be enabled
|
||||
# Defaults to undef
|
||||
#
|
||||
class ironic::pxe (
|
||||
$package_ensure = 'present',
|
||||
$tftp_root = '/tftpboot',
|
||||
|
@ -76,15 +78,20 @@ class ironic::pxe (
|
|||
$syslinux_path = $::ironic::params::syslinux_path,
|
||||
$syslinux_files = $::ironic::params::syslinux_files,
|
||||
$tftp_bind_host = undef,
|
||||
$enable_ppc64le = false,
|
||||
$ipxe_name_base = 'ipxe-snponly',
|
||||
$uefi_ipxe_bootfile_name = 'snponly.efi',
|
||||
$tftp_use_xinetd = $::ironic::params::xinetd_available
|
||||
$tftp_use_xinetd = $::ironic::params::xinetd_available,
|
||||
# DEPRECATED PARAMETERS
|
||||
$enable_ppc64le = undef
|
||||
) inherits ironic::params {
|
||||
|
||||
include ironic::deps
|
||||
include ironic::pxe::common
|
||||
|
||||
if $enable_ppc64le != undef {
|
||||
warning('The ironic::pxe::enable_ppc64le parameter is deprecated and has no effect.')
|
||||
}
|
||||
|
||||
$tftp_root_real = pick($::ironic::pxe::common::tftp_root, $tftp_root)
|
||||
$http_root_real = pick($::ironic::pxe::common::http_root, $http_root)
|
||||
$http_port_real = pick($::ironic::pxe::common::http_port, $http_port)
|
||||
|
@ -120,17 +127,6 @@ class ironic::pxe (
|
|||
tag => 'ironic-tftp-file',
|
||||
}
|
||||
|
||||
if $enable_ppc64le {
|
||||
file { "${tftp_root_real}/ppc64le":
|
||||
ensure => 'directory',
|
||||
seltype => 'tftpdir_t',
|
||||
owner => 'ironic',
|
||||
group => 'ironic',
|
||||
require => Anchor['ironic::install::end'],
|
||||
tag => 'ironic-tftp-file',
|
||||
}
|
||||
}
|
||||
|
||||
file { $http_root_real:
|
||||
ensure => 'directory',
|
||||
seltype => 'httpd_sys_content_t',
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
deprecations:
|
||||
- |
|
||||
The boolean parameter ``ironic::pxe::enable_ppc64le`` is now undefined and
|
||||
setting it has no effect. Previously, setting it to true resulted in the
|
||||
creation of ``/tftpboot/ppc64le/``. This directory is only required for the
|
||||
creation of inspector file ``/tftpboot/ppc64le/default``. For this reason
|
||||
the directory creation is moved to ``inspector.pp`` and both are created
|
||||
when ``ironic::inspector::enable_ppc64le`` is set to ``true``.
|
|
@ -344,8 +344,7 @@ describe 'ironic::inspector' do
|
|||
|
||||
context 'when enabling ppc64le support' do
|
||||
let :pre_condition do
|
||||
"class { 'ironic::inspector::authtoken': password => 'password', }
|
||||
class { 'ironic::pxe': enable_ppc64le => true, }"
|
||||
"class { 'ironic::inspector::authtoken': password => 'password', }"
|
||||
end
|
||||
|
||||
before do
|
||||
|
@ -358,6 +357,15 @@ describe 'ironic::inspector' 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 directory /tftpboot/ppc64le with selinux type tftpdir_t' do
|
||||
is_expected.to contain_file('/tftpboot/ppc64le').with(
|
||||
'owner' => 'ironic-inspector',
|
||||
'group' => 'ironic-inspector',
|
||||
'require' => 'Anchor[ironic-inspector::config::begin]',
|
||||
'ensure' => 'directory',
|
||||
'seltype' => 'tftpdir_t',
|
||||
)
|
||||
end
|
||||
it 'should contain file /tftpboot/ppc64le/default' do
|
||||
is_expected.to contain_file('/tftpboot/ppc64le/default').with(
|
||||
'owner' => 'ironic-inspector',
|
||||
|
@ -375,8 +383,7 @@ describe 'ironic::inspector' do
|
|||
|
||||
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, }"
|
||||
"class { 'ironic::inspector::authtoken': password => 'password', }"
|
||||
end
|
||||
|
||||
before do
|
||||
|
|
|
@ -156,22 +156,6 @@ describe 'ironic::pxe' do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when enabling ppc64le support' do
|
||||
before :each do
|
||||
params.merge!(
|
||||
:enable_ppc64le => true,
|
||||
)
|
||||
end
|
||||
it 'should contain directory /tftpboot/ppc64le with selinux type tftpdir_t' do
|
||||
is_expected.to contain_file('/tftpboot/ppc64le').with(
|
||||
'owner' => 'ironic',
|
||||
'group' => 'ironic',
|
||||
'require' => 'Anchor[ironic::install::end]',
|
||||
'ensure' => 'directory',
|
||||
'seltype' => 'tftpdir_t',
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples_for 'ironic pxe in RedHat' do
|
||||
|
|
Loading…
Reference in New Issue