Skip to content
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 kernel race condition in DNAT rules for DNS #1228

Merged
merged 1 commit into from
Jul 10, 2018

Conversation

szuecs
Copy link
Member

@szuecs szuecs commented Jul 10, 2018

This adds a sidecar into flannel pod spec, that adds a 1-4ms delay for udp port 53 packets going through DNAT, such that the kernel race condition happens less likely.

Background see https://blog.quentin-machu.fr/2018/06/24/5-15s-dns-lookups-on-kubernetes/
kubernetes/kubernetes#62628
flannel-io/flannel#1001 (comment)

- hostPath:
path: /lib/tc
type: ""
name: lib-tc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this volume used for?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For making "tc" possible to run

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could put this folder in the Dockerfile if it's just needed by tc. Then the configuration would be a bit less confusing :) But not a big deal.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But if anyone else adds also something to tc, then it does not have the xtables.lock, which might do more harm. I think it's good to have it in the hostpath.

@szuecs
Copy link
Member Author

szuecs commented Jul 10, 2018

👍

1 similar comment
@mikkeloscar
Copy link
Contributor

👍

@mikkeloscar mikkeloscar merged commit 59c8750 into dev Jul 10, 2018
@mikkeloscar mikkeloscar deleted the fix/flannel-dnat-race branch July 10, 2018 16:07
This was referenced Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants