cURL caching prevents landscape-broker from working

Bug #522668 reported by Sidnei da Silva
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Landscape Client
Fix Released
Medium
Kevin McDermott
landscape-client (Ubuntu)
Fix Released
Undecided
Unassigned
Jaunty
Fix Released
Undecided
Unassigned
Karmic
Fix Released
Undecided
Unassigned
Lucid
Fix Released
Undecided
Unassigned
Maverick
Fix Released
Undecided
Unassigned

Bug Description

Apparently cURL might be caching failures to resolve DNS for way too long. When looking at my broker logs, I saw the following message repeated many many times:

2010-02-16 09:39:51,198 ERROR [Dummy-1 ] Error contacting the server at https://staging.landscape.canonical.com/message-system.
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/landscape/broker/transport.py", line 63, in exchange
    curly, data = self._curl(spayload, computer_id, message_api)
  File "/usr/lib/python2.6/dist-packages/landscape/broker/transport.py", line 41, in _curl
    headers=headers, cainfo=self._pubkey, curl=curl))
  File "/usr/lib/python2.6/dist-packages/landscape/lib/fetch.py", line 91, in fetch
    raise PyCurlError(e.args[0], e.args[1])
PyCurlError: Error 6: Couldn't resolve host 'staging.landscape.canonical.com'

It's unclear if that's actually related to DNS caching, but it's the best guess so far.

The message below explains the different options for DNS caching, straight from the author:

  http://curl.haxx.se/mail/lib-2002-01/0076.html

Related branches

Revision history for this message
Kevin McDermott (bigkevmcd) wrote :

http://curl.haxx.se/mail/lib-2002-01/0076.html

    curl_easy_setopt(handle, CURLOPT_DNS_CACHE_TIMEOUT, 15);

    With two special cases, 0 and -1... O will completely disable dns
    caching and -1 will make it so that the DNS cache *never* expires.

Changed in landscape-client:
status: New → In Progress
assignee: nobody → Kevin McDermott (bigkevmcd)
milestone: later → 1.4.5
Changed in landscape-client:
status: In Progress → Fix Committed
tags: added: testing
tags: added: needs-testing
Jamu Kakar (jkakar)
tags: removed: testing
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Confirmed code in staging packages. Also induced DNS errors with iptables, and both positive and negative DNS results were not cached, i.e., the client transitioned between both states quickly.

tags: removed: needs-testing
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted landscape-client into karmic-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in landscape-client (Ubuntu Karmic):
status: New → Fix Committed
tags: added: verification-needed
Changed in landscape-client (Ubuntu Jaunty):
status: New → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted landscape-client into jaunty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package landscape-client - 1.5.0.1-0ubuntu0.9.04.0

---------------
landscape-client (1.5.0.1-0ubuntu0.9.04.0) jaunty-proposed; urgency=low

  * New upstream version
    - Fix smart-update failing its very first run (LP: #562496)
    - Depend on pythonX.Y-dbus and pythonX.Y-pycurl (LP: #563063)
    - Make only one request at a time to retrieve EC2 instances (LP: #567515)

  * New upstream version (LP: #557244)
    - Fix package-changer running before smart-update has completed (LP: #542215)
    - Report the version of Eucalyptus used to generate topology data (LP: #554007)
    - Enable the Eucalyptus plugin by default, if supported (LP: #546531)
    - Use a whitelist of allowed filesystem types to instead of a blacklist (LP: #351927)
    - Report the update-manager logs to the server (LP: #503384)
    - Turn off Curl's DNS caching for requests. (LP: #522668)
 -- Free Ekanayaka <email address hidden> Wed, 21 Apr 2010 12:31:28 +0200

Changed in landscape-client (Ubuntu Jaunty):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package landscape-client - 1.5.0.1-0ubuntu0.9.10.0

---------------
landscape-client (1.5.0.1-0ubuntu0.9.10.0) karmic-proposed; urgency=low

  * New upstream version
    - Fix smart-update failing its very first run (LP: #562496)
    - Depend on pythonX.Y-dbus and pythonX.Y-pycurl (LP: #563063)
    - Make only one request at a time to retrieve EC2 instances (LP: #567515)

  * New upstream version (LP: #557244)
    - Fix package-changer running before smart-update has completed (LP: #542215)
    - Report the version of Eucalyptus used to generate topology data (LP: #554007)
    - Enable the Eucalyptus plugin by default, if supported (LP: #546531)
    - Use a whitelist of allowed filesystem types to instead of a blacklist (LP: #351927)
    - Report the update-manager logs to the server (LP: #503384)
    - Turn off Curl's DNS caching for requests. (LP: #522668)
 -- Free Ekanayaka <email address hidden> Wed, 21 Apr 2010 12:31:28 +0200

Changed in landscape-client (Ubuntu Karmic):
status: Fix Committed → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This was released already for the other distros too. A small typo in the changelog prevented it from closing this bug automatically (#522688 was referenced instead of #522668)

Changed in landscape-client (Ubuntu Lucid):
status: New → Fix Released
Changed in landscape-client (Ubuntu Maverick):
status: New → Fix Released
Changed in landscape-client:
status: Fix Committed → Fix Released
tags: removed: verification-needed
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.