Fix extracting nova fault string on build error

There was an edge case where if we were not able to extract nova interface
information our code that extracts the nova fault information would be
bypassed. This patch moves the fault extraction to a point where it will
be able to capture the fault string even if it was network interface
related.

Change-Id: Ia46522524e80022cd528e4902585213b1de42a44
This commit is contained in:
Michael Johnson 2017-11-15 08:35:16 -08:00
parent e50d953d10
commit 562e6919b6
1 changed files with 1 additions and 1 deletions

View File

@ -236,11 +236,11 @@ class VirtualMachineManager(compute_base.ComputeBase):
except AttributeError:
LOG.info('No availability zone listed for server %s',
nova_response.id)
fault = getattr(nova_response, 'fault', None)
except Exception:
LOG.debug('Extracting virtual interfaces through nova '
'os-interfaces extension failed.')
fault = getattr(nova_response, 'fault', None)
response = models.Amphora(
compute_id=nova_response.id,
status=nova_response.status,