Browse Source

Allow enabling debug output of IPMI commands

This change introduces a new parameter, ironic::drivers::ipmi::debug,
so that operators can enabled debug outputs of IPMI commands executed
in ironic.

Change-Id: Ie8993c14649b56e5af530ed2e94e38bc02bb7d55
tags/17.2.0
Takashi Kajinami 2 weeks ago
parent
commit
b79368ec09
3 changed files with 18 additions and 2 deletions
  1. +6
    -0
      manifests/drivers/ipmi.pp
  2. +5
    -0
      releasenotes/notes/ipmi-debug-84d4ab86246d608b.yaml
  3. +7
    -2
      spec/classes/ironic_drivers_ipmi_spec.rb

+ 6
- 0
manifests/drivers/ipmi.pp View File

@@ -29,9 +29,14 @@
# Should be an interger value
# Defaults to $::os_service_default
#
# [*debug*]
# (optional) Enables debug outputs of IPMI commands
# Defaults to $::os_service_default
#
class ironic::drivers::ipmi (
$command_retry_timeout = $::os_service_default,
$min_command_interval = $::os_service_default,
$debug = $::os_service_default,
) {

include ironic::deps
@@ -40,6 +45,7 @@ class ironic::drivers::ipmi (
ironic_config {
'ipmi/command_retry_timeout': value => $command_retry_timeout;
'ipmi/min_command_interval': value => $min_command_interval;
'ipmi/debug': value => $debug;
}

}

+ 5
- 0
releasenotes/notes/ipmi-debug-84d4ab86246d608b.yaml View File

@@ -0,0 +1,5 @@
---
features:
- |
The new ``ironic::drivers::ipmi::debug`` parameter has been added to enable
debug outputs of IPMI commands.

+ 7
- 2
spec/classes/ironic_drivers_ipmi_spec.rb View File

@@ -38,16 +38,21 @@ describe 'ironic::drivers::ipmi' do
it 'configures ironic.conf' do
is_expected.to contain_ironic_config('ipmi/command_retry_timeout').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('ipmi/min_command_interval').with_value('<SERVICE DEFAULT>')
is_expected.to contain_ironic_config('ipmi/debug').with_value('<SERVICE DEFAULT>')
end

context 'when overriding parameters' do
before do
params.merge!(:command_retry_timeout => '50')
params.merge!(:min_command_interval => '5')
params.merge!(
:command_retry_timeout => '50',
:min_command_interval => '5',
:debug => true,
)
end
it 'should replace default parameter with new value' do
is_expected.to contain_ironic_config('ipmi/command_retry_timeout').with_value('50')
is_expected.to contain_ironic_config('ipmi/min_command_interval').with_value('5')
is_expected.to contain_ironic_config('ipmi/debug').with_value(true)
end
end



Loading…
Cancel
Save