LLDP: Add multi-asic support for test_lldp_entry_table_after_syncd_orchagent and some other fixes. #16640
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…chagent and some other fixes.
Description of PR
test_lldp_entry_table_after_syncd_orchagent is a new test case added to test_lldp_syncd recently. It does not provide multi-asic support at this moment.
This PR add following supports to test_lldp_entry_table_after_syncd_orchagent :
Added multi-asic support.
Replace "docker restart" to "sudo systemctl restart". In OC pre-tests feature autorestart is always disabled. Container restart could cause corresponding service to go down. If autorestart is not enabled service will not try to come back up.
Get the lldp key entry before restart swss. Current code is getting LLDP key after restart swss and all critical services are up. There's window of that some ports are not completely up or ports are up but or LLDP packets have not been received and processed yet. This could result get_lldp_entry_keys does not have the full set of keys and result following ports up check pass quickly. Result in following LLDP check to fail.
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
Fix test_lldp_entry_table_after_syncd_orchagent failure
How did you do it?
How did you verify/test it?
Test passed consistently after code change.
Any platform specific information?
master
Supported testbed topology if it's a new test case?