Previously, if the call to Cinder in _post_live_migration failed, the
exception went unhandled and prevented us from calling
post_live_migration_at_destination - which is where we set instance
host and task state. This left the system in an inconsistent state,
with the instance actually running on the destination, but
with instance.host still set to the source. This patch simply wraps
the Cinder API calls in a try/except, and logs the exception instead
of blowing up. While "dumb", this has the virtue of being simple and
minimizing potential side effects. A comprehensive refactoring of
when, where and how we set instance host and task state to try to
guarantee consistency is left as a TODO.
Partial-bug: 1628606
Change-Id: Icb0bdaf454935b3713c35339394d260b33520de5
(cherry picked from commit 5513f48dea529fe4e690f50a462300129594210c)
Reviewed: https:/ /review. openstack. org/611083 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=cf3c2f391ad 0f9d2a2d9424750 9bcb2709413e4f
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit cf3c2f391ad0f9d 2a2d94247509bcb 2709413e4f
Author: Artom Lifshitz <email address hidden>
Date: Wed Oct 10 14:53:14 2018 -0400
Handle volume API failure in _post_live_ migration
Previously, if the call to Cinder in _post_live_ migration failed, the live_migration_ at_destination - which is where we set instance
exception went unhandled and prevented us from calling
post_
host and task state. This left the system in an inconsistent state,
with the instance actually running on the destination, but
with instance.host still set to the source. This patch simply wraps
the Cinder API calls in a try/except, and logs the exception instead
of blowing up. While "dumb", this has the virtue of being simple and
minimizing potential side effects. A comprehensive refactoring of
when, where and how we set instance host and task state to try to
guarantee consistency is left as a TODO.
Partial-bug: 1628606 3713c35339394d2 60b33520de5 4e690f50a462300 129594210c)
Change-Id: Icb0bdaf454935b
(cherry picked from commit 5513f48dea529fe