Add exception log when migrate action failed

As of now we can not know what was happend when migrate action
failed critically.
This patch adds exception log when migrate action failed critically.

Change-Id: I54d0bc54ee1df6f13754771775c58255f53f5008
This commit is contained in:
Hidekazu Nakamura 2017-09-28 11:56:29 +09:00
parent ee36bb8180
commit 35e502f666

View File

@ -124,7 +124,8 @@ class Migrate(base.BaseAction):
LOG.debug("Nova client exception occurred while live "
"migrating instance %s.Exception: %s" %
(self.instance_uuid, e))
except Exception:
except Exception as e:
LOG.exception(e)
LOG.critical("Unexpected error occurred. Migration failed for "
"instance %s. Leaving instance on previous "
"host.", self.instance_uuid)