Skip to content

Commit

Permalink
Fixes call VolumeNotFound in the invalid argument
Browse files Browse the repository at this point in the history
A mapping key of 'volume_id' is ignored when we use the non keyword
argument. Thus information in 'volume_id' is lost.  Similarly, in the
case of exception.SnapshotNotFound, information in 'snapshot_id' is
lost.

Change-Id: I1a704cc1866ad9b0d9578e16e77c376a77ea5b3e
Closes-Bug: #1226442
  • Loading branch information
KIYOHIRO ADACHI committed Sep 18, 2013
1 parent 27d658a commit a8fcfdb
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions cinder/volume/drivers/storwize_svc.py
Expand Up @@ -1162,15 +1162,14 @@ def _create_copy(self, src_vdisk, tgt_vdisk, full_copy, opts, src_id,
src_vdisk_attributes = self._get_vdisk_attributes(src_vdisk)
if src_vdisk_attributes is None:
exception_msg = (
_('_create_copy: Source vdisk %s does not exist')
% src_vdisk)
_('_create_copy: Source vdisk %(src_vdisk)s (%(src_id)s) '
'does not exist')
% {'src_vdisk': src_vdisk, 'src_id': src_id})
LOG.error(exception_msg)
if from_vol:
raise exception.VolumeNotFound(exception_msg,
volume_id=src_id)
raise exception.VolumeNotFound(volume_id=src_id)
else:
raise exception.SnapshotNotFound(exception_msg,
snapshot_id=src_id)
raise exception.SnapshotNotFound(snapshot_id=src_id)

self._driver_assert(
'capacity' in src_vdisk_attributes,
Expand Down

0 comments on commit a8fcfdb

Please sign in to comment.