]> git.proxmox.com Git - ifupdown2.git/blob - debian/patches/pve/0008-lacp-bond-remove-bond-min-links-0-warning.patch
fix patch 0008-lacp: replace else with if condition
[ifupdown2.git] / debian / patches / pve / 0008-lacp-bond-remove-bond-min-links-0-warning.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Alexandre Derumier <aderumier@odiso.com>
3 Date: Tue, 16 May 2023 00:33:36 +0200
4 Subject: [PATCH] lacp bond: remove bond-min-links=0 warning
5
6 This is only cumulus specific
7
8 Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
9 [ML: fixed condition of the remaining `else` branch]
10 Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
11 ---
12 ifupdown2/addons/bond.py | 9 +--------
13 1 file changed, 1 insertion(+), 8 deletions(-)
14
15 diff --git a/ifupdown2/addons/bond.py b/ifupdown2/addons/bond.py
16 index 74d2cab..e18fcbc 100644
17 --- a/ifupdown2/addons/bond.py
18 +++ b/ifupdown2/addons/bond.py
19 @@ -610,14 +610,7 @@ class bond(Addon, moduleBase):
20 # if we need to reset the mode to system default
21 ifla_info_data[Link.IFLA_BOND_MODE] = ifla_bond_mode
22
23 - if ifla_bond_mode == 4: # 802.3ad
24 - min_links = ifla_info_data.get(Link.IFLA_BOND_MIN_LINKS)
25 - if min_links is None:
26 - min_links = self.cache.get_link_info_data_attribute(ifname, Link.IFLA_BOND_MIN_LINKS)
27 - # get_min_links_nl may return None so we need to strictly check 0
28 - if min_links == 0:
29 - self.logger.warning('%s: attribute bond-min-links is set to \'0\'' % ifname)
30 - else:
31 + if ifla_bond_mode != 4:
32 # IFLA_BOND_AD_LACP_RATE and IFLA_BOND_AD_LACP_BYPASS only for 802.3ad mode (4)
33 for nl_attr, attr_name in self._bond_lacp_attrs:
34 if nl_attr in ifla_info_data: