does not retry temporary failures

Bug #524980 reported by Kees Cook
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lazr.restfulclient
Triaged
High
Unassigned
lazr.restfulclient (Ubuntu)
Fix Released
Medium
James Westby
Lucid
Fix Released
Medium
James Westby

Bug Description

lazr.restfulclient when used on LP will frequently explode due to HTTP 502 or 503 errors that could be avoided if a given request were retried. This should be handled in the restfulclient code so that callers do not have to catch and retry on 502/503. E.g.:

Traceback (most recent call last):
  File "./d2u.py", line 332, in <module>
    if __name__ == '__main__': main()
  File "./d2u.py", line 238, in main
    if source.distro_series.active:
  File "/usr/lib/pymodules/python2.6/lazr/restfulclient/resource.py", line 587,
in __getattr__
    return super(Entry, self).__getattr__(name)
  File "/usr/lib/pymodules/python2.6/lazr/restfulclient/resource.py", line 302,
in __getattr__
    return self.lp_get_parameter(attr)
  File "/usr/lib/pymodules/python2.6/lazr/restfulclient/resource.py", line 193,
in lp_get_parameter
    self._ensure_representation()
  File "/usr/lib/pymodules/python2.6/lazr/restfulclient/resource.py", line 332,
in _ensure_representation
    representation = self._root._browser.get(self._wadl_resource)
  File "/usr/lib/pymodules/python2.6/lazr/restfulclient/_browser.py", line 227,
in get
    response, content = self._request(url, extra_headers=headers)
  File "/usr/lib/pymodules/python2.6/lazr/restfulclient/_browser.py", line 217,
in _request
    raise HTTPError(response, content)
lazr.restfulclient.errors.HTTPError: HTTP Error 503: Service Unavailable

Revision history for this message
Kees Cook (kees) wrote :

This is a proposed solution...

Changed in lazr.restfulclient (Ubuntu Lucid):
importance: Undecided → Medium
milestone: none → ubuntu-10.04-beta-1
assignee: nobody → James Westby (james-w)
Revision history for this message
Kees Cook (kees) wrote :
Revision history for this message
James Westby (james-w) wrote :

Hi Leonard,

What do you think of this patch?

Thanks,

James

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

This bug was fixed in the package lazr.restfulclient - 0.9.11-1ubuntu1

---------------
lazr.restfulclient (0.9.11-1ubuntu1) lucid; urgency=low

  * debian/patches/perform_retries.patch: retry certain failure codes for
    a few seconds to avoid timeouts and gateway failures on Launchpad
    (LP: #524980).
 -- Kees Cook <email address hidden> Sat, 02 Mar 2010 09:44:08 -0800

Changed in lazr.restfulclient (Ubuntu Lucid):
status: New → Fix Released
Gary Poster (gary)
Changed in lazr.restfulclient:
status: New → Triaged
importance: Undecided → High
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.