From fbb0dedb10e8cc81fbb378cb206b4151f6300a69 Mon Sep 17 00:00:00 2001
From: shaofeng_cheng <chengsf@winhong.com>
Date: Sat, 1 Apr 2017 14:33:54 +0800
Subject: [PATCH] Fix qos rules are not applied on ocata with ovs

If the Open vSwitch agent is being used, set extensions to qos
in the [agent] section of ml2_conf.ini.
see
https://docs.openstack.org/ocata/networking-guide/config-qos.html

Change-Id: I85272b03222775b14a311a110077a8eed736f56c
Closes-Bug: #1676319
---
 ansible/roles/neutron/templates/ml2_conf.ini.j2 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ansible/roles/neutron/templates/ml2_conf.ini.j2 b/ansible/roles/neutron/templates/ml2_conf.ini.j2
index 6ece2a72b0..e88d963e6f 100644
--- a/ansible/roles/neutron/templates/ml2_conf.ini.j2
+++ b/ansible/roles/neutron/templates/ml2_conf.ini.j2
@@ -54,6 +54,10 @@ arp_responder = true
 enable_distributed_routing = True
 {% endif %}
 
+{% if enable_neutron_qos | bool %}
+extensions = qos
+{% endif %}
+
 [ovs]
 bridge_mappings = {% for bridge in neutron_bridge_name.split(',') %}physnet{{ loop.index0 + 1 }}:{{ bridge }}{% if not loop.last %},{% endif %}{% endfor %}
 
@@ -65,7 +69,6 @@ integration_bridge = br-int-{{ item }}
 [linux_bridge]
 physical_interface_mappings = physnet1:{{ neutron_external_interface }}
 
-
 [vxlan]
 l2_population = true
 {% endif %}