Skip to content

Commit

Permalink
Raise VolumeNotFound with correct volume_id
Browse files Browse the repository at this point in the history
Make sure VolumeNotFound is raised with the correct volume_id
in the SolidFire driver. Some exceptions were wrongfully referring
to an undefined variable named uuid.

Fixes: bug #1182966
Change-Id: Ied101fc9778f51dfb74b39f466c2c13d6e775a40
  • Loading branch information
mgagne authored and Zhiteng Huang committed Oct 12, 2013
1 parent 22c53d6 commit c297f27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cinder/volume/drivers/solidfire.py
Expand Up @@ -298,7 +298,7 @@ def _get_model_info(self, sfaccount, sf_volume_id):
if not found_volume:
LOG.error(_('Failed to retrieve volume SolidFire-'
'ID: %s in get_by_account!') % sf_volume_id)
raise exception.VolumeNotFound(volume_id=uuid)
raise exception.VolumeNotFound(volume_id=sf_volume_id)

model_update = {}
# NOTE(john-griffith): SF volumes are always at lun 0
Expand Down Expand Up @@ -327,7 +327,7 @@ def _do_clone_volume(self, src_uuid, src_project_id, v_ref):

sf_vol = self._get_sf_volume(src_uuid, params)
if sf_vol is None:
raise exception.VolumeNotFound(volume_id=uuid)
raise exception.VolumeNotFound(volume_id=src_uuid)

if src_project_id != v_ref['project_id']:
sfaccount = self._create_sfaccount(v_ref['project_id'])
Expand Down

0 comments on commit c297f27

Please sign in to comment.