Skip to content

Commit

Permalink
Add plugin config file to /etc/default/neutron-server
Browse files Browse the repository at this point in the history
Debian platforms uses /etc/default/neutron-server to tell
neutron-server service which plugin configuration file to load.

Configure it.

Change-Id: I0638d2584ad327ae1ed77f672d5efb1c28064aa2
Closes-bug: #1357431
(cherry picked from commit c848aff)
  • Loading branch information
mgagne committed Aug 18, 2014
1 parent f06bb9b commit 0a7e0f1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
11 changes: 11 additions & 0 deletions manifests/plugins/ml2.pp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,17 @@
warning('Without networking mechanism driver, ml2 will not communicate with L2 agents')
}

if $::osfamily == 'Debian' {
file_line { '/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG':
path => '/etc/default/neutron-server',
match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
line => 'NEUTRON_PLUGIN_CONFIG=/etc/neutron/plugin.ini',
require => File['/etc/neutron/plugin.ini'],
}
File_line['/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG']
~> Service<| title == 'neutron-server' |>
}

# In RH, the link is used to start Neutron process but in Debian, it's used only
# to manage database synchronization.
file {'/etc/neutron/plugin.ini':
Expand Down
9 changes: 9 additions & 0 deletions spec/classes/neutron_plugins_ml2_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,15 @@
{}
end

it 'configures /etc/default/neutron-server' do
should contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').with(
:path => '/etc/default/neutron-server',
:match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
:line => 'NEUTRON_PLUGIN_CONFIG=/etc/neutron/plugin.ini',
:require => ['File[/etc/neutron/plugin.ini]']
)
end

context 'on Ubuntu operating systems' do
before do
facts.merge!({:operatingsystem => 'Ubuntu'})
Expand Down

0 comments on commit 0a7e0f1

Please sign in to comment.