From 94bd464ce88fdbd43aa46d61ad625aa06e1b5278 Mon Sep 17 00:00:00 2001 From: Ruby Loo Date: Tue, 31 Jan 2017 20:13:45 +0000 Subject: [PATCH] Log reason for hardware type registration failure The log string 'Failed to register hardware types' doesn't provide much help as to what went wrong. This adds the reason (exception message) to the log. Change-Id: I941e35473f48c636134d5df31087d0ddbcacf44a Partial-Bug: #1524745 --- ironic/conductor/base_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ironic/conductor/base_manager.py b/ironic/conductor/base_manager.py index 0957923b2e..30b9f2dc0e 100644 --- a/ironic/conductor/base_manager.py +++ b/ironic/conductor/base_manager.py @@ -154,9 +154,9 @@ class BaseConductorManager(object): self._register_and_validate_hardware_interfaces() except (exception.DriverLoadError, exception.DriverNotFound, exception.ConductorHardwareInterfacesAlreadyRegistered, - exception.InterfaceNotFoundInEntrypoint): + exception.InterfaceNotFoundInEntrypoint) as e: with excutils.save_and_reraise_exception(): - LOG.error(_LE('Failed to register hardware types')) + LOG.error(_LE('Failed to register hardware types. %s'), e) self.del_host() # TODO(jroll) validate here that at least one driver OR