summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjianghua wang <jianghua.wang@citrix.com>2017-03-07 18:47:45 +0800
committerjianghua wang <jianghua.wang@citrix.com>2017-03-08 17:37:06 +0800
commitfdf87958447b02d95f0e0d9502a9d64788a74f85 (patch)
tree16abd165e9de5946011a236b2ba3d330990ca00d
parentbeae63e1849d6f5f14d0e77df248a1959d949fd5 (diff)
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
Notes
Notes (review): Verified+1: Citrix XenServer CI Code-Review+2: Huan Xie <huan.xie@citrix.com> Workflow+1: Bob Ball <bob.ball@citrix.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Thu, 09 Mar 2017 10:07:49 +0000 Reviewed-on: https://review.openstack.org/442376 Project: openstack/fuel-plugin-xenserver Branch: refs/heads/master
-rwxr-xr-xplugin_source/deployment_scripts/compute_post_deployment.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugin_source/deployment_scripts/compute_post_deployment.py b/plugin_source/deployment_scripts/compute_post_deployment.py
index 5b59578..92f4125 100755
--- a/plugin_source/deployment_scripts/compute_post_deployment.py
+++ b/plugin_source/deployment_scripts/compute_post_deployment.py
@@ -143,9 +143,12 @@ def install_suppack(himn, username, package, xcp_version):
143 143
144def forward_from_himn(eth): 144def forward_from_himn(eth):
145 """Forward packets from HIMN to storage/mgmt network. """ 145 """Forward packets from HIMN to storage/mgmt network. """
146 utils.execute('sed', '-i', 's/#net.ipv4.ip_forward/net.ipv4.ip_forward/g', 146 # make change to be persistent
147 utils.execute('sed', '-i',
148 's/.*net\.ipv4\.ip_forward.*=.*/net.ipv4.ip_forward=1/g',
147 '/etc/sysctl.conf') 149 '/etc/sysctl.conf')
148 utils.execute('sysctl', '-p', '/etc/sysctl.conf') 150 # make it to take effective now.
151 utils.execute('sysctl', 'net.ipv4.ip_forward=1')
149 152
150 endpoint_names = ['br-storage', 'br-mgmt'] 153 endpoint_names = ['br-storage', 'br-mgmt']
151 for endpoint_name in endpoint_names: 154 for endpoint_name in endpoint_names: