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
This commit is contained in:
Yolanda Robla Mota 2016-09-09 17:12:42 +02:00
parent c3baf51bea
commit a5f2db712a
1 changed files with 2 additions and 8 deletions

View File

@ -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