Expose vif_plugging parameters
Allow vif_plugging_is_fatal and vif_plugging_timeout parameters to be modified to support configurations in which neutron vif plugging events will not be sent to nova. Change-Id: I92a854311b391e8dc27fe1ad9da80bfbea4041c2
This commit is contained in:
@@ -70,6 +70,18 @@
|
||||
# to re-enable the Nova firewall.
|
||||
# Defaults to 'nova.virt.firewall.NoopFirewallDriver'
|
||||
#
|
||||
# [*vif_plugging_is_fatal*]
|
||||
# (optional) Fail to boot instance if vif plugging fails.
|
||||
# This prevents nova from booting an instance if vif plugging notification
|
||||
# is not received from neutron.
|
||||
# Defaults to 'True'
|
||||
#
|
||||
# [*vif_plugging_timeout*]
|
||||
# (optional) Number of seconds to wait for neutron vif plugging events.
|
||||
# Set to '0' and vif_plugging_is_fatal to 'False' if vif plugging
|
||||
# notification is not being used.
|
||||
# Defaults to '300'
|
||||
#
|
||||
class nova::network::neutron (
|
||||
$neutron_admin_password,
|
||||
$neutron_auth_strategy = 'keystone',
|
||||
@@ -84,7 +96,9 @@ class nova::network::neutron (
|
||||
$neutron_extension_sync_interval = '600',
|
||||
$neutron_ca_certificates_file = undef,
|
||||
$security_group_api = 'neutron',
|
||||
$firewall_driver = 'nova.virt.firewall.NoopFirewallDriver'
|
||||
$firewall_driver = 'nova.virt.firewall.NoopFirewallDriver',
|
||||
$vif_plugging_is_fatal = true,
|
||||
$vif_plugging_timeout = '300'
|
||||
) {
|
||||
|
||||
nova_config {
|
||||
@@ -102,6 +116,8 @@ class nova::network::neutron (
|
||||
'DEFAULT/neutron_extension_sync_interval': value => $neutron_extension_sync_interval;
|
||||
'DEFAULT/security_group_api': value => $security_group_api;
|
||||
'DEFAULT/firewall_driver': value => $firewall_driver;
|
||||
'DEFAULT/vif_plugging_is_fatal': value => $vif_plugging_is_fatal;
|
||||
'DEFAULT/vif_plugging_timeout': value => $vif_plugging_timeout;
|
||||
}
|
||||
|
||||
if ! $neutron_ca_certificates_file {
|
||||
|
@@ -14,7 +14,9 @@ describe 'nova::network::neutron' do
|
||||
:neutron_ovs_bridge => 'br-int',
|
||||
:neutron_extension_sync_interval => '600',
|
||||
:security_group_api => 'neutron',
|
||||
:firewall_driver => 'nova.virt.firewall.NoopFirewallDriver'
|
||||
:firewall_driver => 'nova.virt.firewall.NoopFirewallDriver',
|
||||
:vif_plugging_is_fatal => true,
|
||||
:vif_plugging_timeout => '300'
|
||||
}
|
||||
end
|
||||
|
||||
@@ -41,6 +43,10 @@ describe 'nova::network::neutron' do
|
||||
should contain_nova_config('DEFAULT/security_group_api').with_value(default_params[:security_group_api])
|
||||
should contain_nova_config('DEFAULT/neutron_ovs_bridge').with_value(default_params[:neutron_ovs_bridge])
|
||||
end
|
||||
it 'configures neutron vif plugging events in nova.conf' do
|
||||
should contain_nova_config('DEFAULT/vif_plugging_is_fatal').with_value(default_params[:vif_plugging_is_fatal])
|
||||
should contain_nova_config('DEFAULT/vif_plugging_timeout').with_value(default_params[:vif_plugging_timeout])
|
||||
end
|
||||
end
|
||||
|
||||
context 'when overriding class parameters' do
|
||||
@@ -56,7 +62,9 @@ describe 'nova::network::neutron' do
|
||||
:security_group_api => 'nova',
|
||||
:firewall_driver => 'nova.virt.firewall.IptablesFirewallDriver',
|
||||
:neutron_ovs_bridge => 'br-int',
|
||||
:neutron_extension_sync_interval => '600'
|
||||
:neutron_extension_sync_interval => '600',
|
||||
:vif_plugging_is_fatal => false,
|
||||
:vif_plugging_timeout => '0'
|
||||
)
|
||||
end
|
||||
|
||||
@@ -78,5 +86,9 @@ describe 'nova::network::neutron' do
|
||||
should contain_nova_config('DEFAULT/security_group_api').with_value(params[:security_group_api])
|
||||
should contain_nova_config('DEFAULT/neutron_ovs_bridge').with_value(params[:neutron_ovs_bridge])
|
||||
end
|
||||
it 'configures neutron vif plugging events in nova.conf' do
|
||||
should contain_nova_config('DEFAULT/vif_plugging_is_fatal').with_value(params[:vif_plugging_is_fatal])
|
||||
should contain_nova_config('DEFAULT/vif_plugging_timeout').with_value(params[:vif_plugging_timeout])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user