if clag_bond or ifaceobj.link_privflags & ifaceLinkPrivFlags.ES_BOND:
try:
self.netlink.link_set_protodown_on(slave)
+ if clag_bond:
+ self.iproute2.link_set_protodown_reason_clag_on(slave)
+ else:
+ self.iproute2.link_set_protodown_reason_frr_on(slave)
except Exception as e:
self.logger.error('%s: %s' % (ifaceobj.name, str(e)))
for s in runningslaves:
# make sure that slaves are not in protodown since we are not in the clag-bond or es-bond case
if not clag_bond and not ifaceobj.link_privflags & ifaceLinkPrivFlags.ES_BOND and self.cache.get_link_protodown(s):
+ self.iproute2.link_set_protodown_reason_clag_off(s)
self.netlink.link_set_protodown_off(s)
-
if s not in slaves:
self.sysfs.bond_remove_slave(ifaceobj.name, s)
removed_slave.append(s)
if clag_bond:
try:
+ self.iproute2.link_set_protodown_reason_clag_off(s)
self.netlink.link_set_protodown_off(s)
except Exception as e:
self.logger.error('%s: %s' % (ifaceobj.name, str(e)))
def link_add_openvswitch(self, ifname, kind):
self.__update_cache_after_link_creation(ifname, kind)
+ def link_set_protodown_reason_clag_on(self, ifname):
+ utils.exec_command("%s link set dev %s protodown_reason clag on" % (utils.ip_cmd, ifname))
+
+ def link_set_protodown_reason_clag_off(self, ifname):
+ utils.exec_command("%s link set dev %s protodown_reason clag off" % (utils.ip_cmd, ifname))
+
+ def link_set_protodown_reason_frr_on(self, ifname):
+ utils.exec_command("%s link set dev %s protodown_reason frr on" % (utils.ip_cmd, ifname))
+
+ def link_set_protodown_reason_frr_off(self, ifname):
+ utils.exec_command("%s link set dev %s protodown_reason frr off" % (utils.ip_cmd, ifname))
+
############################################################################
# TUNNEL
############################################################################