live-migration: Logs exception if operation failed

Live-migration can fail silently, without proper logging, making it
hard to determine the cause of the failure.

Closes-Bug: #1489874

Change-Id: Ib70dafd6fe2658ae9a1a43d177f4ed2c99a10c04
This commit is contained in:
Claudiu Belu 2015-08-27 20:29:36 +03:00 committed by Matt Riedemann
parent 19810750b4
commit 63ba0e4a18
1 changed files with 1 additions and 0 deletions

View File

@ -5005,6 +5005,7 @@ class ComputeManager(manager.Manager):
# Executing live migration
# live_migration might raises exceptions, but
# nothing must be recovered in this version.
LOG.exception(_LE('Live migration failed.'), instance=instance)
with excutils.save_and_reraise_exception():
if migration:
migration.status = 'failed'