-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Bug fix. Incoming UDP packets not reach newly deployed services #32561
Conversation
Can a kubernetes member verify that this patch is reasonable to test? If so, please reply with "ok to test" on its own line. Regular contributors should join the org to skip this step. While we transition away from the Jenkins GitHub PR Builder plugin, "ok to test" commenters will need to be on the admin list defined in this file. |
cc @kubernetes/sig-network |
453dadd
to
aeab3e6
Compare
cc @kubernetes/sig-network PTAL |
aeab3e6
to
53bc8f3
Compare
Reviewed 1 of 1 files at r2. Comments from Reviewable |
@k8s-bot ok to test |
@@ -1075,6 +1075,7 @@ func (proxier *Proxier) syncProxyRules() { | |||
glog.V(4).Infof("Port %s was open before and is still needed", lp.String()) | |||
replacementPortsMap[lp] = proxier.portsMap[lp] | |||
} else { | |||
|
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.
This is a dead line - remove
// https://github.com/kubernetes/kubernetes/issues/31983 | ||
if lp.protocol == "udp" { | ||
glog.V(2).Infof("Deleting conntrack entries for udp connections") | ||
err := proxier.execConntrackTool("-D", "-p", "udp", "--dport", strconv.Itoa(lp.port)) |
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.
This doesn't only happen once - this is going to happen periodically, unless I am mis-readng. I think you want to do this up around line 1077 (OpenLocalPort), when you know that this is a new nodePort, rather than a refresh. You might also do it way at the end of this function when we close nodeports we don't want any more.
But even that is not 100% correct. I think there's a bug here where, if the same nodeport were to be release and reused inside a single refresh loop it would fail. I think that will self-repair, though.
53bc8f3
to
f53a2c5
Compare
@thockin Done. I followed your comments and I've made necessary changes. I've tested it and works |
Jenkins verification failed for commit f53a2c50e093044d9c6ddc13522b2a021fa749cf. Full PR test history. The magic incantation to run this job again is |
dffaf3f
to
cddfd2f
Compare
Jenkins unit/integration failed for commit cddfd2f. Full PR test history. The magic incantation to run this job again is |
ok for post 1.5.0 |
Is this a real error or a flake? |
moving this to post 1.5.0 == 1.6 :) |
cddfd2f
to
b70f4df
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.
I am going to LGTM and see if you can fix it before the bot merges it. If not, please send a followup :)
glog.V(2).Infof("Deleting conntrack entries for udp connections") | ||
if port > 0 { | ||
err = proxier.execConntrackTool("-D", "-p", "udp", "--dport", strconv.Itoa(port)) | ||
} else { |
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 really need this fallback path any more - would be safer to just log.
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.
Done
b70f4df
to
dc54a8d
Compare
Reviewed 1 of 1 files at r5. Comments from Reviewable |
LGTM! |
Thanks |
Reviewed 1 of 1 files at r5. Comments from Reviewable |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue |
I'm confused - how is this different from #22573 ? |
Will this be cherry-picked for 1.5.? |
Given that 1.6 is freezing in O(weeks) we weren't planning on back-patching
to 1.5
…On Wed, Feb 1, 2017 at 12:38 PM, Björn Häuser ***@***.***> wrote:
Will this be cherry-picked for 1.5.?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#32561 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFVgVNTZQp072aQo-xFZDRRM0GkSShN-ks5rYO1JgaJpZM4J7b8n>
.
|
why TCP doesn't this problem ? |
What this PR does / why we need it:
Incoming UDP packets not reach newly deployed services when old connection's state in conntrack is not cleared. When a packet arrives, it will not go through NAT table again, because it is not "the first" packet. The PR fix the issue
Which issue this PR fixes
Fixes #31983
xref moby/moby#8795
This change is