UnboundLocalError: local variable 'volume' referenced before assignment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Medium
|
ugvddm |
Bug Description
When the driver was not initialized, I uploaded a volume as image into glance, I got some error as follow:
[01;31mException during message handling: local variable 'volume' referenced before assignment^[[00m
^[[01;31m2014-05-25 00:09:40.599 TRACE oslo.messaging.
^[[01;31m2014-05-25 00:09:40.599 TRACE oslo.messaging.
^[[01;31m2014-05-25 00:09:40.599 TRACE oslo.messaging.
^[[01;31m2014-05-25 00:09:40.599 TRACE oslo.messaging.
^[[01;31m2014-05-25 00:09:40.599 TRACE oslo.messaging.
^[[01;31m2014-05-25 00:09:40.599 TRACE oslo.messaging.
^[[01;31m2014-05-25 00:09:40.599 TRACE oslo.messaging.
^[[01;31m2014-05-25 00:09:40.599 TRACE oslo.messaging.
^[[01;31m2014-05-25 00:09:40.599 TRACE oslo.messaging.
^[[01;31m2014-05-25 00:09:40.599 TRACE oslo.messaging.
As we can see the code from cinder/
def copy_volume_
payload = {'volume_id': volume_id, 'image_id': image_meta['id']}
try:
# NOTE(flaper87): Verify the driver is enabled
# before going forward. The exception will be caught
# and the volume status updated.
volume = self.db.
except Exception as error:
with excutils.
finally:
if (volume[
else:
Changed in cinder: | |
assignee: | nobody → ugvddm (271025598-9) |
Changed in cinder: | |
importance: | Undecided → Medium |
milestone: | none → juno-1 |
tags: | added: icehouse-backport-potential |
Changed in cinder: | |
status: | Fix Committed → Fix Released |
Changed in cinder: | |
milestone: | juno-1 → 2014.2 |
Fix proposed to branch: master /review. openstack. org/95371
Review: https:/