From: Ian Main Date: Fri, 20 Apr 2012 18:38:59 +0000 (-0700) Subject: Add an exception around EIP fetching. X-Git-Tag: 2014.1~1947 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=2f880bc61c4ccb7751003cede3d16f7e6fb6ee7a;p=openstack-build%2Fheat-build.git 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 --- diff --git a/heat/engine/resources.py b/heat/engine/resources.py index afc1d31b..77a5d533 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)