Merge "Fix uncaught DB exception when trying to get a spare amphora"
This commit is contained in:
commit
e0ae8a3cac
@ -529,10 +529,17 @@ class MapLoadbalancerToAmphora(BaseDatabaseTask):
|
||||
else:
|
||||
amp_az = CONF.nova.availability_zone
|
||||
|
||||
try:
|
||||
amp = self.amphora_repo.allocate_and_associate(
|
||||
db_apis.get_session(),
|
||||
loadbalancer_id,
|
||||
amp_az)
|
||||
except Exception as e:
|
||||
LOG.error("Failed to get a spare amphora (AZ: {}) for "
|
||||
"loadbalancer {} due to: {}".format(
|
||||
amp_az, loadbalancer_id, e))
|
||||
return None
|
||||
|
||||
if amp is None:
|
||||
LOG.debug("No Amphora available for load balancer with id %s",
|
||||
loadbalancer_id)
|
||||
|
Loading…
Reference in New Issue
Block a user