Merge "Use ipmi/command_retry_timeout instead of retry_timeout"
This commit is contained in:
commit
e4fcf84bdf
@ -124,6 +124,11 @@
|
||||
# sufficient DHCP configuration for port.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*power_state_change_timeout*]
|
||||
# (optional) Timeout value to wait for a power operation to complete,
|
||||
# so that the baremetal node is in the desired new power state.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# DEPRECATED
|
||||
#
|
||||
# [*cleaning_network_uuid*]
|
||||
@ -171,6 +176,7 @@ class ironic::conductor (
|
||||
$port_setup_delay = $::os_service_default,
|
||||
$cleaning_network_name = undef,
|
||||
$provisioning_network_name = undef,
|
||||
$power_state_change_timeout = $::os_service_default,
|
||||
# DEPRECATED
|
||||
$cleaning_network_uuid = undef,
|
||||
$provisioning_network_uuid = undef,
|
||||
@ -269,6 +275,7 @@ moved to ironic::glance manifest")
|
||||
'conductor/inspect_timeout': value => $inspect_timeout;
|
||||
'deploy/default_boot_option': value => $default_boot_option;
|
||||
'neutron/port_setup_delay': value => $port_setup_delay;
|
||||
'conductor/power_state_change_timeout': value => $power_state_change_timeout;
|
||||
}
|
||||
|
||||
if $cleaning_network_name {
|
||||
|
@ -19,20 +19,37 @@
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*command_retry_timeout*]
|
||||
# (optional) Maximum time in seconds to retry IPMI operations.
|
||||
# Should be an interger value
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*retry_timeout*]
|
||||
# (optional) Maximum time in seconds to retry IPMI operations.
|
||||
# Should be an interger value
|
||||
# Defaults to '10'.
|
||||
# Defaults to undef.
|
||||
#
|
||||
class ironic::drivers::ipmi (
|
||||
$retry_timeout = '10'
|
||||
$command_retry_timeout = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$retry_timeout = undef
|
||||
) {
|
||||
|
||||
include ::ironic::deps
|
||||
|
||||
if $retry_timeout {
|
||||
warning('retry_timeout parameter is replaced by command_retry_timeout and power_state_change_timeout, will be removed in the future.')
|
||||
$_command_retry_timeout = $retry_timeout
|
||||
}
|
||||
else {
|
||||
$_command_retry_timeout = $command_retry_timeout
|
||||
}
|
||||
|
||||
# Configure ironic.conf
|
||||
ironic_config {
|
||||
'ipmi/retry_timeout': value => $retry_timeout;
|
||||
'ipmi/command_retry_timeout': value => $_command_retry_timeout;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,3 @@
|
||||
---
|
||||
deprecations:
|
||||
- ipmi/retry_timeout is now deprecated in favour of ipmi/command_retry_timeout
|
@ -79,6 +79,7 @@ describe 'ironic::conductor' do
|
||||
is_expected.to contain_ironic_config('conductor/inspect_timeout').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('deploy/default_boot_option').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('neutron/port_setup_delay').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_config('conductor/power_state_change_timeout').with(:value => '<SERVICE DEFAULT>')
|
||||
end
|
||||
|
||||
context 'when overriding parameters' do
|
||||
@ -98,7 +99,8 @@ describe 'ironic::conductor' do
|
||||
:configdrive_use_swift => true,
|
||||
:configdrive_swift_container => 'cont',
|
||||
:default_boot_option => 'local',
|
||||
:port_setup_delay => '15'
|
||||
:port_setup_delay => '15',
|
||||
:power_state_change_timeout => '300'
|
||||
)
|
||||
end
|
||||
it 'should replace default parameter with new value' do
|
||||
@ -118,6 +120,7 @@ describe 'ironic::conductor' do
|
||||
is_expected.to contain_ironic_config('conductor/configdrive_swift_container').with_value(p[:configdrive_swift_container])
|
||||
is_expected.to contain_ironic_config('deploy/default_boot_option').with_value(p[:default_boot_option])
|
||||
is_expected.to contain_ironic_config('neutron/port_setup_delay').with_value(p[:port_setup_delay])
|
||||
is_expected.to contain_ironic_config('conductor/power_state_change_timeout').with_value(p[:power_state_change_timeout])
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -23,7 +23,7 @@ require 'spec_helper'
|
||||
describe 'ironic::drivers::ipmi' do
|
||||
|
||||
let :default_params do
|
||||
{ :retry_timeout => '10' }
|
||||
{}
|
||||
end
|
||||
|
||||
let :params do
|
||||
@ -36,15 +36,15 @@ describe 'ironic::drivers::ipmi' do
|
||||
end
|
||||
|
||||
it 'configures ironic.conf' do
|
||||
is_expected.to contain_ironic_config('ipmi/retry_timeout').with_value(p[:retry_timeout])
|
||||
is_expected.to contain_ironic_config('ipmi/command_retry_timeout').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
|
||||
context 'when overriding parameters' do
|
||||
before do
|
||||
params.merge!(:retry_timeout => '50')
|
||||
params.merge!(:command_retry_timeout => '50')
|
||||
end
|
||||
it 'should replace default parameter with new value' do
|
||||
is_expected.to contain_ironic_config('ipmi/retry_timeout').with_value(p[:retry_timeout])
|
||||
is_expected.to contain_ironic_config('ipmi/command_retry_timeout').with_value('50')
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user