Log the compute ID when nova fails

When nova fails to successfuly start an amphora and we hit our
ComputeWaitTimeoutException, currently it's hard to see the compute
ID nova issued us. This patch includes it in the exception message
so we can track the ID back into the nova logs to see why nova
failed.

Change-Id: I3e89ac3aae526b8d705a408e7c0a9eaba6bca193
This commit is contained in:
Michael Johnson 2018-11-07 16:47:52 -08:00
parent 5bd7cc7cb4
commit fc7bbd7599
2 changed files with 2 additions and 2 deletions

View File

@ -229,7 +229,7 @@ class GlanceNoTaggedImages(OctaviaException):
# normal part of operation while waiting for compute to go active
# on the instance
class ComputeWaitTimeoutException(OctaviaException):
message = _('Waiting for compute to go active timeout.')
message = _('Waiting for compute id %(id)s to go active timeout.')
class InvalidTopology(OctaviaException):

View File

@ -191,7 +191,7 @@ class ComputeActiveWait(BaseComputeTask):
raise exceptions.ComputeBuildException(fault=fault)
time.sleep(CONF.controller_worker.amp_active_wait_sec)
raise exceptions.ComputeWaitTimeoutException()
raise exceptions.ComputeWaitTimeoutException(id=compute_id)
class NovaServerGroupCreate(BaseComputeTask):