From fc7bbd7599b45df24439f2c3581fe894ec8b1eca Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Wed, 7 Nov 2018 16:47:52 -0800 Subject: [PATCH] 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 --- octavia/common/exceptions.py | 2 +- octavia/controller/worker/tasks/compute_tasks.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/octavia/common/exceptions.py b/octavia/common/exceptions.py index 6da0ef42dd..3b31c50d26 100644 --- a/octavia/common/exceptions.py +++ b/octavia/common/exceptions.py @@ -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): diff --git a/octavia/controller/worker/tasks/compute_tasks.py b/octavia/controller/worker/tasks/compute_tasks.py index ccffdc2753..f0e13ab599 100644 --- a/octavia/controller/worker/tasks/compute_tasks.py +++ b/octavia/controller/worker/tasks/compute_tasks.py @@ -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):