]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Fix retype failure when original has no volume type
authorTom Barron <tpb@dyncloud.net>
Fri, 19 Feb 2016 23:19:14 +0000 (18:19 -0500)
committerRyan McNair <rdmcnair@us.ibm.com>
Mon, 14 Mar 2016 16:15:57 +0000 (16:15 +0000)
commit492b350a3fec957263430a1e67457a7386254c61
tree8bcd2fa517979443215c6f624a7914f23b46deee
parente0c98f0f688be35fb8da2ceda92541927472b422
Fix retype failure when original has no volume type

cinder.objects.volume.Volume.finish_volume_migration()
should skip the volume_type_id field when swapping fields
between "source" and "dest" volumes.  The "dest" volume
has already been created with appropriate volume_type_id
and the "source" may have not have a volume type.

This commit also changes a LOG.error() to a LOG.exception()
in where finish_volume_migration is called in order to
show the exception traceback in its calling context.

Change-Id: I2caf4d3f4aa088d099548e6e88d1776b4cc5810c
Closes-bug: #1547546
cinder/objects/volume.py
cinder/tests/unit/fake_constants.py
cinder/tests/unit/objects/test_volume.py
cinder/volume/manager.py