]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Delete the temporary volume if migration fails
authorVincent Hou <sbhou@cn.ibm.com>
Tue, 3 Mar 2015 08:04:41 +0000 (16:04 +0800)
committerVincent Hou <sbhou@cn.ibm.com>
Wed, 8 Apr 2015 07:33:40 +0000 (15:33 +0800)
commit5221f181f305336a7a14851e89764af2a3a5bba1
tree2a62910cbe033cdc258080f09254515744bb572b
parent1c06834e8c0c7f4a55103cdcc08744e52f0d234d
Delete the temporary volume if migration fails

Issues resolved in this patch include the following changes:
* A temporary volume is created on the destination host before migrating
the data from the source. However, if the creation of this volume fails,
its record will be left in the database as redundant information. This
patch will remove the database record if the creation fails.

* If attaching the remote dest volme fails at initialize_connection
due to timeout, we need to terminate the connection. Otherwise, the dest
volume will not be released and successfully deleted.

Closes-bug: #1398177
Change-Id: I5bc75bd7652841fddd66481ee001fb682168215c
cinder/tests/test_volume.py
cinder/volume/driver.py
cinder/volume/manager.py