From 2a6cba8e6f6c609676a713e496ffd6f44264525d Mon Sep 17 00:00:00 2001 From: "Erlon R. Cruz" Date: Tue, 3 Aug 2021 15:17:52 -0300 Subject: [PATCH] Fix QoS selection for SRIOV environments When QoS is set in the neutron-api charm, the neutron-openvswitch charm needs to add 'extensions = qos' to the sriov_agent.ini file. Closes-bug: #1938277 Change-Id: I44fbf5991d2606161b1bcbc064d4bc68a2fbbb5b --- hooks/neutron_ovs_utils.py | 3 ++- templates/kilo/sriov_agent.ini | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/hooks/neutron_ovs_utils.py b/hooks/neutron_ovs_utils.py index 4ec7de52..ee0eb5c2 100644 --- a/hooks/neutron_ovs_utils.py +++ b/hooks/neutron_ovs_utils.py @@ -246,7 +246,8 @@ DPDK_RESOURCE_MAP = OrderedDict([ SRIOV_RESOURCE_MAP = OrderedDict([ (NEUTRON_SRIOV_AGENT_CONF, { 'services': ['neutron-sriov-agent'], - 'contexts': [neutron_ovs_context.OVSPluginContext()], + 'contexts': [neutron_ovs_context.OVSPluginContext(), + context.NeutronAPIContext()], }), ]) diff --git a/templates/kilo/sriov_agent.ini b/templates/kilo/sriov_agent.ini index 0187e30a..6d807892 100644 --- a/templates/kilo/sriov_agent.ini +++ b/templates/kilo/sriov_agent.ini @@ -9,3 +9,8 @@ firewall_driver = neutron.agent.firewall.NoopFirewallDriver [sriov_nic] physical_device_mappings = {{ sriov_device_mappings }} exclude_devices = + +{% if enable_sriov and enable_qos -%} +[agent] +extensions = qos +{% endif -%}