mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
Move stale slave delete to after the adds are done
Testing Done: Tested with sample config in the bug (cherry picked from commit e90149a1e8ea3bc94e07fb080361e6909b12e81b)
This commit is contained in:
committed by
Sam Tannous
parent
7f34884ccb
commit
bbdf8d1da5
@@ -219,10 +219,6 @@ class ifenslave(moduleBase):
|
||||
|
||||
if not self.PERFMODE:
|
||||
runningslaves = self.ifenslavecmd.get_slaves(ifaceobj.name);
|
||||
if runningslaves:
|
||||
# Delete active slaves not in the new slave list
|
||||
[ self.ifenslavecmd.remove_slave(ifaceobj.name, s)
|
||||
for s in runningslaves if s not in slaves ]
|
||||
|
||||
for slave in Set(slaves).difference(Set(runningslaves)):
|
||||
if not self.PERFMODE and not self.ipcmd.link_exists(slave):
|
||||
@@ -242,6 +238,11 @@ class ifenslave(moduleBase):
|
||||
%(ifaceobj.name, slave, str(e)))
|
||||
pass
|
||||
|
||||
if runningslaves:
|
||||
# Delete active slaves not in the new slave list
|
||||
[ self.ifenslavecmd.remove_slave(ifaceobj.name, s)
|
||||
for s in runningslaves if s not in slaves ]
|
||||
|
||||
def _set_clag_enable(self, ifaceobj):
|
||||
attrval = ifaceobj.get_attr_value_first('clag-id')
|
||||
attrval = attrval if attrval else '0'
|
||||
|
||||
Reference in New Issue
Block a user