import libteam-1.31-14.el9

This commit is contained in:
CentOS Sources 2022-11-15 01:57:25 -05:00 committed by Stepan Oksanichenko
parent 747f3b9788
commit d2370e600f
3 changed files with 118 additions and 1 deletions

View File

@ -0,0 +1,27 @@
From 5616af4387302e9e6ec07dd5466f4a0e93c50a59 Mon Sep 17 00:00:00 2001
From: Hangbin Liu <haliu@redhat.com>
Date: Mon, 7 Mar 2022 14:39:25 +0800
Subject: [PATCH 6/6] utils/team2bond: do not add miimon if already exist
Signed-off-by: Hangbin Liu <haliu@redhat.com>
---
utils/team2bond | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/utils/team2bond b/utils/team2bond
index 118f38b..b5555c1 100755
--- a/utils/team2bond
+++ b/utils/team2bond
@@ -117,7 +117,8 @@ def convert_link_watch(link_watch_opts, arp_target, exist_opts):
sys.exit(1)
if link_watch_opts['name'] == 'ethtool':
- bond_opts += ",miimon=100"
+ if exist_opts.find("miimon") == -1:
+ bond_opts += ",miimon=100"
if 'delay_up' in link_watch_opts:
bond_opts += ",updelay=" + str(link_watch_opts['delay_up'])
if 'delay_down' in link_watch_opts:
--
2.31.1

View File

@ -0,0 +1,79 @@
From de84fb3debdf55080bafbf015d76989c17276d01 Mon Sep 17 00:00:00 2001
From: Hangbin Liu <haliu@redhat.com>
Date: Mon, 16 May 2022 15:40:35 +0800
Subject: [PATCH 7/1] utils/team2bond: do not add updelay/downdelay if already exist
Also check if miimon/arp_interval already set.
Signed-off-by: Hangbin Liu <haliu@redhat.com>
---
utils/team2bond | 32 +++++++++++++++++++++++++-------
1 file changed, 25 insertions(+), 7 deletions(-)
diff --git a/utils/team2bond b/utils/team2bond
index b5555c1..111b83b 100755
--- a/utils/team2bond
+++ b/utils/team2bond
@@ -117,34 +117,52 @@ def convert_link_watch(link_watch_opts, arp_target, exist_opts):
sys.exit(1)
if link_watch_opts['name'] == 'ethtool':
- if exist_opts.find("miimon") == -1:
+ if exist_opts.find("arp_interval") >= 0:
+ print("# Warn: detecte miimon(ethtool) setting, but arp_interval(arp_ping) already set, will ignore.")
+ return bond_opts
+
+ if exist_opts.find("miimon") >= 0:
+ print("# Warn: duplicated miimon detected, bonding supports only one.")
+ else:
bond_opts += ",miimon=100"
+
if 'delay_up' in link_watch_opts:
- bond_opts += ",updelay=" + str(link_watch_opts['delay_up'])
+ if exist_opts.find('updelay') >= 0:
+ print("# Warn: duplicated updelay detected, bonding supports only one.")
+ else:
+ bond_opts += ",updelay=" + str(link_watch_opts['delay_up'])
if 'delay_down' in link_watch_opts:
- bond_opts += ",downdelay=" + str(link_watch_opts['delay_down'])
+ if exist_opts.find('downdelay') >= 0:
+ print("# Warn: duplicated downdelay detected, bonding supports only one.")
+ else:
+ bond_opts += ",downdelay=" + str(link_watch_opts['delay_down'])
elif link_watch_opts['name'] == 'arp_ping':
+ if exist_opts.find("miimon") >= 0:
+ print("# Warn: detecte arp_interval(arp_ping) setting, but miimon(ethtool) already set, will ignore.")
+ return bond_opts
+
if 'interval' in link_watch_opts:
- if exist_opts.find('arp_interval') > 0:
+ if exist_opts.find('arp_interval') >= 0:
print("# Warn: duplicated arp_interval detected, bonding supports only one.")
else:
bond_opts += ",arp_interval=" + str(link_watch_opts['interval'])
+
if 'target_host' in link_watch_opts:
arp_target.append(link_watch_opts['target_host'])
if 'validate_active' in link_watch_opts and link_watch_opts['validate_active'] and \
'validate_inactive' in link_watch_opts and link_watch_opts['validate_inactive']:
- if exist_opts.find('arp_validate') > 0:
+ if exist_opts.find('arp_validate') >= 0:
print("# Warn: duplicated arp_validate detected, bonding supports only one.")
else:
bond_opts += ",arp_validate=all"
elif 'validate_active' in link_watch_opts and link_watch_opts['validate_active']:
- if exist_opts.find('arp_validate') > 0:
+ if exist_opts.find('arp_validate') >= 0:
print("# Warn: duplicated arp_validate detected, bonding supports only one.")
else:
bond_opts += ",arp_validate=active"
elif 'validate_inactive' in link_watch_opts and link_watch_opts['validate_inactive']:
- if exist_opts.find('arp_validate') > 0:
+ if exist_opts.find('arp_validate') >= 0:
print("# Warn: duplicated arp_validate detected, bonding supports only one.")
else:
bond_opts += ",arp_validate=backup"
--
2.35.1

View File

@ -1,6 +1,6 @@
Name: libteam
Version: 1.31
Release: 11%{?dist}
Release: 14%{?dist}
Summary: Library for controlling team network device
License: LGPLv2+
URL: http://www.libteam.org
@ -11,6 +11,8 @@ Patch2: 0002-team2bond-fix-min_ports-format-and-add-lacp_key.patch
Patch3: 0003-utils-team2bond-add-cautions-for-the-script.patch
Patch4: 0004-man-add-team2bond-man-doc.patch
Patch5: 0005-Revert-teamd-Disregard-current-state-when-considerin.patch
Patch6: 0006-utils-team2bond-do-not-add-miimon-if-already-exist.patch
Patch7: 0007-utils-team2bond-do-not-add-updelay-downdelay-if-alre.patch
BuildRequires: gcc
BuildRequires: jansson-devel
@ -143,6 +145,15 @@ install -p -m 755 utils/team2bond $RPM_BUILD_ROOT%{_bindir}/team2bond
%{_sysconfdir}/sysconfig/network-scripts/ifdown-TeamPort
%changelog
* Mon Jun 13 2022 Long Xin <lxin@redhat.com> - 1.31-14
- Rebuilt with a new version to pass the fixed gating test (rhbz#2060445)
* Mon May 16 2022 Hangbin Liu <haliu@redhat.com> - 1.31-13
- utils/team2bond: do not add updelay/downdelay if already exist (rhbz#2060445)
* Mon Mar 7 2022 Hangbin Liu <haliu@redhat.com> - 1.31-12
- utils/team2bond: do not add miimon if already exist (rhbz#2060445)
* Mon Nov 15 2021 Xin Long <lxin@redhat.com> - 1.31-11
- Revert "teamd: Disregard current state when considering port enablement" [1894546]