From a28f7340b72000a6ed4fdb65f85c62a4079a834b Mon Sep 17 00:00:00 2001 From: Michael Chapman Date: Thu, 26 Jun 2014 01:56:25 +1000 Subject: [PATCH] Link from ovs config file to plugin.ini on RedHat All init scripts for neutron-openvswitch-agent from RedHat packages use the non-ml2 config file path. When using ML2 this causes problems since all config is set under the ML2 plugin directory. Since this is only a bug when using ML2, but not when using the monolithic plugin, it may not be fixed in packages. https://bugzilla.redhat.com/show_bug.cgi?id=1087647 This patch creates a symlink from the old plugin config path to the new one to mitigate the issue. Change-Id: I5feb8fc39fa4d67aebb4209d7b44bea38d1a9d5f --- manifests/agents/ml2/ovs.pp | 9 ++++++++- spec/classes/neutron_agents_ml2_ovs_spec.rb | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/manifests/agents/ml2/ovs.pp b/manifests/agents/ml2/ovs.pp index 2afe78867..34c1ddbad 100644 --- a/manifests/agents/ml2/ovs.pp +++ b/manifests/agents/ml2/ovs.pp @@ -204,7 +204,14 @@ package { 'neutron-ovs-agent': ensure => $package_ensure, name => $::neutron::params::ovs_server_package, - } + } -> + # https://bugzilla.redhat.com/show_bug.cgi?id=1087647 + # Causes init script for agent to load the old ovs file + # instead of the ml2 config file. + file { '/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini': + ensure => link, + target => '/etc/neutron/plugin.ini' + } ~> Service<| title == 'neutron-ovs-agent-service' |> } } diff --git a/spec/classes/neutron_agents_ml2_ovs_spec.rb b/spec/classes/neutron_agents_ml2_ovs_spec.rb index a5503c4ad..a4e9f77a1 100644 --- a/spec/classes/neutron_agents_ml2_ovs_spec.rb +++ b/spec/classes/neutron_agents_ml2_ovs_spec.rb @@ -178,6 +178,7 @@ end it_configures 'neutron plugin ovs agent with ml2 plugin' + it 'configures neutron ovs cleanup service' do should contain_service('ovs-cleanup-service').with( :name => platform_params[:ovs_cleanup_service], @@ -187,5 +188,11 @@ should contain_package('neutron-ovs-agent').with_before(/Service\[ovs-cleanup-service\]/) end + it 'links from ovs config to plugin config' do + should contain_file('/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini').with( + :ensure => 'link', + :target => '/etc/neutron/plugin.ini' + ) + end end end