Add an error log with the server fault message

In case there is useful debug information in the server fault message,
log it so that we can try to track down why servers go away.

Change-Id: I33fd51cbfc110fdb1ccfa6bc30a421d527f2e928
This commit is contained in:
Monty Taylor 2016-03-02 16:26:33 -06:00 committed by Jeremy Stanley
parent 90e3812c49
commit 536f7feab0
1 changed files with 6 additions and 0 deletions

View File

@ -483,6 +483,12 @@ class ProviderManager(TaskManager):
provider=self.provider.name,
id=resource_id,
status=status))
if status == 'ERROR' and 'fault' in resource:
self.log.debug(
'ERROR in {provider} on {id}: {resason}'.format(
provider=self.provider.name,
id=resource_id,
resason=resource['fault']['message']))
last_status = status
if status in ['ACTIVE', 'ERROR']:
return resource