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
This commit is contained in:
arunmani 2018-10-04 12:37:08 -04:00 committed by Arun Mani
parent dadcea3a6b
commit f7c7051ee9
1 changed files with 1 additions and 1 deletions

View File

@ -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.