]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Set volume_attachment to [] for the temporary volume creation
authorVincent Hou <sbhou@cn.ibm.com>
Tue, 24 Mar 2015 08:30:13 +0000 (16:30 +0800)
committerVincent Hou <sbhou@cn.ibm.com>
Thu, 2 Apr 2015 02:08:34 +0000 (10:08 +0800)
commitf7eb9bd06b153817f0424219165619f0092d4894
treeb8f6cefa2cd2f76368e480ab44305045c43cfd5f
parentebe3234d9efc949979dd8097ab25e70b6c5ff09b
Set volume_attachment to [] for the temporary volume creation

A new table volume_attachment has been added recently. During the
creation of the temporary volume in migration, the attribute
volume_attachment is not empty if an attached volume is going to be
migrated, because all the properties are simply copied.
This non-empty attribute volume_attachment leads to the failure of
the volume creation. This patch removes this attribute before the
temporary volume creation.

Besides, detach the volume should consider multi-attach as well by
adding the attachment id parameter.

Change-Id: I7c2f69945ee8d72b2dba4e68a91b872207df5310
Closes-bug: #1433019
cinder/tests/test_volume.py
cinder/volume/manager.py