Repository navigation
Run the cookie_remap test origins on 127.0.0.1 - #13875
Merged
Merged
Conversation
The cookie_remap tests bound their microserver origins to 127.0.0.10 and 127.0.0.11. Python's HTTPServer calls socket.getfqdn() on the bind address at startup, and those addresses are not in /etc/hosts, so every origin start waited on a reverse DNS query. When the resolver drops the query, glibc retries after 5 seconds and gives up after 10, the origin misses AuTest's 10 second startup deadline, and AuTest interrupts it before it is serving, so the test fails on the origin's return code. Bind the origins to 127.0.0.1, which resolves from /etc/hosts; the two origins in each test already listen on different ports.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The test-only binding and destination changes are consistent, preserve port isolation, and have no identified blocking issues.
No open issues 🎉
What changed in this PR
This PR reduces DNS-related startup failures in ATS’s twelve cookie_remap tests by using 127.0.0.1 for their origins.
Changes:
- Use the default loopback address when creating origins.
- Update matching configuration destinations while preserving separate origin ports.
| File | Description |
|---|---|
| tests/gold_tests/pluginTest/cookie_remap/substitute.test.py | Use default origin address. |
| tests/gold_tests/pluginTest/cookie_remap/subcookie.test.py | Use default origin addresses. |
| tests/gold_tests/pluginTest/cookie_remap/regexcookie.test.py | Use default origin addresses. |
| tests/gold_tests/pluginTest/cookie_remap/psubstitute.test.py | Use default origin address. |
| tests/gold_tests/pluginTest/cookie_remap/pcollapseslashes.test.py | Use default origin address. |
| tests/gold_tests/pluginTest/cookie_remap/notexistscookie.test.py | Use default origin addresses. |
| tests/gold_tests/pluginTest/cookie_remap/matchuri.test.py | Use default origin addresses. |
| tests/gold_tests/pluginTest/cookie_remap/matchcookie.test.py | Use default origin addresses. |
| tests/gold_tests/pluginTest/cookie_remap/existscookie.test.py | Use default origin addresses. |
| tests/gold_tests/pluginTest/cookie_remap/connector.test.py | Use default origin addresses. |
| tests/gold_tests/pluginTest/cookie_remap/configs/substituteconfig.txt | Point substitution destinations to loopback. |
| tests/gold_tests/pluginTest/cookie_remap/configs/subcookie.txt | Update both routing destinations. |
| tests/gold_tests/pluginTest/cookie_remap/configs/regexconfig.txt | Update both regex destinations. |
| tests/gold_tests/pluginTest/cookie_remap/configs/psubstituteconfig.txt | Point substitution destinations to loopback. |
| tests/gold_tests/pluginTest/cookie_remap/configs/pcollapseconfig.txt | Update slash-collapse destination. |
| tests/gold_tests/pluginTest/cookie_remap/configs/notexistsconfig.txt | Update both cookie-check destinations. |
| tests/gold_tests/pluginTest/cookie_remap/configs/matchuriconfig.txt | Update both URI-match destinations. |
| tests/gold_tests/pluginTest/cookie_remap/configs/matchconfig.txt | Update both cookie-match destinations. |
| tests/gold_tests/pluginTest/cookie_remap/configs/existsconfig.txt | Update both cookie-check destinations. |
| tests/gold_tests/pluginTest/cookie_remap/configs/connectorconfig.txt | Update both connector destinations. |
| tests/gold_tests/pluginTest/cookie_remap/configs/collapseconfig.txt | Update slash-collapse destination. |
| tests/gold_tests/pluginTest/cookie_remap/configs/bucketconfig.txt | Update both bucket destinations. |
| tests/gold_tests/pluginTest/cookie_remap/collapseslashes.test.py | Use default origin address. |
| tests/gold_tests/pluginTest/cookie_remap/bucketcookie.test.py | Use default origin addresses. |
Review effort: Balanced
brbzull0
approved these changes
Oct 20, 2026
brbzull0
left a comment
Contributor
There was a problem hiding this comment.
Verified: no 127.0.0.10/.11 remains under cookie_remap and no other gold test binds a non-.1 loopback; HTTPServer.server_bind's getfqdn() on the bind address is the lookup in question; sendto/else origins stay distinguishable by port ($PORT/$ALTPORT from each server's own get_port) and path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
cookie_remaptests are the only microserver tests that bind their origins to 127.0.0.10 and 127.0.0.11. Python'sHTTPServercallssocket.getfqdn()on the bind address while it starts, and those addresses are not in/etc/hosts, so every origin start sends a reverse DNS query. When the resolver drops that query, glibc retries after 5 seconds and gives up after 10, which is exactly AuTest's default startup timeout. AuTest then interrupts the origin before it is serving and the test fails on the origin's return code. 127.0.0.1 resolves from/etc/hostswithout a query, which is why no other test hits this.This binds the origins in all twelve tests to 127.0.0.1 and points their configs there. The two origins in each test already listen on different ports, and no gold file checks the address.
Testing, in the fedora:44 CI image under CPU load with a resolver that drops about 30% of queries: master failed 108 of 768 test runs, every one with the same "Checking that any test passes" failure CI has been reporting, and this change failed none of 768. With the resolver not answering at all, master failed 96 of 96 and this change none. With a healthy resolver, master passed all 1152 runs, so CPU load alone does not cause it. I can't see the resolver on the CI agents, so the dropped query there is inferred from the matching signature rather than observed.