In VolumeManager.migrate_volume_completion(), when volume_status is not
'retyping', status_update is not set. However, status_update is always
referenced as dictionary on volume deletion path, so it fails to delete
migration source volume. This patch fixes the issue.
Change-Id: I06889dae326b9557e044f1712d9f3205bb68a953
Closes-Bug:
1344341
# Delete the source volume (if it fails, don't fail the migration)
try:
- if status_update['status'] == 'in-use':
+ if status_update and status_update['status'] == 'in-use':
self.detach_volume(ctxt, volume_id)
self.delete_volume(ctxt, volume_id)
except Exception as ex: