From a5f2db712a84f5e2996c6635e442523bacffe81f Mon Sep 17 00:00:00 2001 From: Yolanda Robla Mota Date: Fri, 9 Sep 2016 17:12:42 +0200 Subject: [PATCH] Restart service properly on RHEL case Per documentation on RHEL side, the proper way to activate the bridge, is full restarting the network service. Change-Id: I61564b3c39b169f9de13dd2297210a2348f448e2 --- .../infra-cloud-bridge/static/opt/create_bridge.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/files/elements/infra-cloud-bridge/static/opt/create_bridge.py b/files/elements/infra-cloud-bridge/static/opt/create_bridge.py index 7e65912..4f4b7fa 100755 --- a/files/elements/infra-cloud-bridge/static/opt/create_bridge.py +++ b/files/elements/infra-cloud-bridge/static/opt/create_bridge.py @@ -134,14 +134,8 @@ DNS={nameservers} with open(bridge_file, 'w') as target_file: target_file.write(bridge_file_content) - # turn down pre-existing interface and start the bridge - # because at this point, glean has already configured - # previous interface that needs to be overriden. - # This will only happen at first time that the bridge - # is configured, because on reboots, we won't reach this - # configure_bridge method - subprocess.call(['ifdown', interface_name]) - subprocess.call(['ifup', bridge_name]) + # restart networking to properly pick interfaces + subprocess.call(['service', 'network', 'restart']) # mock object to interact with glean