exceptions get eaten during image register failures

Bug #827024 reported by Vish Ishaya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Vish Ishaya

Bug Description

When image register fails, the underlying exception gets eaten because out of scope variables are being referenced in the error log.

2011-08-15 14:36:10,385 DEBUG nova.utils [-] Running cmd (subprocess): openssl enc -d -aes-128-cbc -in /tmp/tmpIHkMkG/image.encrypted -K 57fbea5c3e106e0e6aec2d89ef5171ea -iv 77f27e730c319a341782b091b97216a5 -out /tmp/tmpIHkMkG/image.tar.gz from (pid=16720) execute /home/ctoteam/nova/nova/utils.py:143Traceback (most recent call last): File "/usr/lib/python2.6/logging/__init__.py", line 776, in emit msg = self.format(record) File "/usr/lib/python2.6/logging/__init__.py", line 654, in format
    return fmt.format(record) File "/home/ctoteam/nova/nova/log.py", line 214, in format
    return logging.Formatter.format(self, record)
  File "/usr/lib/python2.6/logging/__init__.py", line 436, in format
    record.message = record.getMessage()
  File "/usr/lib/python2.6/logging/__init__.py", line 306, in getMessage
    msg = msg % self.args
KeyError: u'image_location'
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/eventlet/hubs/poll.py", line 97, in wait
    readers.get(fileno, noop).cb(fileno)
  File "/home/ctoteam/nova/nova/image/s3.py", line 267, in delayed_create
    raise
TypeError: exceptions must be old-style classes or derived from BaseException, not NoneType
Removing descriptor: 6

Related branches

Changed in nova:
importance: Undecided → Low
assignee: nobody → Vish Ishaya (vishvananda)
status: New → In Progress
Revision history for this message
Vish Ishaya (vishvananda) wrote :

Furthermore, it appears that now that we have an eventlet friendly-db library, we can't do db updates in exception handlers and reraise:

2011-08-15 16:43:30,086 ERROR nova.image.s3 [-] Failed to upload ttbb2/ttylinux-uec-i386-11.2_2.6.35-16_1.img.manifest.xml to /tmp/tmp7jXqlf
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/eventlet/hubs/poll.py", line 97, in wait
    readers.get(fileno, noop).cb(fileno)
  File "/home/ctoteam/nova/nova/image/s3.py", line 271, in delayed_create
    raise
TypeError: exceptions must be old-style classes or derived from BaseException, not NoneType

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → diablo-4
Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-4 → 2011.3
status: Fix Committed → Fix Released
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.