Add service_providers to neutron server

neutron server requires service_providers when lbaas or vpnaas are
enabled. Currently, those parameters are only added as part of the
agent configurations, so neutron server fails to run when agent is
not co-located with controller in packstack.

This patch adds service_providers as part of the neutron-server
configuratio.

Change-Id: I74e0360d2d47485544b7f0e9bd6d34e48826ef0d
Resolves: rhbz#1340804
This commit is contained in:
Alfredo Moralejo 2016-06-10 07:18:18 -04:00
parent 01d278b753
commit 2a2bf513b6
2 changed files with 13 additions and 1 deletions

View File

@ -613,8 +613,13 @@ def create_manifests(config, messages):
global q_hosts
service_plugins = []
service_providers = []
if config['CONFIG_LBAAS_INSTALL'] == 'y':
lbaas_sp = ('LOADBALANCER:Haproxy:neutron_lbaas.services.loadbalancer.'
'drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver'
':default')
service_plugins.append('lbaas')
service_providers.append(lbaas_sp)
# ML2 uses the L3 Router service plugin to implement l3 agent
service_plugins.append('router')
@ -627,10 +632,16 @@ def create_manifests(config, messages):
if config['CONFIG_NEUTRON_VPNAAS'] == 'y':
service_plugins.append('vpnaas')
vpnaas_sp = ('VPN:libreswan:neutron_vpnaas.services.vpn.'
'service_drivers.ipsec.IPsecVPNDriver:default')
service_providers.append(vpnaas_sp)
config['SERVICE_PLUGINS'] = (service_plugins if service_plugins
else 'undef')
config['SERVICE_PROVIDERS'] = (service_providers if service_providers
else [])
config['FIREWALL_DRIVER'] = ("neutron.agent.linux.iptables_firewall."
"OVSHybridIptablesFirewallDriver")

View File

@ -7,7 +7,8 @@ class { '::neutron::server':
sync_db => true,
enabled => true,
api_workers => $service_workers,
rpc_workers => $service_workers
rpc_workers => $service_workers,
service_providers => hiera_array('SERVICE_PROVIDERS')
}
# TODO: FIXME: remove this hack after upstream resolves https://bugs.launchpad.net/puppet-neutron/+bug/1474961