python-dns timeout if any (but not all) nameservers fail to answer

Bug #1209071 reported by Scott Kitterman
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
py3dns
Fix Released
High
Scott Kitterman
py3dns (Debian)
Fix Released
Unknown
py3dns (Ubuntu)
Fix Released
High
Scott Kitterman
Lucid
Invalid
Undecided
Unassigned
Precise
Won't Fix
Undecided
Unassigned
Quantal
Won't Fix
Undecided
Unassigned
Raring
Won't Fix
Undecided
Unassigned
Saucy
Fix Released
High
Scott Kitterman
python-dns (Debian)
Fix Released
Unknown
python-dns (Ubuntu)
Fix Released
Undecided
Scott Kitterman
Lucid
Won't Fix
Undecided
Unassigned
Precise
Fix Released
Undecided
Scott Kitterman
Quantal
Won't Fix
Undecided
Unassigned
Raring
Won't Fix
Undecided
Unassigned
Saucy
Fix Released
Undecided
Scott Kitterman

Bug Description

Python-dns will always try queries against all nameservers listed in /etc/resolv.conf, even if it already got an answer. If any of them fail to answer, it will raise a Timeout error. Obviously this is roughly the opposite of what's supposed to happen.

[Impact]

This changes the DNS failure mode to failing if ALL nameservers fail to answer to failing if ANY nameserver fails to answer. Impacts reliability of the system. In the case of the bug reported in Debian, it was causing mail delivery failures.

[Test Case]

 * Add an invalid nameserver to /etc/resolv.conf.
 * Run /usr/share/doc/python-dns/examples/test5.py $domain_name
 * It should end in a traceback and a Timeout error after about 30 seconds.
 * Install the updated package
 * Run the test again
 * It will either return quickly or after some delay with an answer to the query (depending on if the failed nameserver is listed first or not). If it doesn't eventually traceback, the fix is verified.

[Regression Potential]

 * The regression potential of the bug is negligible. I've tested this with many possible combinations of resolv.conf configurations and upstream has reviewed/accepted the patch.

Revision history for this message
Scott Kitterman (kitterman) wrote :

Note: I only intend to SRU this for precise.

Changed in python-dns (Ubuntu Lucid):
status: New → Won't Fix
Changed in python-dns (Ubuntu Quantal):
status: New → Won't Fix
Changed in python-dns (Ubuntu Raring):
status: New → Won't Fix
Changed in python-dns (Ubuntu Precise):
status: New → In Progress
Changed in python-dns (Ubuntu Saucy):
status: New → In Progress
Changed in python-dns (Ubuntu Precise):
assignee: nobody → Scott Kitterman (kitterman)
Changed in python-dns (Ubuntu Saucy):
assignee: nobody → Scott Kitterman (kitterman)
Changed in python-dns (Ubuntu Precise):
milestone: none → precise-updates
Changed in python-dns (Debian):
status: Unknown → Fix Released
Changed in py3dns:
status: New → Fix Committed
assignee: nobody → Scott Kitterman (kitterman)
importance: Undecided → High
Changed in py3dns (Debian):
status: Unknown → New
Revision history for this message
Scott Kitterman (kitterman) wrote :

Fixed in 3.0.4.

Changed in py3dns:
status: Fix Committed → Fix Released
Changed in py3dns (Ubuntu Lucid):
status: New → Invalid
Changed in py3dns (Ubuntu Precise):
status: New → Won't Fix
Changed in py3dns (Ubuntu Quantal):
status: New → Won't Fix
Changed in py3dns (Ubuntu Raring):
status: New → Won't Fix
Changed in py3dns (Ubuntu Saucy):
assignee: nobody → Scott Kitterman (kitterman)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Scott Kitterman (kitterman) wrote :

Synced from Debian.

Changed in python-dns (Ubuntu Saucy):
status: In Progress → Fix Released
Changed in py3dns (Debian):
status: New → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote : Please test proposed package

Hello Scott, or anyone else affected,

Accepted python-dns into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/python-dns/2.3.6-1.12.04 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in python-dns (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Scott Kitterman (kitterman) wrote :

Did the test case and it works as advertised after updating (and not before).

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-dns - 2.3.6-1.12.04

---------------
python-dns (2.3.6-1.12.04) precise-proposed; urgency=low

  * Add debian/patches/pydns_timeout.patch to fix timeouts associated with
     only one of several available nameservers being unavailable
     (LP: #1209071):
     - Only raise timeout error after trying all available servers
     - Stop lookups once an answer is gotten
 -- Scott Kitterman <email address hidden> Tue, 06 Aug 2013 23:30:26 -0400

Changed in python-dns (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Scott Kitterman (kitterman) wrote :

Fixed in 3.0.4-1 synced from Debian.

Changed in py3dns (Ubuntu Saucy):
status: In Progress → Fix Released
Changed in py3dns (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.