Skip to content

[1.12] Author backport of #28928 (Dns proxy use original source address and port) #29090

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

Merged
merged 2 commits into from
Nov 10, 2023

Conversation

jrajahalme
Copy link
Member

Once this PR is merged, a GitHub action will update the labels of these PRs:

 27582 28928

tklauser and others added 2 commits November 9, 2023 19:30
[ upstream commit 95e25bf ]

We have been maintaining and using that fork for a long time and it
looks like the custom changes won't make it upstream any time soon.

There are no other vendored dependencies using miekg/dns, so switching
to the cilium/dns fork shouldn't have any side effects. The fork's
module name was changed to match its import path in
cilium/dns#4.

Let's replace the github.com/miekg/dns import path by
github.com/cilium/dns to get rid of another replace directive in go.mod
and thus make life a tiny bit easier for downstream packages importing
github.com/cilium/cilium.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
[ upstream commit 9d70db8 ]

Set transparent, reuseaddr, and reuseport options and use the original
source address on connections from DNS proxy to DNS servers to allow use
of non-local source address as well as recreate sockets on the same
5-tuple without needing to wait for the TCP TIME_WAIT to finish.

Use the MagicMarkEgress mark on connections to the dns servers instead
the generic MagicMarkIdentity.

Use original source address in connections to dns servers when the source
address is not one of the host IPs. The original source address and port
can not be reused if there is already socket with them to the same
destination on the same networking namespace.

Use new dns.SharedClients to reuse DNS clients between all requests that
originate from the same source address and port. This allows multiple
different requests to be pending at the same time on the same dns Client,
which happens whenever the source pod sends multiple DNS requests from
the same resolver invocation, e.g., for A and AAAA records.

Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>

info: patch template saved to `-`
@jrajahalme jrajahalme added kind/backports This PR provides functionality previously merged into master. backport/1.12 labels Nov 9, 2023
@jrajahalme jrajahalme requested review from a team as code owners November 9, 2023 17:35
@jrajahalme
Copy link
Member Author

jrajahalme commented Nov 9, 2023

/test-backport-1.12

Job 'Cilium-PR-K8s-1.19-kernel-4.9' failed:

Click to show.

Test Name

K8sDatapathConfig MonitorAggregation Checks that monitor aggregation restricts notifications

Failure Output

FAIL: failed to ensure kubectl version: failed to download kubectl

Jenkins URL: https://jenkins.cilium.io/job/Cilium-PR-K8s-1.19-kernel-4.9/265/

If it is a flake and a GitHub issue doesn't already exist to track it, comment /mlh new-flake Cilium-PR-K8s-1.19-kernel-4.9 so I can create one.

Then please upload the Jenkins artifacts to that issue.

Job 'Cilium-PR-K8s-1.17-kernel-4.9' has 1 failure but they might be new flake since it also hit 1 known flake: #27118 (96.94% similarity)

Job 'Cilium-PR-K8s-1.19-kernel-4.9' failed:

Click to show.

Test Name

K8sChaosTest Restart with long lived connections TCP connection is not dropped when cilium restarts

Failure Output

FAIL: Pods are not ready after timeout

Jenkins URL: https://jenkins.cilium.io/job/Cilium-PR-K8s-1.19-kernel-4.9/266/

If it is a flake and a GitHub issue doesn't already exist to track it, comment /mlh new-flake Cilium-PR-K8s-1.19-kernel-4.9 so I can create one.

Then please upload the Jenkins artifacts to that issue.

Job 'Cilium-PR-K8s-1.19-kernel-4.9' failed:

Click to show.

Test Name

K8sDatapathConfig MonitorAggregation Checks that monitor aggregation flags send notifications

Failure Output

FAIL: Timed out after 240.001s.

Jenkins URL: https://jenkins.cilium.io/job/Cilium-PR-K8s-1.19-kernel-4.9/267/

If it is a flake and a GitHub issue doesn't already exist to track it, comment /mlh new-flake Cilium-PR-K8s-1.19-kernel-4.9 so I can create one.

Then please upload the Jenkins artifacts to that issue.

@jrajahalme
Copy link
Member Author

/test-1.17-4.9

@jrajahalme
Copy link
Member Author

test-1.19-4.9

@jrajahalme
Copy link
Member Author

/test-1.19-4.9

@jrajahalme
Copy link
Member Author

/test-1.21-4.9

@nathanjsweet
Copy link
Member

/test-1.19-4.9

@jrajahalme
Copy link
Member Author

test-1.19-4.9 hit one known flake (#24840), I don't think it's worth wasting time running it again. Marking as ready-to-merge.

@jrajahalme jrajahalme added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Nov 10, 2023
@aanm aanm merged commit 4357e7a into cilium:v1.12 Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/backports This PR provides functionality previously merged into master. ready-to-merge This PR has passed all tests and received consensus from code owners to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants