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

addons: vrf: bring up master on first slave ifup if WITH_DEPENDS is set

Ticket: CM-12988
Reviewed By: julien, nikhil
Testing Done: Tested ifdown and ifup of vrf device with --with-depends

This patch fixes transient errors like below on vrf slaves when
vrf device is being brought up with --with-depends:
"error: swp1: vrf vrf1 not around, skipping vrf config
error: br100: vrf vrf1 not around, skipping vrf config
error: br101: vrf vrf1 not around, skipping vrf config"

In this patch, the vrf device is brought up on bringing
up of the first vrf slave. This is also done in the normal
ifreload -a case.

history on --with-depends for vrf: On vrf device down,
a bunch of slave state gets cleaned up.
and today, ifup of vrf device alone does not fix all that state
especially when there are vrr (macvlan) interfaces involved.
One has to use --with-depends. This is now also part of documentation
https://tickets.cumulusnetworks.com/browse/UD-851

$ifdown vrf1

$ifup vrf1 --with-depends

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This commit is contained in:
Roopa Prabhu
2016-11-30 13:06:36 -08:00
parent 5e26386921
commit 1ce8b5bb82

View File

@@ -407,6 +407,7 @@ class vrf(moduleBase):
%vrfname)
return
if (ifupdownflags.flags.ALL or
ifupdownflags.flags.WITH_DEPENDS or
(ifupdownflags.flags.CLASS and
ifaceobj.classes and vrf_master_objs[0].classes and
Set(ifaceobj.classes).intersection(vrf_master_objs[0].classes))):