Fix a bug when a namespace has two egress IPs on same node#19926
Merged
openshift-merge-robot merged 1 commit intoopenshift:masterfrom Jun 6, 2018
Merged
Fix a bug when a namespace has two egress IPs on same node#19926openshift-merge-robot merged 1 commit intoopenshift:masterfrom
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
Conversation
|
[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. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Contributor
|
/retest |
Contributor
|
/retest |
1 similar comment
Contributor
|
/retest |
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.
#19603 was supposed to make us sanity-check-but-ignore additional egress IPs on a namespace, but it accidentally made it so that the iptables rules for the IP would get set up anyway. In the sane case where the namespace had multiple egress IPs on different nodes, this had no visible effect, because no one was sending egress traffic for the namespace to the second node anyway, so it just had a useless iptables rule. But if you had two egress IPs for the same namespace on the same node (which is stupid, but...) then they'd both get set up on that node, and the second one ended up having priority over the first one.
This fixes it so that only the first egress IP for a namespace ever gets set up. (#19578 will need a larger fix.)
The change to
updateNamespaceEgressis to deal with:["1.1.1.1", "2.2.2.2"]["1.1.1.1"](which will add OVS and iptables rules for1.1.1.1)["2.2.2.2", "1.1.1.1"](which needs to add OVS and iptables rules for2.2.2.2and remove them for1.1.1.1, but in order to make the latter happen, we have to add1.1.1.1to the "changed" list, even though it didn't actually change)Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1585947