commit 7e31f2ae41b4512afd2b3dd4fb72fcd16ef0a373 Author: Rodolfo Alonso Hernandez Date: Wed Oct 7 10:20:20 2020 +0000 Do not load "qos-fip" if "qos" plugin is not loaded If QoS service plugin is not loaded, the L3 QoS extension in the OVN L3 plugin should not be loaded neither. Prior to this patch, the extension drivers were checked to find the QoS extension. Although it is a misconfiguration to have the QoS extension without loading the QoS driver, that is handled correctly by the Neutron server, disabling the extension silently. Closes-Bug: #1898842 Related-Bug: #1877408 Change-Id: Iea5ff76fe652ab1c04e23850b9259547c1d54365 diff --git a/neutron/services/ovn_l3/plugin.py b/neutron/services/ovn_l3/plugin.py index cc38f1d..942b0e6 100644 --- a/neutron/services/ovn_l3/plugin.py +++ b/neutron/services/ovn_l3/plugin.py @@ -20,7 +20,6 @@ from neutron.quota import resource_registry from neutron_lib.api.definitions import external_net from neutron_lib.api.definitions import portbindings from neutron_lib.api.definitions import provider_net as pnet -from neutron_lib.api.definitions import qos as qos_api from neutron_lib.callbacks import events from neutron_lib.callbacks import registry from neutron_lib.callbacks import resources @@ -31,7 +30,6 @@ from neutron_lib.exceptions import availability_zone as az_exc from neutron_lib.plugins import constants as plugin_constants from neutron_lib.plugins import directory from neutron_lib.services import base as service_base -from oslo_config import cfg from oslo_log import log from oslo_utils import excutils @@ -96,8 +94,9 @@ class OVNL3RouterPlugin(service_base.ServicePluginBase, @staticmethod def disable_qos_fip_extension_by_extension_drivers(aliases): - if (qos_api.ALIAS not in cfg.CONF.ml2.extension_drivers and - qos_fip_api.FIP_QOS_ALIAS in aliases): + qos_service_plugin = directory.get_plugin(plugin_constants.QOS) + qos_aliases = qos_fip_api.FIP_QOS_ALIAS in aliases + if not qos_service_plugin and qos_aliases: aliases.remove(qos_fip_api.FIP_QOS_ALIAS) @property