Clean up Neutron metering configuration

The Neutron metering agent now supportes Stevedore aliases, so logic
to support the full classpath can be removed. In addition, the
interface_driver defaulted to (and only supported) LinuxBridge.
The driver will now be set to linuxbridge when the ml2.lxb plugin is
defined, otherwise it defaults to openvswitch.

Change-Id: I946439b1207f5f14dc888e9cd28cf1ace9367513
This commit is contained in:
James Denton 2020-10-27 09:50:28 -05:00 committed by Dmitriy Rabotyagov (noonedeadpunk)
parent e3f04ef863
commit 7358b8721d

View File

@ -139,9 +139,8 @@ neutron_db_plugin: "{{ neutron_conf_dir }}/{{ neutron_plugins[neutron_plugin_typ
### Telemetry integration
###
# Please add 'metering' to the neutron_plugin_base list
#TODO(odyssey4me): Remove the class path from this conditional in the Newton cycle
neutron_metering: "{% if 'metering' in neutron_plugin_base or 'neutron.services.metering.metering_plugin.MeteringPlugin' in neutron_plugin_base %}True{% else %}False{% endif %}"
# Add 'metering' to the neutron_plugin_base list when enabled
neutron_metering: "{% if 'metering' in neutron_plugin_base %}True{% else %}False{% endif %}"
###
### Neutron Plugins
@ -401,14 +400,7 @@ neutron_services:
config_overrides: "{{ neutron_metering_agent_ini_overrides }}"
config_type: "ini"
init_config_overrides: "{{ neutron_metering_agent_init_overrides }}"
# Other agents will use neutron_plugins[neutron_plugin_type].driver_interface
# for the interface_driver, but that uses a stevedore alias. Metering agent
# hasn't been updated to use stevedore alises so that fails. To work around
# the problem until metering agent is updated, we should use the full
# module.class path to the interface driver.
# TODO(hughsaunders): switch back to stevedore when
# https://review.openstack.org/#/c/419881/ merges and is backported.
interface_driver: neutron.agent.linux.interface.BridgeInterfaceDriver
interface_driver: "{{ (neutron_plugin_type == 'ml2.lxb') | ternary('linuxbridge', 'openvswitch') }}"
start_order: 3
neutron-l3-agent:
group: neutron_l3_agent