-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Egress IP fixes #16866
Egress IP fixes #16866
Conversation
danwinship
commented
Oct 13, 2017
- Further IP address validation, from Don't allow claiming node IP as egress IP #16779 (comment)
- Fix OVS VXLAN ingress rule to not filter out remote node egress IP traffic, fixing https://bugzilla.redhat.com/show_bug.cgi?id=1501876
pkg/network/node/egressip.go
Outdated
@@ -269,6 +270,12 @@ func (eip *egressIPWatcher) claimEgressIP(egressIP, egressHex string) error { | |||
|
|||
for _, addr := range addrs { | |||
if addr.IP.String() == eip.localIP { | |||
_, eip.localEgressNet, err = net.ParseCIDR(addr.IPNet.String()) |
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 to run this for every claim?
We know localIP during egressIPWatcher intialization. We could populate localEgressNet in Start() before calling the HostSubnet/NetNamespace watch.
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.
We don't, we only run it on the first claim. (There's an "if eip.localEgressLink == nil
" around the whole thing.) I don't remember why I did it that way rather than initializing it from Start() but maybe I should change that...
154b0e0
to
84109c9
Compare
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.
minor nit, otherwise LGTM
pkg/network/node/egressip.go
Outdated
@@ -71,6 +71,10 @@ func newEgressIPWatcher(localIP string, oc *ovsController) *egressIPWatcher { | |||
} | |||
|
|||
func (eip *egressIPWatcher) Start(networkClient networkclient.Interface, iptables *NodeIPTables) error { | |||
if err := eip.findEgressLink(); err != nil { | |||
return fmt.Errorf("Could not find egress network interface: %v", err) |
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.
*could (start with lower case)
/retest |
Nodes need to accept VXLAN traffic for non-local IPs when automatic egress IPs are in use.
84109c9
to
64b1dc7
Compare
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
Thanks Dan
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danwinship, knobunc The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test extended_conformance_gce |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
Automatic merge from submit-queue. |