From 6aaf1e7fd7922ca25f3dcddd8465a71e537f3a84 Mon Sep 17 00:00:00 2001 From: Hugh Saunders Date: Fri, 13 Jan 2017 11:56:30 +0000 Subject: [PATCH] Use full path for metering_agent interface_Driver Metering agent has not been updated to resolve stevedore aliases for drivers so the full module.path string must be used instead. Change-Id: I2f0991fc0ab14fa7ccdd677437c2cf2a5ba78377 Closes-Bug: #1656278 --- defaults/main.yml | 8 ++++++++ templates/metering_agent.ini.j2 | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 75fe5b85..623c6b3e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -229,6 +229,14 @@ neutron_services: config_options: "--config-file {{ neutron_conf_dir }}/neutron.conf --config-file {{ neutron_conf_dir }}/metering_agent.ini --log-file=/var/log/neutron/neutron-metering-agent.log" config_overrides: "{{ neutron_metering_agent_ini_overrides }}" config_type: "ini" + # 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 neutron-l3-agent: group: neutron_l3_agent service_name: neutron-l3-agent diff --git a/templates/metering_agent.ini.j2 b/templates/metering_agent.ini.j2 index 0a461af6..4b130805 100644 --- a/templates/metering_agent.ini.j2 +++ b/templates/metering_agent.ini.j2 @@ -6,7 +6,15 @@ debug = {{ debug }} # Drivers driver = {{ neutron_driver_metering }} -interface_driver = {{ neutron_plugins[neutron_plugin_type].driver_interface }} + +# 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_services['neutron-metering-agent'].interface_driver }} # Intervals measure_interval = 30