From 2f880bc61c4ccb7751003cede3d16f7e6fb6ee7a Mon Sep 17 00:00:00 2001 From: Ian Main Date: Fri, 20 Apr 2012 11:38:59 -0700 Subject: [PATCH] Add an exception around EIP fetching. I was getting a traceback here causing the whole 'heat describe' to return an error when really it was just the one aspect failing. Use try/rescue and log a warning. Signed-off-by: Ian Main --- heat/engine/resources.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/heat/engine/resources.py b/heat/engine/resources.py index afc1d31b1c..77a5d533b9 100644 --- a/heat/engine/resources.py +++ b/heat/engine/resources.py @@ -307,8 +307,11 @@ class ElasticIp(Resource): get the ipaddress here ''' if self.instance_id != None: - ips = self.nova().floating_ips.get(self.instance_id) - self.ipaddress = ips.ip + try: + ips = self.nova().floating_ips.get(self.instance_id) + self.ipaddress = ips.ip + except Exception as ex: + logger.warn("Error getting floating IPs: %s" % str(ex)) Resource.reload(self)