Set [deploy] http_root option using the common class input
Previously the [deploy] http_root option is set independently from the common pxe parameters but this requires that users set both of these options consistently. This ensures the option is set according to the common definition. This also ensures both http_root and tftp_root have the hard-coded default value, because we rely on these values heavily in setting up tftp server and http server and any change in ironic side can break the deployment directly. Change-Id: Ia26fa37b3fcba7d89c3d39c7d91b8c6e4cffde8c
This commit is contained in:
parent
af81e83aeb
commit
aa6117b2a0
|
@ -47,7 +47,7 @@
|
|||
#
|
||||
# [*http_root*]
|
||||
# (optional) ironic-conductor node's HTTP root path.
|
||||
# Defaults to $facts['os_service_default']
|
||||
# Defaults to '/httpboot'
|
||||
#
|
||||
# [*force_raw_images*]
|
||||
# (optional) If true, convert backing images to "raw" disk image format.
|
||||
|
@ -244,7 +244,7 @@ class ironic::conductor (
|
|||
$enabled_hardware_types = $facts['os_service_default'],
|
||||
$force_power_state_during_sync = $facts['os_service_default'],
|
||||
$http_url = $facts['os_service_default'],
|
||||
$http_root = $facts['os_service_default'],
|
||||
$http_root = '/httpboot',
|
||||
$force_raw_images = $facts['os_service_default'],
|
||||
$automated_clean = $facts['os_service_default'],
|
||||
$cleaning_network = $facts['os_service_default'],
|
||||
|
@ -329,13 +329,16 @@ class ironic::conductor (
|
|||
}
|
||||
}
|
||||
|
||||
include ironic::pxe::common
|
||||
$http_root_real = pick($::ironic::pxe::common::http_root, $http_root)
|
||||
|
||||
# Configure ironic.conf
|
||||
ironic_config {
|
||||
'DEFAULT/enabled_hardware_types': value => join(any2array($enabled_hardware_types), ',');
|
||||
'conductor/force_power_state_during_sync': value => $force_power_state_during_sync;
|
||||
'conductor/automated_clean': value => $automated_clean;
|
||||
'deploy/http_url': value => $http_url;
|
||||
'deploy/http_root': value => $http_root;
|
||||
'deploy/http_root': value => $http_root_real;
|
||||
'DEFAULT/force_raw_images': value => $force_raw_images;
|
||||
'deploy/erase_devices_priority': value => $erase_devices_priority;
|
||||
'deploy/erase_devices_metadata_priority': value => $erase_devices_metadata_priority;
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
# [*tftp_root*]
|
||||
# (optional) Ironic compute node's tftp root path.
|
||||
# Should be an valid path
|
||||
# Defaults to $facts['os_service_default'].
|
||||
# Defaults to '/tftpboot'.
|
||||
#
|
||||
# [*images_path*]
|
||||
# (optional) Directory where images are stored on disk.
|
||||
|
@ -135,7 +135,7 @@ class ironic::drivers::pxe (
|
|||
$ipxe_bootfile_name = $facts['os_service_default'],
|
||||
$ipxe_config_template = $facts['os_service_default'],
|
||||
$tftp_server = $facts['os_service_default'],
|
||||
$tftp_root = $facts['os_service_default'],
|
||||
$tftp_root = '/tftpboot',
|
||||
$images_path = $facts['os_service_default'],
|
||||
$tftp_master_path = $facts['os_service_default'],
|
||||
$instance_master_path = $facts['os_service_default'],
|
||||
|
|
|
@ -69,7 +69,7 @@ describe 'ironic::conductor' do
|
|||
is_expected.to contain_ironic_config('neutron/inspection_network').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('deploy/continue_if_disk_secure_erase_fails').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('deploy/http_url').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('deploy/http_root').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('deploy/http_root').with(:value => '/httpboot')
|
||||
is_expected.to contain_ironic_config('DEFAULT/force_raw_images').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('deploy/configdrive_use_object_store').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('conductor/configdrive_swift_container').with(:value => '<SERVICE DEFAULT>')
|
||||
|
|
|
@ -34,7 +34,7 @@ describe 'ironic::drivers::pxe' do
|
|||
is_expected.to contain_ironic_config('pxe/ipxe_bootfile_name').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('pxe/ipxe_config_template').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('pxe/tftp_server').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('pxe/tftp_root').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('pxe/tftp_root').with_value('/tftpboot')
|
||||
is_expected.to contain_ironic_config('pxe/images_path').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('pxe/tftp_master_path').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('pxe/instance_master_path').with_value('<SERVICE DEFAULT>')
|
||||
|
|
Loading…
Reference in New Issue