Merge "Fix incorrect application of 'ip' commands for bridges"

This commit is contained in:
Zuul 2018-12-04 17:30:14 +00:00 committed by Gerrit Code Review
commit 3a8348ef79
1 changed files with 7 additions and 7 deletions

View File

@ -1367,20 +1367,20 @@ class IfcfgNetConfig(os_net_config.NetConfig):
for bridge in apply_bridges:
logger.debug('Running ip commands on bridge: %s' %
interface[0])
commands = self.iproute2_apply_commands(interface[0],
interface[1],
interface[2])
bridge[0])
commands = self.iproute2_apply_commands(bridge[0],
bridge[1],
bridge[2])
for command in commands:
try:
args = command.split()
self.execute('Running ip %s' % command, ipcmd, *args)
except Exception as e:
logger.warning("Error in 'ip %s', restarting %s:\n%s" %
(command, interface[0], str(e)))
restart_bridges.append(interface[0])
(command, bridge[0], str(e)))
restart_bridges.append(bridge[0])
restart_interfaces.extend(
self.child_members(interface[0]))
self.child_members(bridge[0]))
break
for interface in apply_routes: