From 536f7feab00284ac54ea0ab2661f1b0bf415f09c Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Wed, 2 Mar 2016 16:26:33 -0600 Subject: [PATCH] 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 --- nodepool/provider_manager.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nodepool/provider_manager.py b/nodepool/provider_manager.py index 0d8e84ff9..e177714e2 100644 --- a/nodepool/provider_manager.py +++ b/nodepool/provider_manager.py @@ -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