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 (sonic-ne…
…t#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 <sarcot@microsoft.com> * Add test for error case from teamd when it's not running Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * Fix up test cases Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * Add some error handling if teamdctl doesn't exist Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * Add probe functionality and sending current LACPDU packet functionality Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * Check to see if the retry count feature is enabled before doing a get or set Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * Add option to only send probe packets or only change retry count Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * Call the teamd retry count script if doing a warm-reboot Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * 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 <sarcot@microsoft.com> * 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 <sarcot@microsoft.com> * Address review comments, and restructure code to increase code coverage Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * Address some review comments Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * Replace tabs with spaces Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * 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 <sarcot@microsoft.com> * Fix TimeoutExpired undefined error Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * Add ability to mock subprocess calls (at a limited level) Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * Return an actual subprocess object, and add a test for checking timeout Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * Change variable syntax Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * Fix set being accessed with an index Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * Add option to warm-reboot script to control if teamd retry count is required or not Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * 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 <sarcot@microsoft.com> * 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 <sarcot@microsoft.com> * Set executable bit Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * Address PR comments Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * Change to case-insensitive string contains check Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> * Make sure the global abort variable is used Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com> --------- Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
- Loading branch information