]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Make migration's volume source deletion async
authorGorka Eguileor <geguileo@redhat.com>
Mon, 10 Aug 2015 16:37:27 +0000 (18:37 +0200)
committerGorka Eguileor <geguileo@redhat.com>
Tue, 18 Aug 2015 10:00:13 +0000 (12:00 +0200)
commitcdf5e92f10fe8d097f91f6f63a2c77f6ab2bcdb8
treee3eb13b37f5366b960efa98a8ae54921c8a561fa
parent122c3da26bb4e100f71e4250bfc28f4495b41529
Make migration's volume source deletion async

Currently source volume deletion on a volume migration (and therefore on
retype with migration as well) is synchronous and that has 2 problems:

1. If the deletion takes more than rpc_response_timeout then when
performed on in-use volumes it will fail.

2. If the deletion fails then the volume will be left in the back-end
and Cinder will no longer have a reference of that volume in the DB.

This patch makes source volume deletion asynchronous resolving both
issues.

Closes-Bug: #1483155
Closes-Bug: #1483157
Change-Id: I55c3d86660f90044a56b8609bb5774d4f5481227
cinder/db/sqlalchemy/api.py
cinder/tests/unit/db/test_finish_migration.py
cinder/tests/unit/test_volume.py
cinder/volume/api.py
cinder/volume/manager.py