1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

bring up bridge ports only after vlan config is done

Ticket:
Reviewed By: wkok
Testing Done: unit testing + testing by wkok/purna
This commit is contained in:
Roopa Prabhu
2014-12-12 23:45:31 -08:00
parent 2261e862c2
commit 75cf99baa1
2 changed files with 3 additions and 4 deletions

View File

@@ -277,7 +277,6 @@ class bridge(moduleBase):
def _add_ports(self, ifaceobj):
bridgeports = self._get_bridge_port_list(ifaceobj)
runningbridgeports = []
newbridgeports = []
self.ipcmd.batch_start()
self._process_bridge_waitport(ifaceobj, bridgeports)
@@ -306,11 +305,9 @@ class bridge(moduleBase):
self.write_file('/proc/sys/net/ipv6/conf/%s' %bridgeport +
'/disable_ipv6', '1')
self.ipcmd.addr_flush(bridgeport)
newbridgeports.append(bridgeport)
except Exception, e:
self.logger.error(str(e))
pass
[self.ipcmd.link_set(p, 'up') for p in newbridgeports]
self.ipcmd.batch_commit()
if err:
self.log_error('bridge configuration failed (missing ports)')
@@ -812,6 +809,8 @@ class bridge(moduleBase):
except Exception, e:
self.log_error(str(e))
finally:
running_ports = self.brctlcmd.get_bridge_ports(ifaceobj.name)
[rtnetlink_api.rtnl_api.link_set(p, "up") for p in running_ports]
if link_exists and ifaceobj.addr_method == 'manual':
rtnetlink_api.rtnl_api.link_set(ifaceobj.name, "up")
if porterr: