From 3389f02d67a14e10ffa5b988229507e9ce9998d0 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 14 Jan 2022 11:15:14 +0900 Subject: [PATCH] Add support for [nova] live_migation_events This change introduces capability to manage [nova] live_migation_events which was introduced recently. This is implemented mainly so that we can backport this feature to stable branches. The parameter is already deprecated in master so a separate change to deprecate the parameter will be submitted. Change-Id: Ieccaf6b81939119c51ec74c44ee0fd2fcea3d99f --- manifests/server/notifications/nova.pp | 8 ++++++++ .../notes/live_migration_events-84fc814cb28a8a68.yaml | 6 ++++++ spec/classes/neutron_server_notifications_nova_spec.rb | 3 +++ 3 files changed, 17 insertions(+) create mode 100644 releasenotes/notes/live_migration_events-84fc814cb28a8a68.yaml diff --git a/manifests/server/notifications/nova.pp b/manifests/server/notifications/nova.pp index 884ef721b..03ffa18d3 100644 --- a/manifests/server/notifications/nova.pp +++ b/manifests/server/notifications/nova.pp @@ -69,6 +69,12 @@ # the keystone catalog. # Defaults to $::os_service_default # +# [*live_migration_events*] +# (optional) When this option is enabled, during the live migration, the OVS +# agent will only send the "vif-plugged-event" when the destination host +# interface is bound. +# Defaults to $::os_service_default +# class neutron::server::notifications::nova ( $password, $notify_nova_on_port_status_changes = $::os_service_default, @@ -82,6 +88,7 @@ class neutron::server::notifications::nova ( $auth_url = 'http://127.0.0.1:5000', $region_name = $::os_service_default, $endpoint_type = $::os_service_default, + $live_migration_events = $::os_service_default, ) { include neutron::deps @@ -108,6 +115,7 @@ class neutron::server::notifications::nova ( } neutron_config { + 'nova/live_migration_events': value => $live_migration_events; 'DEFAULT/notify_nova_on_port_status_changes': value => $notify_nova_on_port_status_changes; 'DEFAULT/notify_nova_on_port_data_changes': value => $notify_nova_on_port_data_changes; } diff --git a/releasenotes/notes/live_migration_events-84fc814cb28a8a68.yaml b/releasenotes/notes/live_migration_events-84fc814cb28a8a68.yaml new file mode 100644 index 000000000..1c8a372fe --- /dev/null +++ b/releasenotes/notes/live_migration_events-84fc814cb28a8a68.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + The new ``neutron::server::notifications::nova::live_migration_events`` + parameter has been added. This parameter controls + the ``[nova] live_migation_events`` parameter in ``neutron.conf``. diff --git a/spec/classes/neutron_server_notifications_nova_spec.rb b/spec/classes/neutron_server_notifications_nova_spec.rb index de5430d57..bbb947614 100644 --- a/spec/classes/neutron_server_notifications_nova_spec.rb +++ b/spec/classes/neutron_server_notifications_nova_spec.rb @@ -36,6 +36,7 @@ describe 'neutron::server::notifications::nova' do should contain_neutron_config('nova/auth_url').with_value('http://127.0.0.1:5000') should contain_neutron_config('nova/region_name').with_value('') should contain_neutron_config('nova/endpoint_type').with_value('') + should contain_neutron_config('nova/live_migration_events').with_value('') end context 'when overriding parameters' do @@ -51,6 +52,7 @@ describe 'neutron::server::notifications::nova' do :auth_url => 'http://keystone:5000/v3', :region_name => 'MyRegion', :endpoint_type => 'internal', + :live_migration_events => true, ) end @@ -67,6 +69,7 @@ describe 'neutron::server::notifications::nova' do should contain_neutron_config('nova/auth_url').with_value('http://keystone:5000/v3') should contain_neutron_config('nova/region_name').with_value('MyRegion') should contain_neutron_config('nova/endpoint_type').with_value('internal') + should contain_neutron_config('nova/live_migration_events').with_value(true) end end