Do not set net.ipv4.tcp_tw_recycle from 4.12
Linux kernel 4.12 removed this parameter. Set this parameter only
for kernel versions < 4.12.
PROD-19331
Change-Id: I8f7ba5662e337168eaf9fc146c5b983612074cb9
diff --git a/opencontrail/common.sls b/opencontrail/common.sls
index b3ae6a7..e2f6608 100644
--- a/opencontrail/common.sls
+++ b/opencontrail/common.sls
@@ -42,9 +42,14 @@
sysctl.present:
- value: 1
+{% if salt['pkg.version_cmp'](grains['kernelrelease'], '4.12') < 0 %}
+# This param is missing from kernel version 4.12
+# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4396e46187ca5070219b81773c4e65088dac50cc
+# TODO: Remove this for Ubuntu Bionic (4.15 is the default kernel)
net.ipv4.tcp_tw_recycle:
sysctl.present:
- value: 1
+{% endif %}
net.ipv4.tcp_tw_reuse:
sysctl.present: