Bug 1950016
| Summary: | rh-ruby27-ruby: Resolv::DNS: timeouts if multiple IPv6 name servers are given and address contains leading zero [rhscl-3] | |||
|---|---|---|---|---|
| Product: | Red Hat Software Collections | Reporter: | Vít Ondruch <vondruch> | |
| Component: | ruby | Assignee: | Vít Ondruch <vondruch> | |
| Status: | CLOSED ERRATA | QA Contact: | Jan Houska <jhouska> | |
| Severity: | unspecified | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | rh-ruby27 | CC: | djez, jhouska, pvalena | |
| Target Milestone: | alpha | Keywords: | Triaged, ZStream | |
| Target Release: | 3.7 | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | rh-ruby27-ruby-2.7.3-129.el7 | Doc Type: | No Doc Update | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1952088 (view as bug list) | Environment: | ||
| Last Closed: | 2021-06-03 11:25:19 UTC | Type: | --- | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1916404, 1952088 | |||
VERIFIED:
NEW PASSED:
Version:
rh-ruby27-ruby-2.7.3-129.el7
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ 10:36:43 ] :: [ INFO ] :: using '/var/tmp/beakerlib-126060023/backup' as backup destination
Redirecting to /bin/systemctl status named.service
Redirecting to /bin/systemctl start named.service
:: [ 10:36:43 ] :: [ LOG ] :: rlServiceStart: Service named started successfully
:: [ 10:36:43 ] :: [ BEGIN ] :: Run reproducer :: actually running 'timeout 3 ruby -rresolv -e 'puts Resolv::DNS.new.getresource("localhost.", Resolv::DNS::Resource::IN::A).address' 2>&1 | tee output.txt'
127.0.0.1
:: [ 10:36:43 ] :: [ PASS ] :: Run reproducer (Expected 0, got 0)
:: [ 10:36:43 ] :: [ PASS ] :: File 'output.txt' should contain '127.0.0.1'
Redirecting to /bin/systemctl status named.service
Redirecting to /bin/systemctl stop named.service
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 0s
:: Assertions: 2 good, 0 bad
:: RESULT: PASS
OLD FAIL:
Version:
rh-ruby27-ruby-2.7.1-128.el7
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [ 07:13:16 ] :: [ INFO ] :: using '/var/tmp/beakerlib-50233001/backup' as backup destination
Redirecting to /bin/systemctl status named.service
Redirecting to /bin/systemctl start named.service
:: [ 07:13:16 ] :: [ LOG ] :: rlServiceStart: Service named started successfully
:: [ 07:13:16 ] :: [ BEGIN ] :: Run reproducer :: actually running 'timeout 3 ruby -rresolv -e 'puts Resolv::DNS.new.getresource("localhost.", Resolv::DNS::Resource::IN::A).address' 2>&1 | tee output.txt'
:: [ 07:13:19 ] :: [ FAIL ] :: Run reproducer (Expected 0, got 124)
:: [ 07:13:19 ] :: [ FAIL ] :: File 'output.txt' should contain '127.0.0.1'
Redirecting to /bin/systemctl status named.service
Redirecting to /bin/systemctl stop named.service
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Duration: 3s
:: Assertions: 0 good, 2 bad
:: RESULT: FAIL (Test)
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: rh-ruby27-ruby security, bug fix, and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:2229 |
Description of problem: Resolv::DNS does not return any results under those conditions: there are at least two name servers (in /etc/resolv.conf). The name servers have IPv6 addresses containing leading zeros. Example resolv.conf: nameserver 2001:0db8::0001:1 nameserver 2001:0db8::0002:1 This is caused by a mismatch in representation of the address: Requester::sender_for compares the address of the answering server (e.g. 2001:0db8::1:1) with the address the request was sent to (e.g. 2001:0db8::0001:1). Version-Release number of selected component (if applicable): ruby-libs-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64 How reproducible: We reproduced this by running puppet_facts on OSP 16.1 Steps to Reproduce: You can see the difference in timing when the ipa facts are pre-populated (the DNS lookup is skipped) or not: [root@]# time FACTER_ipa_domain='' FACTER_ipa_server='' puppet facts >/dev/null real 0m2.367s user 0m1.746s sys 0m0.392s [root@]# time puppet facts >/dev/null real 1m22.435s user 0m1.735s sys 0m0.428s Additional info: See https://bugzilla.redhat.com/show_bug.cgi?id=1916404 This was fixed in https://bugs.ruby-lang.org/issues/16439