librarian failures cause poimport to mark imports as failed (rather than waiting a while and retrying)

Bug #223667 reported by Carlos Perelló Marín
6
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
High
Unassigned

Bug Description

When librarian is down, poimport script fails with a backtrace like:

2008-04-28 13:22:07 ERROR Got an unexpected exception while importing Lao (lo) translation of sw-frmdlg in Ubuntu Hardy package "openoffice.org"
Traceback (most recent call last):
  File "/srv/launchpad.net/production/launchpad/cronscripts/../lib/canonical/launchpad/scripts/po_import.py", line 102, in run
    (mail_subject, mail_body) = (
  File "/srv/launchpad.net/production/launchpad/cronscripts/../lib/canonical/launchpad/database/pofile.py", line 703, in importFromQueue
    import_file = librarian_client.getFileByAlias(
  File "/srv/launchpad.net/production/launchpad/cronscripts/../lib/canonical/librarian/client.py", line 312, in getFileByAlias
    return _File(urllib2.urlopen(url))
  File "/usr/lib/python2.4/urllib2.py", line 130, in urlopen
    return _opener.open(url, data)
  File "/usr/lib/python2.4/urllib2.py", line 364, in open
    response = meth(req, response)
  File "/usr/lib/python2.4/urllib2.py", line 471, in http_response
    response = self.parent.error(
  File "/usr/lib/python2.4/urllib2.py", line 402, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.4/urllib2.py", line 337, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.4/urllib2.py", line 480, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 502: Bad Gateway

This produces that we set the status of that import to 'FAILED'. Instead, given that no imports will success with Librarian being down, we should stop the script so it can resume its work in a future execution once Librarian is back to normality.

Changed in rosetta:
status: New → Confirmed
Changed in rosetta:
importance: Undecided → Medium
visibility: private → public
Changed in launchpad:
importance: Medium → High
summary: - Don't set imports as FAILED if librarian is unavailable
+ librarian failures cause poimport to mark imports as failed (rather than
+ waiting a while and retrying)
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.