allow configuration of max_vm_flows through salt-formula
the value of max_vm_flows is currently not configurable through
salt-formula-contrail. this allows single instances to fully overload
the compute node with contrail flows, blocking traffic to other
instances on the same compute node. making this setting configurable
allows us to better protect our compute node against this overload of
flows
Change-Id: I5db2f99c94ae27ca8436a193c03bcb0b8b8b84d6
diff --git a/opencontrail/files/2.2/contrail-vrouter-agent.conf b/opencontrail/files/2.2/contrail-vrouter-agent.conf
index 0aa2672..1c306d5 100644
--- a/opencontrail/files/2.2/contrail-vrouter-agent.conf
+++ b/opencontrail/files/2.2/contrail-vrouter-agent.conf
@@ -115,6 +115,9 @@
# Maximum flows allowed per VM (given as % of maximum system flows)
# max_vm_flows=100
+{%- if compute.max_vm_flows is defined %}
+max_vm_flows={{ compute.max_vm_flows }}
+{%- endif %}
# Maximum number of link-local flows allowed across all VMs
# max_system_linklocal_flows=4096
# Maximum number of link-local flows allowed per VM
diff --git a/opencontrail/files/3.0/contrail-vrouter-agent.conf b/opencontrail/files/3.0/contrail-vrouter-agent.conf
index bea2565..9170aee 100644
--- a/opencontrail/files/3.0/contrail-vrouter-agent.conf
+++ b/opencontrail/files/3.0/contrail-vrouter-agent.conf
@@ -161,6 +161,9 @@
# Maximum flows allowed per VM (given as % of maximum system flows)
# max_vm_flows=100
+{%- if compute.max_vm_flows is defined %}
+max_vm_flows={{ compute.max_vm_flows }}
+{%- endif %}
# Maximum number of link-local flows allowed across all VMs
# max_system_linklocal_flows=4096
# Maximum number of link-local flows allowed per VM
diff --git a/opencontrail/files/4.0/contrail-vrouter-agent.conf b/opencontrail/files/4.0/contrail-vrouter-agent.conf
index 3d244cc..7110ce9 100644
--- a/opencontrail/files/4.0/contrail-vrouter-agent.conf
+++ b/opencontrail/files/4.0/contrail-vrouter-agent.conf
@@ -168,6 +168,9 @@
#
# Maximum flows allowed per VM (given as % of maximum system flows)
# max_vm_flows=
+{%- if compute.max_vm_flows is defined %}
+max_vm_flows={{ compute.max_vm_flows }}
+{%- endif %}
# Maximum number of link-local flows allowed across all VMs
# max_system_linklocal_flows=4096