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