From c8725a6c6e7aef2f107446d1e2612100648694c9 Mon Sep 17 00:00:00 2001 From: Anton Kremenetsky Date: Mon, 2 Jul 2018 15:30:31 +0300 Subject: [PATCH] load interface_driver using a symbolic name The original fix description https://review.openstack.org/#/c/541815/ Change-Id: Ifa9dca8cf634561dab0fee9a26711678a50379bf Signed-off-by: Anton Kremenetsky Closes-Bug: #1747964 --- templates/mitaka/dhcp_agent.ini | 2 +- templates/mitaka/l3_agent.ini | 13 +++++++++++++ tests/basic_deployment.py | 14 ++++++++++++-- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 templates/mitaka/l3_agent.ini diff --git a/templates/mitaka/dhcp_agent.ini b/templates/mitaka/dhcp_agent.ini index 01d3c44d..224d2c2e 100644 --- a/templates/mitaka/dhcp_agent.ini +++ b/templates/mitaka/dhcp_agent.ini @@ -7,7 +7,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 diff --git a/templates/mitaka/l3_agent.ini b/templates/mitaka/l3_agent.ini new file mode 100644 index 00000000..bf983aac --- /dev/null +++ b/templates/mitaka/l3_agent.ini @@ -0,0 +1,13 @@ +############################################################################### +# [ WARNING ] +# Configuration file maintained by Juju. Local changes may be overwritten. +# {{ restart_trigger_l3agent }} +############################################################################### + +[DEFAULT] +interface_driver = openvswitch +agent_mode = {{ agent_mode }} +{% if external_configuration_new -%} +gateway_external_network_id = +external_network_bridge = +{% endif %} diff --git a/tests/basic_deployment.py b/tests/basic_deployment.py index 3a7106e4..99704b51 100644 --- a/tests/basic_deployment.py +++ b/tests/basic_deployment.py @@ -268,7 +268,7 @@ class NeutronOVSBasicDeployment(OpenStackAmuletDeployment): conf = "/etc/neutron/plugins/ml2/ml2_conf.ini" for value in vpair: self.d.configure(service, {charm_key: value}) - self._wait_and_check() + self._wait_and_check(sleep=60) ret = u.validate_config_data(unit, conf, section, {config_file_key: value}) msg = "Propagation error, expected %s=%s" % (config_file_key, @@ -365,11 +365,21 @@ class NeutronOVSBasicDeployment(OpenStackAmuletDeployment): set_alternate = {'enable-qos': 'True'} self.d.configure('neutron-api', set_alternate) self._wait_and_check() + qos_plugin = 'qos' + config = u._get_config( + self.neutron_api_sentry, '/etc/neutron/neutron.conf') + service_plugins = config.get( + 'DEFAULT', + 'service_plugins').split(',') + if qos_plugin not in service_plugins: + message = "{} not in service_plugins".format(qos_plugin) + amulet.raise_status(amulet.FAIL, msg=message) + config = u._get_config( unit, '/etc/neutron/plugins/ml2/openvswitch_agent.ini') extensions = config.get('agent', 'extensions').split(',') - if 'qos' not in extensions: + if qos_plugin not in extensions: message = "qos not in extensions" amulet.raise_status(amulet.FAIL, msg=message)