load interface_driver using a symbolic name
Instead of relying on a full class path let's use symbolic names and namespaces from setup.cfg which relies on stevedore to use a proper class. This can only be used for code-paths that do not rely on direct usage of importlib which is not the case for the metering agent, which is why its config is left untouched. Co-Authored-By: Anton Kremenetsky <akremenetsky@dev.rtsoft.ru> Co-Authored-By: Dmitrii Shcherbakov <dmitrii.shcherbakov@canonical.com> Change-Id: I4d3389a0fe376fed87265f51fdd69caf14fb3b16 Closes-Bug: #1747964
This commit is contained in:
parent
07baa05788
commit
bf0cdcf9ee
@ -4,7 +4,7 @@
|
||||
###############################################################################
|
||||
[DEFAULT]
|
||||
state_path = /var/lib/neutron
|
||||
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
|
||||
interface_driver = openvswitch
|
||||
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
|
||||
root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
|
||||
debug = {{ debug }}
|
||||
|
28
templates/mitaka/l3_agent.ini
Normal file
28
templates/mitaka/l3_agent.ini
Normal file
@ -0,0 +1,28 @@
|
||||
###############################################################################
|
||||
# [ WARNING ]
|
||||
# Configuration file maintained by Juju. Local changes may be overwritten.
|
||||
###############################################################################
|
||||
[DEFAULT]
|
||||
interface_driver = openvswitch
|
||||
auth_url = {{ service_protocol }}://{{ keystone_host }}:{{ service_port }}/v2.0
|
||||
auth_region = {{ region }}
|
||||
admin_tenant_name = {{ service_tenant }}
|
||||
admin_user = {{ service_username }}
|
||||
admin_password = {{ service_password }}
|
||||
root_helper = sudo /usr/bin/neutron-rootwrap /etc/neutron/rootwrap.conf
|
||||
handle_internal_only_routers = {{ handle_internal_only_router }}
|
||||
{% if plugin == 'n1kv' %}
|
||||
l3_agent_manager = neutron.agent.l3_agent.L3NATAgentWithStateReport
|
||||
external_network_bridge = br-int
|
||||
ovs_use_veth = False
|
||||
use_namespaces = True
|
||||
{% else %}
|
||||
ovs_use_veth = True
|
||||
{% endif %}
|
||||
{% if external_configuration_new -%}
|
||||
gateway_external_network_id =
|
||||
external_network_bridge =
|
||||
{% elif ext_net_id %}
|
||||
gateway_external_network_id = {{ ext_net_id }}
|
||||
{% endif -%}
|
||||
agent_mode = {{ agent_mode }}
|
13
templates/mitaka/lbaas_agent.ini
Normal file
13
templates/mitaka/lbaas_agent.ini
Normal file
@ -0,0 +1,13 @@
|
||||
# kilo
|
||||
###############################################################################
|
||||
# [ WARNING ]
|
||||
# Configuration file maintained by Juju. Local changes may be overwritten.
|
||||
###############################################################################
|
||||
[DEFAULT]
|
||||
periodic_interval = 10
|
||||
interface_driver = openvswitch
|
||||
ovs_use_veth = False
|
||||
device_driver = neutron_lbaas.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver
|
||||
[haproxy]
|
||||
loadbalancer_state_path = $state_path/lbaas
|
||||
user_group = nogroup
|
@ -4,7 +4,7 @@
|
||||
# Configuration file maintained by Juju. Local changes may be overwritten.
|
||||
###############################################################################
|
||||
[DEFAULT]
|
||||
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
|
||||
interface_driver = openvswitch
|
||||
auth_url = {{ service_protocol }}://{{ keystone_host }}:{{ service_port }}/v2.0
|
||||
auth_region = {{ region }}
|
||||
admin_tenant_name = {{ service_tenant }}
|
||||
|
@ -4,7 +4,7 @@
|
||||
# Configuration file maintained by Juju. Local changes may be overwritten.
|
||||
###############################################################################
|
||||
[DEFAULT]
|
||||
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
|
||||
interface_driver = openvswitch
|
||||
device_driver = neutron_lbaas.drivers.haproxy.namespace_driver.HaproxyNSDriver
|
||||
[haproxy]
|
||||
loadbalancer_state_path = $state_path/lbaas
|
||||
|
@ -15,6 +15,9 @@ from charmhelpers.contrib.openstack.amulet.utils import (
|
||||
# ERROR
|
||||
)
|
||||
|
||||
from charmhelpers.contrib.openstack.utils import (
|
||||
CompareOpenStackReleases,
|
||||
)
|
||||
# Use DEBUG to turn on debug logging
|
||||
u = OpenStackAmuletUtils(DEBUG)
|
||||
|
||||
@ -597,10 +600,18 @@ class NeutronGatewayBasicDeployment(OpenStackAmuletDeployment):
|
||||
u.log.debug('Checking neutron gateway dhcp agent config file data...')
|
||||
unit = self.neutron_gateway_sentry
|
||||
conf = '/etc/neutron/dhcp_agent.ini'
|
||||
|
||||
cmp_os_release = CompareOpenStackReleases(
|
||||
self._get_openstack_release_string()
|
||||
)
|
||||
if cmp_os_release >= 'mitaka':
|
||||
interface_driver = 'openvswitch'
|
||||
else:
|
||||
interface_driver = ('neutron.agent.linux.interface.'
|
||||
'OVSInterfaceDriver')
|
||||
expected = {
|
||||
'state_path': '/var/lib/neutron',
|
||||
'interface_driver': 'neutron.agent.linux.interface.'
|
||||
'OVSInterfaceDriver',
|
||||
'interface_driver': interface_driver,
|
||||
'dhcp_driver': 'neutron.agent.linux.dhcp.Dnsmasq',
|
||||
'root_helper': 'sudo /usr/bin/neutron-rootwrap '
|
||||
'/etc/neutron/rootwrap.conf',
|
||||
@ -653,9 +664,17 @@ class NeutronGatewayBasicDeployment(OpenStackAmuletDeployment):
|
||||
interface='publicURL')
|
||||
|
||||
conf = '/etc/neutron/l3_agent.ini'
|
||||
|
||||
cmp_os_release = CompareOpenStackReleases(
|
||||
self._get_openstack_release_string()
|
||||
)
|
||||
if cmp_os_release >= 'mitaka':
|
||||
interface_driver = 'openvswitch'
|
||||
else:
|
||||
interface_driver = ('neutron.agent.linux.interface.'
|
||||
'OVSInterfaceDriver')
|
||||
expected = {
|
||||
'interface_driver': 'neutron.agent.linux.interface.'
|
||||
'OVSInterfaceDriver',
|
||||
'interface_driver': interface_driver,
|
||||
'auth_url': ep,
|
||||
'auth_region': 'RegionOne',
|
||||
'admin_tenant_name': 'services',
|
||||
@ -679,10 +698,17 @@ class NeutronGatewayBasicDeployment(OpenStackAmuletDeployment):
|
||||
|
||||
unit = self.neutron_gateway_sentry
|
||||
conf = '/etc/neutron/lbaas_agent.ini'
|
||||
cmp_os_release = CompareOpenStackReleases(
|
||||
self._get_openstack_release_string()
|
||||
)
|
||||
if cmp_os_release >= 'mitaka':
|
||||
interface_driver = 'openvswitch'
|
||||
else:
|
||||
interface_driver = ('neutron.agent.linux.interface.'
|
||||
'OVSInterfaceDriver')
|
||||
expected = {
|
||||
'DEFAULT': {
|
||||
'interface_driver': 'neutron.agent.linux.interface.'
|
||||
'OVSInterfaceDriver',
|
||||
'interface_driver': interface_driver,
|
||||
'periodic_interval': '10',
|
||||
'ovs_use_veth': 'False',
|
||||
},
|
||||
@ -753,13 +779,15 @@ class NeutronGatewayBasicDeployment(OpenStackAmuletDeployment):
|
||||
'config file data...')
|
||||
unit = self.neutron_gateway_sentry
|
||||
conf = '/etc/neutron/metering_agent.ini'
|
||||
|
||||
interface_driver = ('neutron.agent.linux.interface.'
|
||||
'OVSInterfaceDriver')
|
||||
expected = {
|
||||
'driver': 'neutron.services.metering.drivers.iptables.'
|
||||
'iptables_driver.IptablesMeteringDriver',
|
||||
'measure_interval': '30',
|
||||
'report_interval': '300',
|
||||
'interface_driver': 'neutron.agent.linux.interface.'
|
||||
'OVSInterfaceDriver',
|
||||
'interface_driver': interface_driver,
|
||||
'use_namespaces': 'True'
|
||||
}
|
||||
section = 'DEFAULT'
|
||||
|
Loading…
x
Reference in New Issue
Block a user