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

addons: vrf: change warn to error if vrf master is not configured

Ticket: CM-12360
Reviewed By: julien, nikhil
Testing Done: tested vrf slaves without master

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This commit is contained in:
Roopa Prabhu
2016-08-11 16:20:16 -07:00
parent d0c2cf6c1d
commit 80be09bac1

View File

@@ -374,8 +374,13 @@ class vrf(moduleBase):
elif ifaceobj:
vrf_master_objs = ifaceobj_getfunc(vrfname)
if not vrf_master_objs:
self.logger.warn('%s: vrf master ifaceobj not found'
%ifacename)
# this is the case where vrf is assigned to an interface
# but user has not provided a vrf interface.
# people expect you to warn them but go ahead with the
# rest of the config on that interface
netlink.link_set_updown(ifacename, "up")
self.log_error('vrf master ifaceobj %s not found'
%vrfname)
return
if (ifupdownflags.flags.ALL or
(ifupdownflags.flags.CLASS and