Skip failure on setting inactive interface as bond's primary
The ovs command to set the primary interface of the bond fails when the interface is not active. This patch ignores the error and proceeds with the remaining configuration. Change-Id: I3592af4f357dca483fc7914133e1fc248d12f11a
This commit is contained in:
parent
fb4138fcae
commit
b4779a6b28
@ -367,7 +367,7 @@ class NetConfig(object):
|
||||
self.execute(msg, '/sbin/ip',
|
||||
'link', 'set', 'dev', newname, 'up')
|
||||
|
||||
def ovs_appctl(self, action, *parameters):
|
||||
def ovs_appctl(self, action, *parameters, ignore_err=False):
|
||||
"""Run 'ovs-appctl' with the specified action
|
||||
|
||||
Its possible the command may fail due to timing if, for example,
|
||||
@ -383,4 +383,5 @@ class NetConfig(object):
|
||||
self.execute(msg, '/bin/ovs-appctl', action, *parameters,
|
||||
delay_on_retry=True, attempts=5)
|
||||
except processutils.ProcessExecutionError as e:
|
||||
self.errors.append(e)
|
||||
if not ignore_err:
|
||||
self.errors.append(e)
|
||||
|
@ -1963,7 +1963,8 @@ class IfcfgNetConfig(os_net_config.NetConfig):
|
||||
|
||||
for bond in self.bond_primary_ifaces:
|
||||
self.ovs_appctl('bond/set-active-slave', bond,
|
||||
self.bond_primary_ifaces[bond])
|
||||
self.bond_primary_ifaces[bond],
|
||||
ignore_err=True)
|
||||
|
||||
if ivs_uplinks or ivs_interfaces:
|
||||
logger.info("Attach to ivs with "
|
||||
|
Loading…
Reference in New Issue
Block a user