-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the issue GARP not being sent #796
Conversation
Thanks for your PR. The following commands are available:
These commands can only be run by members of the vmware-tanzu organization. |
/test-all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
test/e2e/basic_test.go
Outdated
defer teardownTest(t, data) | ||
|
||
podName := "busybox" | ||
nodeName := masterNodeName() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the master?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted the test not limited by node number.
Now I see some tests are using workerNodeName(1)
without checking node number, changed to workerNodeName(1)
too.
test/e2e/basic_test.go
Outdated
t.Fatalf("Error when waiting for IP for Pod '%s': %v", podName, err) | ||
} | ||
|
||
cmd := []string{"ovs-ofctl", "dump-flows", "br-int", fmt.Sprintf("table=10,arp,arp_spa=%s", podIP)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible that by that time the GARPS have not been sent yet, since it is an asynchronous operation in the agent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I was wondering why the test failed on Jenkin CI only and it got only 1 ARP packet. Maybe it's because of this. I added a sleep and let's see if it's stable now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/test-windows-conformance |
On Linux, to flush stale ARP cache of network, antrea-agent is supposed to send gratuitous ARP packets when configuring network for a Pod. However, the routine was broken when refactoring the "advertiseContainerAddr" method for Windows support. The action was executed in a new spawned goroutine within the context of "NetNS.Do", then it was actually executed after NetNS had switched to the target container NS and had switched back to the host NS. This patch fixes it by executing the whole routine in a goroutine, and fixes the ticker leak problem. It also adds an e2e test to verify there are at least 3 ARP packets received by OVS after a Pod is up to avoid this being broken again as not sending GARP may not lead to connectivity test failure stably if there are no IP reuse before ARP cache expiry.
/test-all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
On Linux, to flush stale ARP cache of network, antrea-agent is supposed to send gratuitous ARP packets when configuring network for a Pod. However, the routine was broken when refactoring the "advertiseContainerAddr" method for Windows support. The action was executed in a new spawned goroutine within the context of "NetNS.Do", then it was actually executed after NetNS had switched to the target container NS and had switched back to the host NS. This patch fixes it by executing the whole routine in a goroutine, and fixes the ticker leak problem. It also adds an e2e test to verify there are at least 3 ARP packets received by OVS after a Pod is up to avoid this being broken again as not sending GARP may not lead to connectivity test failure stably if there are no IP reuse before ARP cache expiry.
On Linux, to flush stale ARP cache of network, antrea-agent is supposed to send gratuitous ARP packets when configuring network for a Pod. However, the routine was broken when refactoring the "advertiseContainerAddr" method for Windows support. The action was executed in a new spawned goroutine within the context of "NetNS.Do", then it was actually executed after NetNS had switched to the target container NS and had switched back to the host NS. This patch fixes it by executing the whole routine in a goroutine, and fixes the ticker leak problem. It also adds an e2e test to verify there are at least 3 ARP packets received by OVS after a Pod is up to avoid this being broken again as not sending GARP may not lead to connectivity test failure stably if there are no IP reuse before ARP cache expiry.
On Linux, to flush stale ARP cache of network, antrea-agent is supposed to send gratuitous ARP packets when configuring network for a Pod. However, the routine was broken when refactoring the "advertiseContainerAddr" method for Windows support. The action was executed in a new spawned goroutine within the context of "NetNS.Do", then it was actually executed after NetNS had switched to the target container NS and had switched back to the host NS. This patch fixes it by executing the whole routine in a goroutine, and fixes the ticker leak problem. It also adds an e2e test to verify there are at least 3 ARP packets received by OVS after a Pod is up to avoid this being broken again as not sending GARP may not lead to connectivity test failure stably if there are no IP reuse before ARP cache expiry.
On Linux, to flush stale ARP cache of network, antrea-agent is supposed
to send gratuitous ARP packets when configuring network for a Pod.
However, the routine was broken when refactoring the
"advertiseContainerAddr" method for Windows support. The action was
executed in a new spawned goroutine within the context of "NetNS.Do",
then it was actually executed after NetNS had switched to the target
container NS and had switched back to the host NS.
This patch fixes it by executing the whole routine in a goroutine, and
fixes the ticker leak problem. It also adds an e2e test to verify there
are at least 3 ARP packets received by OVS after a Pod is up to avoid
this being broken again as not sending GARP may not lead to connectivity
test failure stably if there are no IP reuse before ARP cache expiry.
For #785