Use sysctl to enable net.ipv4.ip_forward separately
Use sysctl to enable net.ipv4.ip_forward separately instead of reloading the whole sysctl.conf. Change-Id: Ia334793972a5357edfe29d7dba2d448273a72c75
This commit is contained in:
parent
beae63e184
commit
fdf8795844
|
@ -143,9 +143,12 @@ def install_suppack(himn, username, package, xcp_version):
|
||||||
|
|
||||||
def forward_from_himn(eth):
|
def forward_from_himn(eth):
|
||||||
"""Forward packets from HIMN to storage/mgmt network. """
|
"""Forward packets from HIMN to storage/mgmt network. """
|
||||||
utils.execute('sed', '-i', 's/#net.ipv4.ip_forward/net.ipv4.ip_forward/g',
|
# make change to be persistent
|
||||||
|
utils.execute('sed', '-i',
|
||||||
|
's/.*net\.ipv4\.ip_forward.*=.*/net.ipv4.ip_forward=1/g',
|
||||||
'/etc/sysctl.conf')
|
'/etc/sysctl.conf')
|
||||||
utils.execute('sysctl', '-p', '/etc/sysctl.conf')
|
# make it to take effective now.
|
||||||
|
utils.execute('sysctl', 'net.ipv4.ip_forward=1')
|
||||||
|
|
||||||
endpoint_names = ['br-storage', 'br-mgmt']
|
endpoint_names = ['br-storage', 'br-mgmt']
|
||||||
for endpoint_name in endpoint_names:
|
for endpoint_name in endpoint_names:
|
||||||
|
|
Loading…
Reference in New Issue