-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[teammgrd]: Add retry logic when enslaving member port into team (#669)
* [teammgrd]: Add retry logic when enslaving member port into team When a port is not set as admin down, teamd will prevent the port from being added into the port channel. This could happen when some other processes or users are executing commands to bring up the port. This commit will try three times of enslaving before return a false. Example error message when adding a port which is admin up: libteamdctl: cli_usock_process_msg: usock: Error message received: "PortAddFail" libteamdctl: cli_usock_process_msg: usock: Error message content: "Failed to add port." command call failed (Invalid argument) * [teammgrd]: Check the admin status after the teamdctl command failure Instead of having a retry logic with time limitations, it is better to confirm the exact reason of the failure - the member port is admin up or not. The function checkPortIffUp() is added to get the netdev flags and check the IFF_UP flag. The add member logic will only retry under the circumstance that the teamdctl command fails and the member port is still UP. Signed-off-by: Shu0T1an ChenG <[email protected]>
- Loading branch information
Shuotian Cheng
authored
Nov 6, 2018
1 parent
36e304d
commit f666011
Showing
2 changed files
with
89 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters