Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CLI configuration options for teamd retry count feature (#2642)
* Add CLI configuration options for teamd retry count feature Add a SONiC CLI to more easily configure the retry count for port channels. This effectively acts like a wrapper around the underlying teamdctl command. Also add a python script that'll be installed into /usr/local/bin/teamd_increase_retry_count.py that will detect if the peer device likely supports this teamd feature (based on LLDP neighbor info) and increases the teamd retry count to 5 in preparation for warm upgrade. This script requires sudo to run. This is tied to sonic-net/sonic-buildimage#13453. Signed-off-by: Saikrishna Arcot <[email protected]> * Add test for error case from teamd when it's not running Signed-off-by: Saikrishna Arcot <[email protected]> * Fix up test cases Signed-off-by: Saikrishna Arcot <[email protected]> * Add some error handling if teamdctl doesn't exist Signed-off-by: Saikrishna Arcot <[email protected]> * Add probe functionality and sending current LACPDU packet functionality Signed-off-by: Saikrishna Arcot <[email protected]> * Check to see if the retry count feature is enabled before doing a get or set Signed-off-by: Saikrishna Arcot <[email protected]> * Add option to only send probe packets or only change retry count Signed-off-by: Saikrishna Arcot <[email protected]> * Call the teamd retry count script if doing a warm-reboot Signed-off-by: Saikrishna Arcot <[email protected]> * Fix pycheck errors, and disable scapy's IPv6 and verbose mode Scapy's IPv6 support appears to have caused some issues with older versions of scapy, which may be present on older SONiC images. Signed-off-by: Saikrishna Arcot <[email protected]> * Make teamd retry count support optional Don't fail warm reboot if teamd retry count support doesn't happen to be present. Also use fastfast-reboot for Mellanox devices. Signed-off-by: Saikrishna Arcot <[email protected]> * Address review comments, and restructure code to increase code coverage Signed-off-by: Saikrishna Arcot <[email protected]> * Address some review comments Signed-off-by: Saikrishna Arcot <[email protected]> * Replace tabs with spaces Signed-off-by: Saikrishna Arcot <[email protected]> * Verify that expected keys are present in the data returned from teamdctl Also update a failure message in the warm-reboot script if the retry count script fails. Signed-off-by: Saikrishna Arcot <[email protected]> * Fix TimeoutExpired undefined error Signed-off-by: Saikrishna Arcot <[email protected]> * Add ability to mock subprocess calls (at a limited level) Signed-off-by: Saikrishna Arcot <[email protected]> * Return an actual subprocess object, and add a test for checking timeout Signed-off-by: Saikrishna Arcot <[email protected]> * Change variable syntax Signed-off-by: Saikrishna Arcot <[email protected]> * Fix set being accessed with an index Signed-off-by: Saikrishna Arcot <[email protected]> * Add option to warm-reboot script to control if teamd retry count is required or not Signed-off-by: Saikrishna Arcot <[email protected]> * Move the teamd retry count check to before orchagent This is so that in the case of the teamd retry count check failing, there's fewer changes that happen on the system (it'll fail faster). Signed-off-by: Saikrishna Arcot <[email protected]> * Move retry count script start to be prior to point-of-no-return This doesn't need to be after the point-of-no-return, since this will detach and be sending LACPDUs on its own. Signed-off-by: Saikrishna Arcot <[email protected]> * Set executable bit Signed-off-by: Saikrishna Arcot <[email protected]> * Address PR comments Signed-off-by: Saikrishna Arcot <[email protected]> * Change to case-insensitive string contains check Signed-off-by: Saikrishna Arcot <[email protected]> * Make sure the global abort variable is used Signed-off-by: Saikrishna Arcot <[email protected]> --------- Signed-off-by: Saikrishna Arcot <[email protected]>
- Loading branch information