]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Add an exception around EIP fetching.
authorIan Main <imain@redhat.com>
Fri, 20 Apr 2012 18:38:59 +0000 (11:38 -0700)
committerIan Main <imain@redhat.com>
Fri, 20 Apr 2012 18:38:59 +0000 (11:38 -0700)
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 <imain@redhat.com>
heat/engine/resources.py

index afc1d31b1c82ebe58a9c2f7f0df087e2dec9cf2e..77a5d533b9b9b84466af615ad0d3e49351f2d324 100644 (file)
@@ -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)