before the patch we can see that ifreload is displaying an error
with the example config
$ ifquery -a
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto swp1
iface swp1
vrf blue
link-down yes
auto blue
iface blue
vrf-table auto
$ ifreload -a
error: eth0: vrf blue not around, skipping vrf config
$ echo $?
1
$
$ # applying patch
$ ifreload -a
$ echo $?
0
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
master_exists = False
else:
master_exists = False
- if master_exists and not ifaceobj.link_privflags & ifaceLinkPrivFlags.KEEP_LINK_DOWN:
- netlink.link_set_updown(ifacename, "up")
+ if master_exists:
+ if not ifaceobj.link_privflags & ifaceLinkPrivFlags.KEEP_LINK_DOWN:
+ netlink.link_set_updown(ifacename, "up")
else:
self.log_error('vrf %s not around, skipping vrf config'
%(vrfname), ifaceobj)