summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Gandelman <adamg@ubuntu.com>2014-03-25 16:43:21 -0700
committerAdam Gandelman <adamg@ubuntu.com>2014-03-27 12:22:21 -0700
commitbb05b189d175c0e590074646d661981a40c0bb28 (patch)
tree1682d53d167c892027a3a1a7df4750b99fb7c6c7
parentf1e702c35719407db0a77684294cdb4e73a461c3 (diff)
downloadironic-bb05b189d175c0e590074646d661981a40c0bb28.tar.gz
Raise unexpected exceptions during destroy()
Do not match exception by __name__ When an API request throws an unexpected exception. Avoids nova-compute AttributeError traceback and provides better debug info on the nova side. Change-Id: I2886df814e8641717c57f77626f92917d1ff744c Closes-bug: #1297549
-rw-r--r--ironic/nova/virt/ironic/driver.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ironic/nova/virt/ironic/driver.py b/ironic/nova/virt/ironic/driver.py
index 1976c7f6b..9cee7ccde 100644
--- a/ironic/nova/virt/ironic/driver.py
+++ b/ironic/nova/virt/ironic/driver.py
@@ -500,8 +500,10 @@ class IronicDriver(virt_driver.ComputeDriver):
# This should be fixed in Ironic.
# TODO(deva): This exception should be added to python-ironicclient
# and matched directly, rather than via __name__.
- if e.__name__ == 'InstanceDeployFailure':
+ if getattr(e, '__name__', None) == 'InstanceDeployFailure':
pass
+ else:
+ raise
def _wait_for_provision_state():
try: