diff --git a/SOURCES/libteam-utils-bond2team-keep-delivering-config-to-file-if-st.patch b/SOURCES/libteam-utils-bond2team-keep-delivering-config-to-file-if-st.patch new file mode 100644 index 0000000..7c8c8e2 --- /dev/null +++ b/SOURCES/libteam-utils-bond2team-keep-delivering-config-to-file-if-st.patch @@ -0,0 +1,49 @@ +From 7000b5bcb22e8192bbc6d9ceddba740541c68484 Mon Sep 17 00:00:00 2001 +Message-Id: <7000b5bcb22e8192bbc6d9ceddba740541c68484.1596613046.git.lucien.xin@gmail.com> +From: Hangbin Liu +Date: Mon, 20 Jul 2020 16:52:56 +0800 +Subject: [PATCH 1/2] utils/bond2team: keep delivering config to file if stdout + not supplied + +When --stdout not supplied, we should keep on delivering the config file +instead of return. + +Before the fix: +$ bond2team --configdir ./bonding/ --master bond0 --rename team0 +$ bond2team --configdir bonding/ --outputdir teaming/ --master bond0 --rename team0 +$ ls teaming/ + +After the fix: +$ bond2team --configdir ./bonding/ --master bond0 --rename team0 +Resulted files: +/tmp/bond2team.nV4eX3/ifcfg-team0 +/tmp/bond2team.nV4eX3/ifcfg-eth1 +/tmp/bond2team.nV4eX3/ifcfg-eth2 + +$ bond2team --configdir bonding/ --outputdir teaming/ --master bond0 --rename team0 +$ ls teaming/ +ifcfg-eth1 ifcfg-eth2 ifcfg-team0 + +Fixes: d5a1c8ee9e36 ("utils: add bond2team conversion tool") +Signed-off-by: Hangbin Liu +Signed-off-by: Jiri Pirko +--- + utils/bond2team | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/utils/bond2team b/utils/bond2team +index fc81c4b..28733da 100755 +--- a/utils/bond2team ++++ b/utils/bond2team +@@ -623,7 +623,7 @@ team_ifcfg_write() + team_ifcfg_deliver() + { + pr_dbg "${FUNCNAME} $*" +- if ! to_stdout; then ++ if to_stdout; then + return 0 + fi + +-- +2.18.1 + diff --git a/SOURCES/libteam-utils-bond2team-remove-TYPE-in-ifcfg-file.patch b/SOURCES/libteam-utils-bond2team-remove-TYPE-in-ifcfg-file.patch new file mode 100644 index 0000000..3ec215c --- /dev/null +++ b/SOURCES/libteam-utils-bond2team-remove-TYPE-in-ifcfg-file.patch @@ -0,0 +1,51 @@ +From 2e3313561394662b3a379594aa2c6b546419230f Mon Sep 17 00:00:00 2001 +Message-Id: <2e3313561394662b3a379594aa2c6b546419230f.1596613046.git.lucien.xin@gmail.com> +In-Reply-To: <7000b5bcb22e8192bbc6d9ceddba740541c68484.1596613046.git.lucien.xin@gmail.com> +References: <7000b5bcb22e8192bbc6d9ceddba740541c68484.1596613046.git.lucien.xin@gmail.com> +From: Hangbin Liu +Date: Mon, 20 Jul 2020 16:53:21 +0800 +Subject: [PATCH 2/2] utils/bond2team: remove TYPE in ifcfg file + +When convert Bond config to Team, TYPE is used for Bond and DEVICETYPE +is used for Team. So we should remove TYPE keyword in ifcfg file. + +Before the fix: +$ ls bonding/ +ifcfg-bond0 ifcfg-bond0-eth1 ifcfg-bond0-eth2 +$ bond2team --configdir bonding/ --master bond0 --rename team0 --stdout | grep TYPE +TYPE=Bond +DEVICETYPE="Team" +TYPE=Ethernet +DEVICETYPE="TeamPort" +TYPE=Ethernet +DEVICETYPE="TeamPort" + +Afther the fix: +$ bond2team --configdir bonding/ --master bond0 --rename team0 --stdout | grep TYPE +DEVICETYPE="Team" +DEVICETYPE="TeamPort" +DEVICETYPE="TeamPort" + +Fixes: d5a1c8ee9e36 ("utils: add bond2team conversion tool") +Signed-off-by: Hangbin Liu +Signed-off-by: Jiri Pirko +--- + utils/bond2team | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/utils/bond2team b/utils/bond2team +index 28733da..2aae3f5 100755 +--- a/utils/bond2team ++++ b/utils/bond2team +@@ -331,7 +331,7 @@ vfile_load_ifcfg() + oIFS="$IFS" + IFS=$'\n' + VFILE=( $(LANG=C \ +- grep -iv 'BONDING_OPTS\|SLAVE\|MASTER\|DEVICETYPE\|TEAM' \ ++ grep -iv 'BONDING_OPTS\|SLAVE\|MASTER\|TYPE\|DEVICETYPE\|TEAM' \ + $ifcfg )) + IFS="$oIFS" + } +-- +2.18.1 + diff --git a/SPECS/libteam.spec b/SPECS/libteam.spec index 97ff739..f1a2375 100644 --- a/SPECS/libteam.spec +++ b/SPECS/libteam.spec @@ -1,12 +1,14 @@ Name: libteam Version: 1.29 -Release: 1%{?dist} +Release: 1%{?dist}.2 Summary: Library for controlling team network device Group: System Environment/Libraries License: LGPLv2+ URL: http://www.libteam.org Source: http://www.libteam.org/files/libteam-%{version}.tar.gz Patch1: libteam-man-teamd.conf-update-some-parameter-default-values.patch +Patch2: libteam-utils-bond2team-keep-delivering-config-to-file-if-st.patch +Patch3: libteam-utils-bond2team-remove-TYPE-in-ifcfg-file.patch BuildRequires: jansson-devel BuildRequires: libdaemon-devel BuildRequires: libnl3-devel @@ -165,6 +167,11 @@ cd binding/python %{_sysconfdir}/sysconfig/network-scripts/ifdown-TeamPort %changelog +* Wed Aug 05 2020 Xin Long - 1.29-1.el8_2.2 +- gating: fix the invalid ovs rpm link with latest version [1865899] +* Wed Aug 05 2020 Xin Long - 1.29-1.el8_2.1 +- utils/bond2team: keep delivering config to file if stdout not supplied [1865899] +- utils/bond2team: remove TYPE in ifcfg file [1865899] * Mon Oct 14 2019 Xin Long - 1.29-1 - man teamd.conf: update some parameter default values [1732587] - 1.29 release