Repository navigation
[Nexthop][fboss2-dev] Delete the underlay VLAN in TunnelIpInIpTest tests that commit a tunnel - #1902
Open
abhinav-nexthop wants to merge 4 commits into
Open
abhinav-nexthop wants to merge 4 commits into
abhinav-nexthop wants to merge 4 commits into
Conversation
This branch has not been deployed
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.
Pre-submission checklist
Depends on #1811, which adds the
deleteTunnelAndUnderlay()helper this change calls. Only the last commit is new here.Summary
Each
TunnelIpInIpTestcase gets its underlay interface fromensureUnderlayIntfId(), which creates a VLAN on the first free ID in 2000-2099. Five tests commit that VLAN but never delete it:CreateDecapTunnelAndVerifyRunningConfig,CreateEncapTunnelAndVerifyRunningConfig,DeleteDecapTunnel,ResetOptionalAttrOnDecapTunnelandDeleteWrongDirectionRejected. The fixture'sTearDownonly removes the tunnels, so every run leaves 5 VLANs behind on the switch.On a platform whose port interfaces already use most of 2000-2099, this runs the window dry. When 2000 is the only free ID, the first test keeps it and every test after it fails with:
The fix arms
deleteTunnelAndUnderlay()in aSCOPE_EXITin those five tests, the same cleanup the mask, mode and termination-type tests use. It deletes the tunnel, then the underlay VLAN, and checks both are gone, even if the test fails halfway. The three reject tests are left alone, since they discard the session and never commit the VLAN.Test Plan
Full
TunnelIpInIpTestsuite on a switch where VLAN 2000 is the only free ID in the window. Every test now gets VLAN 2000 and gives it back before the next one starts.