-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Attempt AAAA before A #4551
Attempt AAAA before A #4551
Conversation
This is common-practice for systems. Generally if a domain has ipv6 it also has ipv4, so if we query ipv4 always we effectively never use ipv6.
Hi @jacksontj. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jacksontj The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
FYI this is a continuation of #3882 Basically in that PR; summary:
With the addition I had in the description (this might be problematic if we don't know if we are ipv6 or ipv6). In my case I have an ipv6-only cluster; so it failed with A record resolution, similarly if you had an ipv4 only cluster AAAA records would cause failure. So either we need our nginx stuff to fallback or we need to know what our capabilities are within lua. |
Codecov Report
@@ Coverage Diff @@
## master #4551 +/- ##
==========================================
+ Coverage 59.34% 59.37% +0.02%
==========================================
Files 89 89
Lines 6823 6823
==========================================
+ Hits 4049 4051 +2
+ Misses 2338 2337 -1
+ Partials 436 435 -1
Continue to review full report at Codecov.
|
@jacksontj so the main problem with the current implementation is we might miss IPv6 addresses of a domain being resolved if it has IPv4? Changing the order as you do in this PR fixes that, no? You need to adjust test in https://prow.k8s.io/view/gcs/kubernetes-jenkins/pr-logs/pull/ingress-nginx/4551/pull-ingress-nginx-test-lua/1171440714668576773 |
This is more of a general ipv4 vs ipv6 issue. To clarify I'll talk about it in 3 modes:
The way this lua stuff is configured right now it has the same query lookup function (and config) regardless of controller environment. If the controller only has ipv4 or ipv6 (not both) then its impossible to get it working (without custom overrides of the lua scripts through volume mounts). Ideally this would be configured on the controller so you could define the lookup order and preference-- but I didn't see other config options that do that so I was unable to just copy it. |
This should not be the case. The resolver currently tries to resolve A record first and if not successful it queries AAAA.
A type query, it'll continue and try AAAA .
Given we never resolve DNS in-line with requests, I don't see any issue with current approach. That being said I agree with trying |
I was referring to the controller having only ipv4 or ipv6. So as an example, if the destination has both IPv4 and IPv6 and the controller has ipv6 only the current setup of A then AAAA will return an A record -- which the controller can't route to (since it has no ipv6 address). Similarly if the controller was ipv4 only with this patch you'd get AAAA record which can't be connected to. Which puts me back to my previous comment:
|
Closing. Please reopen if you plan to continue working on this. Thanks |
@jacksontj: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
This is common-practice for systems. Generally if a domain has ipv6 it also has ipv4, so if we query ipv4 always we effectively never use ipv6.
Ideally this would be (1) configurable or (2) smart enough to know if we have a ipv6 capability