Merge "Re-order service plugins in neutron server config"
diff --git a/.kitchen.yml b/.kitchen.yml
index 39f401f..47966af 100644
--- a/.kitchen.yml
+++ b/.kitchen.yml
@@ -18,12 +18,15 @@
     - name: linux
       repo: git
       source: https://gerrit.mcp.mirantis.com/salt-formulas/linux
+      branch: <%=ENV['GERRIT_BRANCH'] || 'master' %>
     - name: keystone
       repo: git
       source: https://gerrit.mcp.mirantis.com/salt-formulas/keystone
+      branch: <%=ENV['GERRIT_BRANCH'] || 'master' %>
     - name: oslo_templates
       repo: git
       source: https://gerrit.mcp.mirantis.com/salt-formulas/oslo-templates
+      branch: <%=ENV['GERRIT_BRANCH'] || 'master' %>
   state_top:
     base:
       "*":
diff --git a/README.rst b/README.rst
index 657ca3e..3aa133d 100644
--- a/README.rst
+++ b/README.rst
@@ -1487,6 +1487,22 @@
     neutron:
       max_allowed_address_pair: 20
 
+Increase OVS timeouts for loaded nodes
+--------------------------------------
+
+Network node:
+
+.. code-block:: yaml
+
+    neutron:
+      gateway:
+        of_connect_timeout: 60
+        of_request_timeout: 30
+        ovs_vsctl_timeout: 30  # Pike
+        ovsdb_timeout: 30  # Queens and beyond
+        bridge_mac_table_size: 100000
+
+
 Enhanced logging with logging.conf
 ----------------------------------
 
diff --git a/neutron/files/pike/openvswitch_agent.ini b/neutron/files/pike/openvswitch_agent.ini
index 624101b..5c3545c 100644
--- a/neutron/files/pike/openvswitch_agent.ini
+++ b/neutron/files/pike/openvswitch_agent.ini
@@ -115,6 +115,24 @@
 # Enables or disables fatal status of deprecations. (boolean value)
 #fatal_deprecations = false
 
+# Timeout in seconds for ovs-vsctl commands.
+# If the timeout expires, ovs commands will fail with
+# ALARMCLOCK error.
+#ovs_vsctl_timeout = 10
+{%- if neutron.ovs_vsctl_timeout is defined %}
+ovs_vsctl_timeout = {{ neutron.ovs_vsctl_timeout }}
+{%- endif %}
+
+# The maximum number of MAC addresses to learn on
+# a bridge managed by the Neutron OVS agent. Values
+# outside a reasonable range (10 to 1,000,000) might be
+# overridden by Open vSwitch according to the
+# documentation.
+#bridge_mac_table_size = 50000
+{%- if neutron.bridge_mac_table_size is defined %}
+bridge_mac_table_size = {{ neutron.bridge_mac_table_size }}
+{%- endif %}
+
 
 [agent]
 
@@ -304,10 +322,16 @@
 # Timeout in seconds to wait for the local switch connecting the controller.
 # Used only for 'native' driver. (integer value)
 #of_connect_timeout = 30
+{%- if neutron.of_connect_timeout is defined %}
+of_connect_timeout = {{ neutron.of_connect_timeout }}
+{%- endif %}
 
 # Timeout in seconds to wait for a single OpenFlow request. Used only for
 # 'native' driver. (integer value)
 #of_request_timeout = 10
+{%- if neutron.of_request_timeout is defined %}
+of_request_timeout = {{ neutron.of_request_timeout }}
+{%- endif %}
 
 # The interface for interacting with the OVSDB (string value)
 # Allowed values: vsctl, native
diff --git a/neutron/files/queens/openvswitch_agent.ini b/neutron/files/queens/openvswitch_agent.ini
index 6b1d41c..39a07cb 100644
--- a/neutron/files/queens/openvswitch_agent.ini
+++ b/neutron/files/queens/openvswitch_agent.ini
@@ -207,10 +207,16 @@
 # Timeout in seconds to wait for the local switch connecting the controller.
 # Used only for 'native' driver. (integer value)
 #of_connect_timeout = 30
+{%- if neutron.of_connect_timeout is defined %}
+of_connect_timeout = {{ neutron.of_connect_timeout }}
+{%- endif %}
 
 # Timeout in seconds to wait for a single OpenFlow request. Used only for
 # 'native' driver. (integer value)
 #of_request_timeout = 10
+{%- if neutron.of_request_timeout is defined %}
+of_request_timeout = {{ neutron.of_request_timeout }}
+{%- endif %}
 
 # DEPRECATED: The interface for interacting with the OVSDB (string value)
 # Possible values:
@@ -238,6 +244,24 @@
 # value)
 #ssl_ca_cert_file = <None>
 
+# Timeout in seconds for ovsdb commands.
+# If the timeout expires, ovsdb commands will fail with
+# ALARMCLOCK error.
+#ovsdb_timeout = 10
+{%- if neutron.ovsdb_timeout is defined %}
+ovsdb_timeout = {{ neutron.ovsdb_timeout }}
+{%- endif %}
+
+# The maximum number of MAC addresses to learn on
+# a bridge managed by the Neutron OVS agent. Values
+# outside a reasonable range (10 to 1,000,000) might be
+# overridden by Open vSwitch according to the
+# documentation.
+#bridge_mac_table_size = 50000
+{%- if neutron.bridge_mac_table_size is defined %}
+bridge_mac_table_size = {{ neutron.bridge_mac_table_size }}
+{%- endif %}
+
 
 [securitygroup]
 
diff --git a/neutron/files/rocky/openvswitch_agent.ini b/neutron/files/rocky/openvswitch_agent.ini
index 5330ff0..47a199e 100644
--- a/neutron/files/rocky/openvswitch_agent.ini
+++ b/neutron/files/rocky/openvswitch_agent.ini
@@ -208,10 +208,16 @@
 # Timeout in seconds to wait for the local switch connecting the controller.
 # Used only for 'native' driver. (integer value)
 #of_connect_timeout = 30
+{%- if neutron.of_connect_timeout is defined %}
+of_connect_timeout = {{ neutron.of_connect_timeout }}
+{%- endif %}
 
 # Timeout in seconds to wait for a single OpenFlow request. Used only for
 # 'native' driver. (integer value)
 #of_request_timeout = 10
+{%- if neutron.of_request_timeout is defined %}
+of_request_timeout = {{ neutron.of_request_timeout }}
+{%- endif %}
 
 # DEPRECATED: The interface for interacting with the OVSDB (string value)
 # Possible values:
@@ -242,6 +248,24 @@
 # Enable OVSDB debug logs (boolean value)
 #ovsdb_debug = false
 
+# Timeout in seconds for ovsdb commands.
+# If the timeout expires, ovsdb commands will fail with
+# ALARMCLOCK error.
+#ovsdb_timeout = 10
+{%- if neutron.ovsdb_timeout is defined %}
+ovsdb_timeout = {{ neutron.ovsdb_timeout }}
+{%- endif %}
+
+# The maximum number of MAC addresses to learn on
+# a bridge managed by the Neutron OVS agent. Values
+# outside a reasonable range (10 to 1,000,000) might be
+# overridden by Open vSwitch according to the
+# documentation.
+#bridge_mac_table_size = 50000
+{%- if neutron.bridge_mac_table_size is defined %}
+bridge_mac_table_size = {{ neutron.bridge_mac_table_size }}
+{%- endif %}
+
 
 [securitygroup]