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 <imain@redhat.com>
This commit is contained in:
parent
df5dee4e0b
commit
2f880bc61c
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue