This repository was archived by the owner on Jun 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 679
Deal with moving MACs #2437
Open
rade
wants to merge
6
commits into
1.7
Choose a base branch
from
2436-mac-move
base: 1.7
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Deal with moving MACs #2437
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
17c8dc9
MacCache.AddForced needs to return conflicting peer
rade 6f9b544
don't drop captured packets from remote MAC
rade 2408f0e
Delete fastdp bridge MACs when invalidating routes
brb bfcd8c1
Replace MacCache.Add by MacCache.AddForced
brb f029860
Extract common parts and move to learnMAC
brb 6e3d824
Add container MAC migration tests
brb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#! /bin/bash | ||
|
||
. ./config.sh | ||
|
||
C1=10.2.1.1 | ||
C2=10.2.1.2 | ||
C3=10.2.1.128 | ||
|
||
assert_migration() { | ||
start_container $HOST1 $C1/24 --name=c1 | ||
start_container $HOST1 $C2/24 --name=c2 | ||
start_container $HOST2 $C3/24 --name=c3 --privileged | ||
|
||
assert_raises "exec_on $HOST2 c3 $PING $C2" | ||
MAC=$(exec_on $HOST1 c1 ip link show ethwe | sed -n -e 's|^ *link/ether \([0-9a-f:]*\).*|\1|p') | ||
docker_on $HOST1 rm -f c1 | ||
exec_on $HOST2 c3 ip link set ethwe address $MAC | ||
assert_raises "exec_on $HOST2 c3 $PING $C2" | ||
} | ||
|
||
start_suite "Container MAC migration" | ||
|
||
# Test with fastdp | ||
|
||
weave_on $HOST1 launch | ||
weave_on $HOST2 launch $HOST1 | ||
assert_migration | ||
|
||
# Cleanup | ||
|
||
docker_on $HOST1 rm -f c2 | ||
docker_on $HOST2 rm -f c3 | ||
weave_on $HOST1 reset | ||
weave_on $HOST2 reset | ||
|
||
# Test with sleeve | ||
|
||
WEAVE_NO_FASTDP=1 weave_on $HOST1 launch | ||
WEAVE_NO_FASTDP=1 weave_on $HOST2 launch $HOST1 | ||
assert_migration | ||
|
||
end_suite |
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.
This comment was marked as abuse.
Sorry, something went wrong.