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
|
# NOTE: ppc64le hardware supports only tftp
|
||||||
if $enable_ppc64le {
|
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":
|
file { "${tftp_root_real}/ppc64le/default":
|
||||||
ensure => 'present',
|
ensure => 'present',
|
||||||
seltype => 'tftpdir_t',
|
seltype => 'tftpdir_t',
|
||||||
|
|
|
@ -47,10 +47,6 @@
|
||||||
# (optional) The IP address TFTP server will listen on for TFTP.
|
# (optional) The IP address TFTP server will listen on for TFTP.
|
||||||
# Defaults to undef (listen on all ip addresses).
|
# 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*]
|
# [*ipxe_name_base*]
|
||||||
# (optional) Beginning of the source file name which is copied to
|
# (optional) Beginning of the source file name which is copied to
|
||||||
# $tftproot/ipxe.efi. Setting this to 'ipxe-snponly' on CentOS8 would result
|
# $tftproot/ipxe.efi. Setting this to 'ipxe-snponly' on CentOS8 would result
|
||||||
|
@ -68,6 +64,12 @@
|
||||||
# service facilitator.
|
# service facilitator.
|
||||||
# Defaults to ironic::params::xinetd_available
|
# 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 (
|
class ironic::pxe (
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$tftp_root = '/tftpboot',
|
$tftp_root = '/tftpboot',
|
||||||
|
@ -76,15 +78,20 @@ class ironic::pxe (
|
||||||
$syslinux_path = $::ironic::params::syslinux_path,
|
$syslinux_path = $::ironic::params::syslinux_path,
|
||||||
$syslinux_files = $::ironic::params::syslinux_files,
|
$syslinux_files = $::ironic::params::syslinux_files,
|
||||||
$tftp_bind_host = undef,
|
$tftp_bind_host = undef,
|
||||||
$enable_ppc64le = false,
|
|
||||||
$ipxe_name_base = 'ipxe-snponly',
|
$ipxe_name_base = 'ipxe-snponly',
|
||||||
$uefi_ipxe_bootfile_name = 'snponly.efi',
|
$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 {
|
) inherits ironic::params {
|
||||||
|
|
||||||
include ironic::deps
|
include ironic::deps
|
||||||
include ironic::pxe::common
|
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)
|
$tftp_root_real = pick($::ironic::pxe::common::tftp_root, $tftp_root)
|
||||||
$http_root_real = pick($::ironic::pxe::common::http_root, $http_root)
|
$http_root_real = pick($::ironic::pxe::common::http_root, $http_root)
|
||||||
$http_port_real = pick($::ironic::pxe::common::http_port, $http_port)
|
$http_port_real = pick($::ironic::pxe::common::http_port, $http_port)
|
||||||
|
@ -120,17 +127,6 @@ class ironic::pxe (
|
||||||
tag => 'ironic-tftp-file',
|
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:
|
file { $http_root_real:
|
||||||
ensure => 'directory',
|
ensure => 'directory',
|
||||||
seltype => 'httpd_sys_content_t',
|
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
|
context 'when enabling ppc64le support' do
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { 'ironic::inspector::authtoken': password => 'password', }
|
"class { 'ironic::inspector::authtoken': password => 'password', }"
|
||||||
class { 'ironic::pxe': enable_ppc64le => true, }"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
before do
|
before do
|
||||||
|
@ -358,6 +357,15 @@ 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-match=set:ppc64le,option:client-arch,14/)
|
/dhcp-match=set:ppc64le,option:client-arch,14/)
|
||||||
end
|
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
|
it 'should contain file /tftpboot/ppc64le/default' do
|
||||||
is_expected.to contain_file('/tftpboot/ppc64le/default').with(
|
is_expected.to contain_file('/tftpboot/ppc64le/default').with(
|
||||||
'owner' => 'ironic-inspector',
|
'owner' => 'ironic-inspector',
|
||||||
|
@ -375,8 +383,7 @@ describe 'ironic::inspector' do
|
||||||
|
|
||||||
context 'when enabling ppc64le support with http default transport' do
|
context 'when enabling ppc64le support with http default transport' do
|
||||||
let :pre_condition do
|
let :pre_condition do
|
||||||
"class { 'ironic::inspector::authtoken': password => 'password', }
|
"class { 'ironic::inspector::authtoken': password => 'password', }"
|
||||||
class { 'ironic::pxe': enable_ppc64le => true, }"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
before do
|
before do
|
||||||
|
|
|
@ -156,22 +156,6 @@ describe 'ironic::pxe' do
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
||||||
shared_examples_for 'ironic pxe in RedHat' do
|
shared_examples_for 'ironic pxe in RedHat' do
|
||||||
|
|
Loading…
Reference in New Issue