After c8b356a3cd36 ("teamd: config: update local prio to kernel"),
we update team port prio not only on local, but also on kernel side.
So we need to add the port to team first before update TEAM_PORT_CONFIG.
Or the teamd_config_port_update() would be failed because we could not find
the port in teamd_get_port_by_ifname() during teamd_config_port_set().
Reported-by: LiLiang <liali(a)redhat.com>
Fixes: c8b356a3cd36 ("teamd: config: update local prio to kernel")
Signed-off-by: Hangbin Liu <liuhangbin(a)gmail.com>
---
teamd/redhat/initscripts/network-scripts/ifup-TeamPort | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/teamd/redhat/initscripts/network-scripts/ifup-TeamPort
b/teamd/redhat/initscripts/network-scripts/ifup-TeamPort
index 8c3cc3a..954b47a 100755
--- a/teamd/redhat/initscripts/network-scripts/ifup-TeamPort
+++ b/teamd/redhat/initscripts/network-scripts/ifup-TeamPort
@@ -51,8 +51,8 @@ if [ -n "${TEAM_MASTER}" ]; then
exit 0
fi
/sbin/ip link set dev ${DEVICE} down
+ /usr/bin/teamdctl ${TEAM_MASTER} port add ${DEVICE} || exit 1
if [ -n "${TEAM_PORT_CONFIG}" ]; then
/usr/bin/teamdctl ${TEAM_MASTER} port config update ${DEVICE}
"${TEAM_PORT_CONFIG}" || exit 1
fi
- /usr/bin/teamdctl ${TEAM_MASTER} port add ${DEVICE} || exit 1
fi
--
2.19.2