From defe542eb130cd9ad621493fbf98a6a3458c4169 Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Sat, 6 Jul 2019 00:31:40 -0700 Subject: [PATCH] Nova compute: add in log exception to help debug failures When the system is under load, there can be boot failures. One exception seen in the log file is: ''NoneType' object has no attribute 'status_code'' There is no log trace which helps pinpoint this client call. Note that this is only one example. We now add in a LOG.exception to have the stack trace. Related-Bug: #1850682 Change-Id: I2ab56005db363f81eecf07c3db62c267ba7f8ca9 (cherry picked from commit 9062fd392374f546da58651a785f47c3906204dc) (cherry picked from commit 35b5dc0d9793742d759a8cae2de33f450c75f2a1) --- nova/compute/manager.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 0c0b704edf41..d0d4e3aff772 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -2440,6 +2440,8 @@ class ComputeManager(manager.Manager): raise exception.BuildAbortException(instance_uuid=instance.uuid, reason=e.format_message()) except Exception as e: + LOG.exception('Failed to build and run instance', + instance=instance) self._notify_about_instance_usage(context, instance, 'create.error', fault=e) tb = traceback.format_exc()