utils.renamer() can raise tracebacks

Bug #1748313 reported by John Dickinson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
New
Low
Unassigned

Bug Description

seen on a quarantined container db:

[user@host /srv/node/d1986/quarantined/containers/ab8891de9884920a8869f48afd9b1fde 116]% sudo swift-container-info ab8891de9884920a8869f48afd9b1fde.db
Traceback (most recent call last):
  File "/opt/ss/bin/swift-container-info", line 47, in <module>
    run_print_info(args, vars(options))
  File "/opt/ss/bin/swift-container-info", line 23, in run_print_info
    print_info('container', *args, **opts)
  File "/opt/ss/lib/python2.7/site-packages/swift/cli/info.py", line 382, in print_info
    info = broker.get_info()
  File "/opt/ss/lib/python2.7/site-packages/swift/container/backend.py", line 499, in get_info
    self._commit_puts_stale_ok()
  File "/opt/ss/lib/python2.7/site-packages/swift/common/db.py", line 636, in _commit_puts_stale_ok
    self._commit_puts()
  File "/opt/ss/lib/python2.7/site-packages/swift/common/db.py", line 619, in _commit_puts
    self.merge_items(item_list)
  File "/opt/ss/lib/python2.7/site-packages/swift/container/backend.py", line 895, in merge_items
    return _really_merge_items(conn)
  File "/opt/ss/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/opt/ss/lib/python2.7/site-packages/swift/common/db.py", line 385, in get
    self.possibly_quarantine(*sys.exc_info())
  File "/opt/ss/lib/python2.7/site-packages/swift/common/db.py", line 350, in possibly_quarantine
    renamer(self.db_dir, quar_path, fsync=False)
  File "/opt/ss/lib/python2.7/site-packages/swift/common/utils.py", line 1240, in renamer
    os.rename(old, new)
OSError: [Errno 16] Device or resource busy

The culprit seems to be the os.rename() call inside of the exception handler in the utils.renamer() method.

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.