Skip to content

Commit

Permalink
Link from ovs config file to plugin.ini on RedHat
Browse files Browse the repository at this point in the history
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
  • Loading branch information
michaeltchapman committed Jun 25, 2014
1 parent aab079d commit a28f734
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
9 changes: 8 additions & 1 deletion manifests/agents/ml2/ovs.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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' |>
}
}

Expand Down
7 changes: 7 additions & 0 deletions spec/classes/neutron_agents_ml2_ovs_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -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

0 comments on commit a28f734

Please sign in to comment.