commit 4b53e4edf9f7f8c794316d3a0920d727723d1bab
Author: Matthew Booth <email address hidden>
Date: Tue Jun 26 14:42:47 2018 +0100
Ensure attachment cleanup on failure in driver.pre_live_migration
Previously, if the call to driver.pre_live_migration failed (which in
libvirt can happen with a DestinationDiskExists exception), the
compute manager wouldn't rollback/cleanup volume attachments, leading
to corrupt volume attachment information, and, depending on the
backend, the instance being unable to access its volume. This patch
moves the driver.pre_live_migration call inside the existing
try/except, allowing the compute manager to properly rollback/cleanup
volume attachments.
The compute manager has its own _rollback_live_migration() cleanup in
case the pre_live_migration() RPC call to the destination fails. There
should be no conflicts between the cleanup in that and the new volume
cleanup in the except block. The remove_volume_connection() ->
driver_detach() -> detach_volume() call catches the InstanceNotFound
exception and warns about the instance disappearing (it was never
really on the destination in the first place). The attachment_delete()
in _rollback_live_migration() is contingent on there being an
old_vol_attachment in migrate_data, which there isn't because
pre_live_migration() raised instead of returning.
Conflicts in nova/compute/manager.py due to absence of setting
migrate_data.wait_for_vif_plug from 5aadff75c3a.
Change-Id: I67f66e95d69ae6df22e539550a3eac697ea8f5d8
Closes-bug: 1778206
(cherry picked from commit 1a29248d5e688ba1d4f806895dccd45fcb34b833)
(cherry picked from commit 6aecf475dbff9c7d477378c021749b987d47deae)
Reviewed: https:/ /review. openstack. org/612774 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=4b53e4edf9f 7f8c794316d3a09 20d727723d1bab
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 4b53e4edf9f7f8c 794316d3a0920d7 27723d1bab
Author: Matthew Booth <email address hidden>
Date: Tue Jun 26 14:42:47 2018 +0100
Ensure attachment cleanup on failure in driver. pre_live_ migration
Previously, if the call to driver. pre_live_ migration failed (which in Exists exception), the pre_live_ migration call inside the existing
libvirt can happen with a DestinationDisk
compute manager wouldn't rollback/cleanup volume attachments, leading
to corrupt volume attachment information, and, depending on the
backend, the instance being unable to access its volume. This patch
moves the driver.
try/except, allowing the compute manager to properly rollback/cleanup
volume attachments.
The compute manager has its own _rollback_ live_migration( ) cleanup in migration( ) RPC call to the destination fails. There volume_ connection( ) -> live_migration( ) is contingent on there being an vol_attachment in migrate_data, which there isn't because live_migration( ) raised instead of returning.
case the pre_live_
should be no conflicts between the cleanup in that and the new volume
cleanup in the except block. The remove_
driver_detach() -> detach_volume() call catches the InstanceNotFound
exception and warns about the instance disappearing (it was never
really on the destination in the first place). The attachment_delete()
in _rollback_
old_
pre_
Conflicts in nova/compute/ manager. py due to absence of setting data.wait_ for_vif_ plug from 5aadff75c3a.
migrate_
Change-Id: I67f66e95d69ae6 df22e539550a3ea c697ea8f5d8 1d4f806895dccd4 5fcb34b833) d477378c021749b 987d47deae)
Closes-bug: 1778206
(cherry picked from commit 1a29248d5e688ba
(cherry picked from commit 6aecf475dbff9c7