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)
(cherry picked from commit cf3c2f391ad0f9d2a2d94247509bcb2709413e4f)
Reviewed: https:/ /review. openstack. org/611084 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=53f9c8e5104 076872021ed33e2 21e5526ca5059b
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 53f9c8e51040768 72021ed33e221e5 526ca5059b
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) 2a2d94247509bcb 2709413e4f)
Change-Id: Icb0bdaf454935b
(cherry picked from commit 5513f48dea529fe
(cherry picked from commit cf3c2f391ad0f9d