From a114efa00c114351654e8598a881ab7b3a364db4 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Thu, 17 Aug 2017 09:38:50 -0500 Subject: [PATCH] Ensure QoS extension is enabled This patch ensures that the linuxbridge/sriov agent files will have the QoS extension enabled if the deployer has enabled it. Closes-Bug: 1677632 Change-Id: I32edf772267e0a6e92a86979ceb4d24973750a73 --- templates/plugins/ml2/linuxbridge_agent.ini.j2 | 16 ++++++++++++++-- templates/plugins/ml2/sriov_nic_agent.ini.j2 | 7 ++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/templates/plugins/ml2/linuxbridge_agent.ini.j2 b/templates/plugins/ml2/linuxbridge_agent.ini.j2 index 822d5d38..012ba58c 100644 --- a/templates/plugins/ml2/linuxbridge_agent.ini.j2 +++ b/templates/plugins/ml2/linuxbridge_agent.ini.j2 @@ -25,15 +25,27 @@ enable_vxlan = False # Agent [agent] -{% if 'ml2.sriov' in neutron_plugin_types and 'nova_compute' in group_names %} -extensions = fdb +{# If we're deploying this template to a hypervisor, we should make a list #} +{# of extensions that need to be enabled in the agent. #} +{% if 'nova_compute' in group_names %} +{% set _extensions = [] %} +{% if 'ml2.sriov' in neutron_plugin_types %} +{% set _ = _extensions.append['fdb'] %} +{% endif %} +{% if 'qos' in neutron_plugin_base %} +{% set _ = _extensions.append['qos'] %} +{% endif %} +extensions = {{ _extensions | join(',') }} +{% if 'ml2.sriov' in neutron_plugin_types %} # If an interface is shared between sriov ports and normal ports, it must be defined here # to allow traffic between the two ports on the same host [FDB] shared_physical_device_mappings = {{ neutron_provider_networks.network_sriov_mappings }} {% endif %} +{% endif %} + # Security groups [securitygroup] firewall_driver = {{ neutron_plugins[neutron_plugin_type].driver_firewall }} diff --git a/templates/plugins/ml2/sriov_nic_agent.ini.j2 b/templates/plugins/ml2/sriov_nic_agent.ini.j2 index 285eb2a1..030f3fd1 100644 --- a/templates/plugins/ml2/sriov_nic_agent.ini.j2 +++ b/templates/plugins/ml2/sriov_nic_agent.ini.j2 @@ -1,9 +1,14 @@ # {{ ansible_managed }} +# Agent +[agent] +{% if 'qos' in neutron_plugin_base %} +extensions = qos +{% endif %} + [securitygroup] firewall_driver = neutron.agent.firewall.NoopFirewallDriver [sriov_nic] physical_device_mappings = "{{ neutron_provider_networks.network_sriov_mappings }}" exclude_devices = "{{ neutron_sriov_excluded_devices }}" -