Handle dual ToR neighbor miss scenario#2137
Merged
theasianpianist merged 13 commits intosonic-net:202012from Feb 16, 2022
Merged
Handle dual ToR neighbor miss scenario#2137theasianpianist merged 13 commits intosonic-net:202012from
theasianpianist merged 13 commits intosonic-net:202012from
Conversation
- If unable to resolve a neighbor on a dual ToR system, write a neighbor table entry for that neighbor with a zero MAC Signed-off-by: Lawrence Lee <[email protected]>
- When receiving a neighbor update with a zero MAC:
- If the neighbor IP is configured for a specific mux cable port in the MUX_CABLE table in CONFIG_DB, handle the neighbor normally (if active for the port, no action is needed. if standby, a tunnel route is created for the neighbor IP)
- If the neighbor IP is not configured for a specific port, create a tunnel route for the IP to the peer switch.
- When these neighbor IPs are eventually resolved, remove the tunnel route and handle the neighbor normally.
Signed-off-by: Lawrence Lee <[email protected]>
Signed-off-by: Lawrence Lee <[email protected]>
prsunny
reviewed
Feb 8, 2022
- Insert newline before open braces - Use MacAddress boolean conversion Signed-off-by: Lawrence Lee <[email protected]>
Signed-off-by: Lawrence Lee <[email protected]>
Signed-off-by: Lawrence Lee <[email protected]>
- Move standalone tunnel neighbor handling to completely separate code path Signed-off-by: Lawrence Lee <[email protected]>
Signed-off-by: Lawrence Lee <[email protected]>
- Add dual ToR neighbor miss test cases:
- Create generic test runner function that executes test
steps described in mux_neigh_miss_tests.py
- Add neighbor miss test case with missing PEER_SWITCH config
- Create setup fixtures for dual ToR DB entries
- CONFIG_DB: VLAN, MUX_CABLE, PEER_SWITCH
- APPL_DB: TUNNEL_DECAP_TABLE
- Refactor existing tests to use setup fixtures for consistency
- Create ASIC_DB and APPL_DB verification functions
- Verify APPL_DB NEIGH_TABLE entry presence/absence
- Verify ASIC_DB ROUTE_ENTRY and NEIGH_ENTRY entry presence/absence
- Create various fixtures to generate test information
Signed-off-by: Lawrence Lee <[email protected]>
Signed-off-by: Lawrence Lee <[email protected]>
58859e8 to
193a00d
Compare
|
This pull request introduces 2 alerts and fixes 1 when merging 193a00d into 4bff5c6 - view on LGTM.com new alerts:
fixed alerts:
|
Signed-off-by: Lawrence Lee <[email protected]>
|
This pull request fixes 1 alert when merging dc04459 into 4bff5c6 - view on LGTM.com fixed alerts:
|
prsunny
reviewed
Feb 15, 2022
Collaborator
prsunny
left a comment
There was a problem hiding this comment.
overall lgtm, lets chat on the test changes.
orchagent/neighorch.cpp
Outdated
| #include "routeorch.h" | ||
| #include "directory.h" | ||
| #include "muxorch.h" | ||
| #include "observer.h" |
Collaborator
There was a problem hiding this comment.
Please remove this. Its already in .h file
orchagent/neighorch.cpp
Outdated
| extern FgNhgOrch *gFgNhgOrch; | ||
| extern Directory<Orch*> gDirectory; | ||
|
|
||
| #define MUX_TUNNEL "MuxTunnel0" |
Collaborator
There was a problem hiding this comment.
Please remove. Its unused and also not relevant to neighorch
Signed-off-by: Lawrence Lee <[email protected]>
|
This pull request fixes 1 alert when merging 499475e into 4bff5c6 - view on LGTM.com fixed alerts:
|
prsunny
approved these changes
Feb 15, 2022
|
This pull request fixes 1 alert when merging 499475e into 4bff5c6 - view on LGTM.com fixed alerts:
|
theasianpianist
added a commit
to theasianpianist/sonic-swss
that referenced
this pull request
Feb 19, 2022
- When orchagent receives a neighbor update with a zero MAC:
- If the neighbor IP is configured for a specific mux cable port in the MUX_CABLE table in CONFIG_DB, handle the neighbor normally (if active for the port, no action is needed. if standby, a tunnel route is created for the neighbor IP)
- If the neighbor IP is not configured for a specific port, create a tunnel route for the IP to the peer switch.
- When these neighbor IPs are eventually resolved, remove the tunnel route and handle the neighbor normally.
- When creating/initializing a mux cable object, set the internal state to standby to match the constructor behavior.
- Various formatting fixes inside test_mux.py
- Remove references to deprecated `@pytest.yield_fixture`
- Add dual ToR neighbor miss test cases:
- Test cases and expected results are described in `mux_neigh_miss_tests.py`. These descriptions are used by the generic test runner `test_neighbor_miss` function to execute the test actions and verify expected results
- Various setup fixtures and test info fixtures were added
- Existing test cases were changed to use these setup fixtures for consistency
Signed-off-by: Lawrence Lee <[email protected]>
Co-authored-by: Sumukha Tumkur Vani <[email protected]>
5 tasks
yxieca
pushed a commit
that referenced
this pull request
Aug 20, 2022
* Handle dual ToR neighbor miss scenario (#2137) - When orchagent receives a neighbor update with a zero MAC: - If the neighbor IP is configured for a specific mux cable port in the MUX_CABLE table in CONFIG_DB, handle the neighbor normally (if active for the port, no action is needed. if standby, a tunnel route is created for the neighbor IP) - If the neighbor IP is not configured for a specific port, create a tunnel route for the IP to the peer switch. - When these neighbor IPs are eventually resolved, remove the tunnel route and handle the neighbor normally. - When creating/initializing a mux cable object, set the internal state to standby to match the constructor behavior. - Various formatting fixes inside test_mux.py - Remove references to deprecated `@pytest.yield_fixture` - Add dual ToR neighbor miss test cases: - Test cases and expected results are described in `mux_neigh_miss_tests.py`. These descriptions are used by the generic test runner `test_neighbor_miss` function to execute the test actions and verify expected results - Various setup fixtures and test info fixtures were added - Existing test cases were changed to use these setup fixtures for consistency Signed-off-by: Lawrence Lee <[email protected]> Co-authored-by: Sumukha Tumkur Vani <[email protected]>
yxieca
pushed a commit
that referenced
this pull request
Aug 20, 2022
* Handle dual ToR neighbor miss scenario (#2137) - When orchagent receives a neighbor update with a zero MAC: - If the neighbor IP is configured for a specific mux cable port in the MUX_CABLE table in CONFIG_DB, handle the neighbor normally (if active for the port, no action is needed. if standby, a tunnel route is created for the neighbor IP) - If the neighbor IP is not configured for a specific port, create a tunnel route for the IP to the peer switch. - When these neighbor IPs are eventually resolved, remove the tunnel route and handle the neighbor normally. - When creating/initializing a mux cable object, set the internal state to standby to match the constructor behavior. - Various formatting fixes inside test_mux.py - Remove references to deprecated `@pytest.yield_fixture` - Add dual ToR neighbor miss test cases: - Test cases and expected results are described in `mux_neigh_miss_tests.py`. These descriptions are used by the generic test runner `test_neighbor_miss` function to execute the test actions and verify expected results - Various setup fixtures and test info fixtures were added - Existing test cases were changed to use these setup fixtures for consistency Signed-off-by: Lawrence Lee <[email protected]> Co-authored-by: Sumukha Tumkur Vani <[email protected]>
theasianpianist
added a commit
to sonic-net/sonic-utilities
that referenced
this pull request
Aug 30, 2022
When checking for route entry mismatches, ignore mismatched routes where an APPL_DB neighbor entry with a zero MAC is present. These routes are introduced by this change in SWSS and are expected: sonic-net/sonic-swss#2137 Signed-off-by: Lawrence Lee <[email protected]>
theasianpianist
added a commit
to sonic-net/sonic-utilities
that referenced
this pull request
Aug 30, 2022
When checking for route entry mismatches, ignore mismatched routes where an APPL_DB neighbor entry with a zero MAC is present. These routes are introduced by this change in SWSS and are expected: sonic-net/sonic-swss#2137 Signed-off-by: Lawrence Lee <[email protected]>
theasianpianist
added a commit
to theasianpianist/sonic-utilities
that referenced
this pull request
Sep 1, 2022
When checking for route entry mismatches, ignore mismatched routes where an APPL_DB neighbor entry with a zero MAC is present. These routes are introduced by this change in SWSS and are expected: sonic-net/sonic-swss#2137 Signed-off-by: Lawrence Lee <[email protected]>
yxieca
pushed a commit
to sonic-net/sonic-utilities
that referenced
this pull request
Sep 2, 2022
When checking for route entry mismatches, ignore mismatched routes where an APPL_DB neighbor entry with a zero MAC is present. These routes are introduced by this change in SWSS and are expected: sonic-net/sonic-swss#2137 Signed-off-by: Lawrence Lee <[email protected]> Signed-off-by: Lawrence Lee <[email protected]>
EdenGri
pushed a commit
to EdenGri/sonic-utilities
that referenced
this pull request
Oct 12, 2022
When checking for route entry mismatches, ignore mismatched routes where an APPL_DB neighbor entry with a zero MAC is present. These routes are introduced by this change in SWSS and are expected: sonic-net/sonic-swss#2137 Signed-off-by: Lawrence Lee <[email protected]>
preetham-singh
pushed a commit
to preetham-singh/sonic-utilities
that referenced
this pull request
Nov 21, 2022
When checking for route entry mismatches, ignore mismatched routes where an APPL_DB neighbor entry with a zero MAC is present. These routes are introduced by this change in SWSS and are expected: sonic-net/sonic-swss#2137 Signed-off-by: Lawrence Lee <[email protected]>
malletvapid23
added a commit
to malletvapid23/Sonic-Utility
that referenced
this pull request
Aug 3, 2023
When checking for route entry mismatches, ignore mismatched routes where an APPL_DB neighbor entry with a zero MAC is present. These routes are introduced by this change in SWSS and are expected: sonic-net/sonic-swss#2137 Signed-off-by: Lawrence Lee <[email protected]>
Janetxxx
pushed a commit
to Janetxxx/sonic-swss
that referenced
this pull request
Nov 10, 2025
* Handle dual ToR neighbor miss scenario (sonic-net#2137) - When orchagent receives a neighbor update with a zero MAC: - If the neighbor IP is configured for a specific mux cable port in the MUX_CABLE table in CONFIG_DB, handle the neighbor normally (if active for the port, no action is needed. if standby, a tunnel route is created for the neighbor IP) - If the neighbor IP is not configured for a specific port, create a tunnel route for the IP to the peer switch. - When these neighbor IPs are eventually resolved, remove the tunnel route and handle the neighbor normally. - When creating/initializing a mux cable object, set the internal state to standby to match the constructor behavior. - Various formatting fixes inside test_mux.py - Remove references to deprecated `@pytest.yield_fixture` - Add dual ToR neighbor miss test cases: - Test cases and expected results are described in `mux_neigh_miss_tests.py`. These descriptions are used by the generic test runner `test_neighbor_miss` function to execute the test actions and verify expected results - Various setup fixtures and test info fixtures were added - Existing test cases were changed to use these setup fixtures for consistency Signed-off-by: Lawrence Lee <[email protected]> Co-authored-by: Sumukha Tumkur Vani <[email protected]>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What I did
Test changes
@pytest.yield_fixturemux_neigh_miss_tests.py. These descriptions are used by the generic test runnertest_neighbor_missfunction to execute the test actions and verify expected resultsTest case descriptions:
Expectations:
For the purposes of this test, there is a distinction made between 'server' IPs and 'neighbor' IPs. Server IPs are IP addresses explicitly configured on a specific mux cable interface in the MUX_CABLE table in config DB. Mux cable IPs (or neighbor IPs) are any other IPs within the VLAN subnet.
Standby Mux Cable IP Unresolved Test Cases:
Active Mux Cable IP Unresolved Test Cases:
Neighbor IPs Unresolved Test Cases:
Why I did it
How I verified it
Details if related