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 <liuhangbin(a)gmail.com>
---
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.25.4