librarian-gc crashes on segmented Swift files

Bug #1642411 reported by William Grant on 2016-11-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Critical
William Grant

Bug Description

librarian-gc crashes when delete_unwanted_files runs into a segment of a large Swift object. delete_unwanted_swift_files handles them OK, but the underlying swift_files crashes during sort.

2016-11-16 03:49:21 ERROR Unhandled exception
Traceback (most recent call last):
  File "/srv/launchpadlibrarian.net/production/launchpad2-rev-18255/lib/lp/services/scripts/base.py", line 103, in log_unhandled_exceptions_func
    return func(self, *args, **kw)
  File "/srv/launchpadlibrarian.net/production/launchpad2-rev-18255/lib/lp/services/scripts/base.py", line 371, in lock_and_run
    self.run(use_web_security=use_web_security, isolation=isolation)
  File "/srv/launchpadlibrarian.net/production/launchpad2-rev-18255/lib/lp/services/scripts/base.py", line 103, in log_unhandled_exceptions_func
    return func(self, *args, **kw)
  File "/srv/launchpadlibrarian.net/production/launchpad2-rev-18255/lib/lp/services/scripts/base.py", line 325, in run
    self.main()
  File "/srv/launchpadlibrarian.net/production/launchpad2/cronscripts/librarian-gc.py", line 92, in main
    librariangc.delete_unwanted_files(conn)
  File "/srv/launchpadlibrarian.net/production/launchpad2-rev-18255/lib/lp/services/librarianserver/librariangc.py", line 582, in delete_unwanted_files
    delete_unwanted_swift_files(con)
  File "/srv/launchpadlibrarian.net/production/launchpad2-rev-18255/lib/lp/services/librarianserver/librariangc.py", line 764, in delete_unwanted_swift_files
    for container, obj in swift_files(max_lfc_id):
  File "/srv/launchpadlibrarian.net/production/launchpad2-rev-18255/lib/lp/services/librarianserver/librariangc.py", line 728, in swift_files
    key=lambda x: int(x['name']))
  File "/srv/launchpadlibrarian.net/production/launchpad2-rev-18255/lib/lp/services/librarianserver/librariangc.py", line 728, in <lambda>
    key=lambda x: int(x['name']))
ValueError: invalid literal for int() with base 10: '3114445005/0000'

Related branches

William Grant (wgrant) on 2016-11-16
Changed in launchpad:
assignee: nobody → William Grant (wgrant)
status: Triaged → In Progress
Launchpad QA Bot (lpqabot) wrote :
tags: added: qa-needstesting
Changed in launchpad:
status: In Progress → Fix Committed
William Grant (wgrant) on 2016-11-17
tags: added: qa-ok
removed: qa-needstesting
Colin Watson (cjwatson) on 2016-11-24
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers