Enable IP forwarding for HAProxy

This is required for multi-rack environments where the nodes are
located on different subnets.

Change-Id: I1f22cfefbc25d4093b4c84f68a863835a23b0149
Closes-Bug: #1604432
This commit is contained in:
Simon Pasquier 2016-07-19 17:02:18 +02:00
parent dc782a9106
commit c60b906c5b
1 changed files with 4 additions and 1 deletions

View File

@ -85,6 +85,9 @@ class { 'haproxy::base':
use_include => true,
}
# IP forwarding needs to be enabled for multi-rack environments
# See https://bugs.launchpad.net/lma-toolchain/+bug/1604432
sysctl::value { 'net.ipv4.ip_forward': value => '1' }
sysctl::value { 'net.ipv4.ip_nonlocal_bind':
value => '1'
}
@ -115,7 +118,7 @@ Service['haproxy']
Package['haproxy'] ~>
Service['haproxy']
Sysctl::Value['net.ipv4.ip_nonlocal_bind'] ~>
Sysctl::Value['net.ipv4.ip_nonlocal_bind', 'net.ipv4.ip_forward'] ~>
Service['haproxy']
# Pacemaker