Skip to content

Commit

Permalink
Merge "Catch ResourceExhaustionError and log"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Feb 9, 2017
2 parents 8f971aa + 630bcd8 commit b0a5cbf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/config/schema-transformer/config_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -3230,7 +3230,12 @@ def create_bgp_router(self, name):
if not bgpr:
bgp_router = BgpRouter(vmi.obj.name, parent_obj=ri.obj)
create = True
src_port = self._object_db.alloc_bgpaas_port(router_fq_name)
try:
src_port = self._object_db.alloc_bgpaas_port(router_fq_name)
except ResourceExhaustionError as e:
self._logger.error("Cannot allocate BGPaaS port for %s:%s" % (
router_fq_name, str(e)))
return
else:
bgp_router = self._vnc_lib.bgp_router_read(id=bgpr.obj.uuid)
src_port = bgpr.source_port
Expand Down

0 comments on commit b0a5cbf

Please sign in to comment.