This issue happens to available volumes migrating from one LVM VG to another VG on the same host. The method copy_volume using dd command has no exception handling provided, so if the dd fails by accident, the destination volume created in dest VG still remains.
Propose to fix:
Add a try and catch block to copy_volume, and remove the dest volume in the exception handling part.
Background: I identified some critical issues and unreasonable code behaviors during my test of volume migration. My initial plan was to fix them in my blueprint of volume migration improvement. However, there is only one week left for the feature acceptance and some of my major patches may not make into master in L release, so I decide to log these issues on by one and get them fixed as soon as possible in L release.
@mtanimo, @jbernard, and @every migration contributor, some of your undergoing patches may cover these issues, but as I claimed above, major feature patches may miss the deadline of L release. Feel free to reach out to me for any migration issues. Thank you for your support.
@Every Cinder contributor, thank you for you understanding.
The code in https:/ /review. openstack. org/#/c/ 187270/ should resolve this.