-
Notifications
You must be signed in to change notification settings - Fork 7.3k
test-http-dns-fails breaks if DNS server send redirects answers on invalid hostnames #8056
Comments
The test is located in @tjfontaine What do you think? |
I am of two minds, on the one hand I like being able to explicitly test dns failures in a more predictable way. So long term having something that |
@tjfontaine Alright, can you please close this issue when the changes to the jenkins nodes are done? I'll create a more long term issue about having a tool that gives us the ability to mock external system APIs. Thank you! |
Reopening as it's still an issue. @tjfontaine What would it take to standardize all the jenkins nodes to use google DNS servers? |
I fixed this for the current slaves, we could also maybe make the change happen for all tests in |
- `test-crypto-domains` was fixed by 2afa3d8 - All tests under linux appear to be fixed and have not failed recently on Jenkins - `test-http-dns-fail` was fixed by the DNS configuration change mentioned in #8056 Fixes #25656 Fixes #25673 Reviewed-By: Alexis Campailla <[email protected]> PR-URL: #25676
- `test-crypto-domains` was fixed by nodejs/node-v0.x-archive@2afa3d8 - All tests under linux appear to be fixed and have not failed recently on Jenkins - `test-http-dns-fail` was fixed by the DNS configuration change mentioned in nodejs#8056 Fixes nodejs#25656 Fixes nodejs#25673 Reviewed-By: Alexis Campailla <[email protected]> PR-URL: nodejs#25676
In test-http-dns-fails, the test performs two HTTP requests and makes sure that:
Here's the relevant code:
The problem with this test is that DNS services providers such as level3 answer queries for non-existing hostnames with the IP of their search portal. Currently, the machine that runs our Jenkin's SmartOS node is setup to use this DNS service, and thus the test fails. It doesn't fail all the time because this node is also configured to use another DNS service that does not reply with redirects. If level3's DNS server is commented out from /etc/resolv.conf, the test works as expected.
We could change the configuration of the Jenkin's SmartOS node, but it will still fail if we move the Jenkins node to another machine with the same DNS config issues.
It seems these days I want to solve every testing issue with
LD_PRELOAD
, but it could be a good solution to test DNS failures properly. We could overridegetaddrinfo
usingLD_PRELOAD
to make sure the dns lookup fails when we invoke the test. This method doesn't work on Windows, but we might be able to do something equivalent with SetWindowsHookEx.What do you think?
The text was updated successfully, but these errors were encountered: