From f7c7051ee98f5b61197b7e82cf5eb53d4ab7e68c Mon Sep 17 00:00:00 2001 From: arunmani Date: Thu, 4 Oct 2018 12:37:08 -0400 Subject: [PATCH] Fix message handling with VirtualInterfacePlugException class usage When a VNIC attach fails, the actual error message thrown from the platform gets swallowed in the console showing only the generic message in the exception class. This is due to the formatting string passed to the exception class, though the VirtualInterfacePlugException class definition doesn't accept one. Change-Id: I18be7fc2284387d2f4d492ca68de6091f4bb8b66 Closes-Bug: #1796072 --- nova_powervm/virt/powervm/vif.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova_powervm/virt/powervm/vif.py b/nova_powervm/virt/powervm/vif.py index 38eb97fe..cc6dd2c4 100644 --- a/nova_powervm/virt/powervm/vif.py +++ b/nova_powervm/virt/powervm/vif.py @@ -152,7 +152,7 @@ def plug(adapter, host_uuid, instance, vif, slot_mgr, new_vif=True): # Log the message constructed by HttpError LOG.exception("HttpError during vif plug operation.", instance=instance) - raise exception.VirtualInterfacePlugException(reason=he.args[0]) + raise exception.VirtualInterfacePlugException(message=he.args[0]) # Other exceptions are (hopefully) custom VirtualInterfacePlugException # generated lower in the call stack.