From 507d3877138a4fc1696e35734a860459962b61d7 Mon Sep 17 00:00:00 2001 From: Vasyl Saienko Date: Tue, 28 Mar 2017 17:21:52 +0300 Subject: [PATCH] Allow to set port_setup_delay ironic::conductor param This patch allows to configure port_setup_delay by setting ::ironic::config::port_setup_delay variable. Change-Id: I53548ac2c47296aef5553477a522ab764c2a67bd --- manifests/conductor.pp | 7 +++++++ .../notes/add_port_setup_delay_param-e28595863d31117e.yaml | 5 +++++ spec/classes/ironic_conductor_spec.rb | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 releasenotes/notes/add_port_setup_delay_param-e28595863d31117e.yaml diff --git a/manifests/conductor.pp b/manifests/conductor.pp index f226d789..7341af30 100644 --- a/manifests/conductor.pp +++ b/manifests/conductor.pp @@ -114,6 +114,11 @@ # Can not be specified together with provisioning_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. +# Defaults to $::os_service_default +# # DEPRECATED # # [*cleaning_network_uuid*] @@ -157,6 +162,7 @@ class ironic::conductor ( $configdrive_use_swift = $::os_service_default, $configdrive_swift_container = $::os_service_default, $default_boot_option = $::os_service_default, + $port_setup_delay = $::os_service_default, $cleaning_network_name = undef, $provisioning_network_name = undef, # DEPRECATED @@ -261,6 +267,7 @@ moved to ironic::glance manifest") 'conductor/configdrive_use_swift': value => $configdrive_use_swift; 'conductor/configdrive_swift_container': value => $configdrive_swift_container; 'deploy/default_boot_option': value => $default_boot_option; + 'neutron/port_setup_delay': value => $port_setup_delay; } if $cleaning_network_name { diff --git a/releasenotes/notes/add_port_setup_delay_param-e28595863d31117e.yaml b/releasenotes/notes/add_port_setup_delay_param-e28595863d31117e.yaml new file mode 100644 index 00000000..0acbbbce --- /dev/null +++ b/releasenotes/notes/add_port_setup_delay_param-e28595863d31117e.yaml @@ -0,0 +1,5 @@ +--- +features: + - Add port_setup_delay parameter to ::ironic::conductor + class. Defines delay value to wait for Neutron agents + to setup sufficient DHCP configuration. diff --git a/spec/classes/ironic_conductor_spec.rb b/spec/classes/ironic_conductor_spec.rb index 8f51073d..28b8eca4 100644 --- a/spec/classes/ironic_conductor_spec.rb +++ b/spec/classes/ironic_conductor_spec.rb @@ -77,6 +77,7 @@ describe 'ironic::conductor' do is_expected.to contain_ironic_config('conductor/configdrive_use_swift').with(:value => '') is_expected.to contain_ironic_config('conductor/configdrive_swift_container').with(:value => '') is_expected.to contain_ironic_config('deploy/default_boot_option').with(:value => '') + is_expected.to contain_ironic_config('neutron/port_setup_delay').with(:value => '') end context 'when overriding parameters' do @@ -96,6 +97,7 @@ describe 'ironic::conductor' do :configdrive_use_swift => true, :configdrive_swift_container => 'cont', :default_boot_option => 'local', + :port_setup_delay => '15' ) end it 'should replace default parameter with new value' do @@ -114,6 +116,7 @@ describe 'ironic::conductor' do is_expected.to contain_ironic_config('conductor/configdrive_use_swift').with_value(p[:configdrive_use_swift]) 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]) end end