Add support for configuring rescue mode
TripleO blueprint ironic-rescue
Change-Id: Ib11f60bed3f68fc7030a7fe71583798901f674ea
(cherry picked from commit 78740fe6fa
)
This commit is contained in:
parent
86cb1ce88c
commit
3956a4cf8a
|
@ -87,6 +87,11 @@
|
|||
# Can not be specified together with provisioning_network_name.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rescuing_network*]
|
||||
# (optional) Neutron network UUID or name for the ramdisk to be booted into
|
||||
# for rescue. Can not be specified together with rescuing_network_name.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*configdrive_use_swift*]
|
||||
# (optional) Whether to use Swift for storing config drives instead of
|
||||
# the database. Recommended for bigger config drives.
|
||||
|
@ -119,6 +124,12 @@
|
|||
# Can not be specified together with provisioning_network.
|
||||
# Defaults to undef, which leaves the configuration intact
|
||||
#
|
||||
# [*rescuing_network_name*]
|
||||
# (optional) If provided the name will be converted to UUID and set
|
||||
# as value of neutron/rescuing option in ironic.conf
|
||||
# Can not be specified together with rescuing_network.
|
||||
# Defaults to undef, which leaves the configuration intact
|
||||
#
|
||||
# [*port_setup_delay*]
|
||||
# (optional) Delay value to wait for Neutron agents to setup
|
||||
# sufficient DHCP configuration for port.
|
||||
|
@ -169,6 +180,7 @@ class ironic::conductor (
|
|||
$continue_if_disk_secure_erase_fails = $::os_service_default,
|
||||
$api_url = $::os_service_default,
|
||||
$provisioning_network = $::os_service_default,
|
||||
$rescuing_network = $::os_service_default,
|
||||
$configdrive_use_swift = $::os_service_default,
|
||||
$configdrive_swift_container = $::os_service_default,
|
||||
$inspect_timeout = $::os_service_default,
|
||||
|
@ -176,6 +188,7 @@ class ironic::conductor (
|
|||
$port_setup_delay = $::os_service_default,
|
||||
$cleaning_network_name = undef,
|
||||
$provisioning_network_name = undef,
|
||||
$rescuing_network_name = undef,
|
||||
$power_state_change_timeout = $::os_service_default,
|
||||
# DEPRECATED
|
||||
$cleaning_network_uuid = undef,
|
||||
|
@ -210,6 +223,10 @@ specified in the same time.")
|
|||
specified in the same time.")
|
||||
}
|
||||
|
||||
if ($rescuing_network_name and !is_service_default($rescuing_network)) {
|
||||
fail('rescuing_network_name and rescuing_network can not be specified in the same time.')
|
||||
}
|
||||
|
||||
if $swift_account or $swift_temp_url_key or $swift_temp_url_duration {
|
||||
warning("swift_account, swift_temp_url_key and swift_temp_url_duration were \
|
||||
moved to ironic::glance manifest")
|
||||
|
@ -298,6 +315,16 @@ moved to ironic::glance manifest")
|
|||
}
|
||||
}
|
||||
|
||||
if $rescuing_network_name {
|
||||
ironic_config {
|
||||
'neutron/rescuing_network': value => $rescuing_network_name, transform_to => 'net_uuid';
|
||||
}
|
||||
} else {
|
||||
ironic_config {
|
||||
'neutron/rescuing_network': value => $rescuing_network;
|
||||
}
|
||||
}
|
||||
|
||||
# Install package
|
||||
if $::ironic::params::conductor_package {
|
||||
package { 'ironic-conductor':
|
||||
|
|
|
@ -54,6 +54,11 @@
|
|||
# raid_interface field set.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*default_rescue_interface*]
|
||||
# (optional) Default rescue interface to be used for nodes that do not have
|
||||
# rescue_interface field set.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*default_storage_interface*]
|
||||
# (optional) Default storage interface to be used for nodes that do not have
|
||||
# storage_interface field set.
|
||||
|
@ -104,6 +109,11 @@
|
|||
# service initialization.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*enabled_rescue_interfaces*]
|
||||
# (optional) Specify the list of rescue interfaces to load during
|
||||
# service initialization.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*enabled_storage_interfaces*]
|
||||
# (optional) Specify the list of storage interfaces to load during
|
||||
# service initialization.
|
||||
|
@ -123,6 +133,7 @@ class ironic::drivers::interfaces (
|
|||
$default_network_interface = $::os_service_default,
|
||||
$default_power_interface = $::os_service_default,
|
||||
$default_raid_interface = $::os_service_default,
|
||||
$default_rescue_interface = $::os_service_default,
|
||||
$default_storage_interface = $::os_service_default,
|
||||
$default_vendor_interface = $::os_service_default,
|
||||
$enabled_boot_interfaces = $::os_service_default,
|
||||
|
@ -133,6 +144,7 @@ class ironic::drivers::interfaces (
|
|||
$enabled_network_interfaces = $::os_service_default,
|
||||
$enabled_power_interfaces = $::os_service_default,
|
||||
$enabled_raid_interfaces = $::os_service_default,
|
||||
$enabled_rescue_interfaces = $::os_service_default,
|
||||
$enabled_storage_interfaces = $::os_service_default,
|
||||
$enabled_vendor_interfaces = $::os_service_default,
|
||||
) {
|
||||
|
@ -154,6 +166,8 @@ class ironic::drivers::interfaces (
|
|||
'default' => $default_power_interface },
|
||||
'raid' => { 'enabled_list' => $enabled_raid_interfaces,
|
||||
'default' => $default_raid_interface },
|
||||
'rescue' => { 'enabled_list' => $enabled_rescue_interfaces,
|
||||
'default' => $default_rescue_interface },
|
||||
'storage' => { 'enabled_list' => $enabled_storage_interfaces,
|
||||
'default' => $default_storage_interface },
|
||||
'vendor' => { 'enabled_list' => $enabled_vendor_interfaces,
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
Supports configuring rescue mode:
|
||||
|
||||
* Adds support for ``default_rescue_interface`` and
|
||||
``enabled_rescue_interfaces`` to ``ironic::drivers::interfaces``.
|
||||
|
||||
* Adds support for configuring rescue network via ``rescuing_network``
|
||||
or ``rescuing_network_name`` in ``ironic::conductor``.
|
|
@ -71,6 +71,7 @@ describe 'ironic::conductor' do
|
|||
is_expected.to contain_ironic_config('conductor/api_url').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('neutron/cleaning_network').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('neutron/provisioning_network').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('neutron/rescuing_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>')
|
||||
|
@ -93,6 +94,7 @@ describe 'ironic::conductor' do
|
|||
:cleaning_network => '00000000-0000-0000-0000-000000000000',
|
||||
:api_url => 'https://127.0.0.1:6385',
|
||||
:provisioning_network => '00000000-0000-0000-0000-000000000000',
|
||||
:rescuing_network => '00000000-0000-0000-0000-000000000000',
|
||||
:cleaning_disk_erase => 'metadata',
|
||||
:http_url => 'http://host:port',
|
||||
:http_root => '/src/www',
|
||||
|
@ -112,6 +114,7 @@ describe 'ironic::conductor' do
|
|||
is_expected.to contain_ironic_config('conductor/api_url').with_value(p[:api_url])
|
||||
is_expected.to contain_ironic_config('neutron/cleaning_network').with_value('00000000-0000-0000-0000-000000000000')
|
||||
is_expected.to contain_ironic_config('neutron/provisioning_network').with_value('00000000-0000-0000-0000-000000000000')
|
||||
is_expected.to contain_ironic_config('neutron/rescuing_network').with_value('00000000-0000-0000-0000-000000000000')
|
||||
is_expected.to contain_ironic_config('deploy/erase_devices_priority').with_value(0)
|
||||
is_expected.to contain_ironic_config('deploy/erase_devices_metadata_priority').with_value(10)
|
||||
is_expected.to contain_ironic_config('deploy/http_url').with_value(p[:http_url])
|
||||
|
@ -129,11 +132,13 @@ describe 'ironic::conductor' do
|
|||
params.merge!(
|
||||
:provisioning_network_name => 'abc',
|
||||
:cleaning_network_name => 'abc',
|
||||
:rescuing_network_name => 'abc',
|
||||
)
|
||||
end
|
||||
it 'should set provisioning/cleaning with new value' do
|
||||
it 'should set provisioning/cleaning/rescuing with new value' do
|
||||
is_expected.to contain_ironic_config('neutron/cleaning_network').with_value('abc').with_transform_to('net_uuid')
|
||||
is_expected.to contain_ironic_config('neutron/provisioning_network').with_value('abc').with_transform_to('net_uuid')
|
||||
is_expected.to contain_ironic_config('neutron/rescuing_network').with_value('abc').with_transform_to('net_uuid')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ describe 'ironic::drivers::interfaces' do
|
|||
it { is_expected.to contain_ironic_config('DEFAULT/enabled_network_interfaces').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_ironic_config('DEFAULT/enabled_power_interfaces').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_ironic_config('DEFAULT/enabled_raid_interfaces').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_ironic_config('DEFAULT/enabled_rescue_interfaces').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_ironic_config('DEFAULT/enabled_storage_interfaces').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_ironic_config('DEFAULT/enabled_vendor_interfaces').with_value('<SERVICE DEFAULT>') }
|
||||
end
|
||||
|
@ -42,6 +43,7 @@ describe 'ironic::drivers::interfaces' do
|
|||
:enabled_network_interfaces => ['flat','neutron'],
|
||||
:enabled_power_interfaces => ['irmc', 'ipmitool'],
|
||||
:enabled_raid_interfaces => ['agent', 'no-raid'],
|
||||
:enabled_rescue_interfaces => ['agent', 'no-rescue'],
|
||||
:enabled_storage_interfaces => ['cinder'],
|
||||
:enabled_vendor_interfaces => ['no-vendor'] }
|
||||
end
|
||||
|
@ -54,6 +56,7 @@ describe 'ironic::drivers::interfaces' do
|
|||
it { is_expected.to contain_ironic_config('DEFAULT/enabled_network_interfaces').with_value('flat,neutron') }
|
||||
it { is_expected.to contain_ironic_config('DEFAULT/enabled_power_interfaces').with_value('irmc,ipmitool') }
|
||||
it { is_expected.to contain_ironic_config('DEFAULT/enabled_raid_interfaces').with_value('agent,no-raid') }
|
||||
it { is_expected.to contain_ironic_config('DEFAULT/enabled_rescue_interfaces').with_value('agent,no-rescue') }
|
||||
it { is_expected.to contain_ironic_config('DEFAULT/enabled_storage_interfaces').with_value('cinder') }
|
||||
it { is_expected.to contain_ironic_config('DEFAULT/enabled_vendor_interfaces').with_value('no-vendor') }
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue