Improve logging in _update_internal_gateway_port_ip
Change-Id: I820216445b31bf3e5e26e3d9345753b443c2d181 Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
This commit is contained in:
parent
bc4312cd41
commit
a54d3e6d90
@ -152,7 +152,10 @@ def _add_subnet_to_router(context, subnet):
|
|||||||
|
|
||||||
def _update_internal_gateway_port_ip(context, router_id, subnet):
|
def _update_internal_gateway_port_ip(context, router_id, subnet):
|
||||||
"""Attempt to update internal gateway port if one already exists."""
|
"""Attempt to update internal gateway port if one already exists."""
|
||||||
|
LOG.debug('setting gateway port IP for router %s on network %s for subnet %s',
|
||||||
|
router_id, subnet['network_id'], subnet['id'])
|
||||||
if not subnet.get('gateway_ip'):
|
if not subnet.get('gateway_ip'):
|
||||||
|
LOG.debug('no gateway set for subnet %s, skipping', subnet)
|
||||||
return
|
return
|
||||||
|
|
||||||
q = context.session.query(l3_db.RouterPort, qmodels.Port)
|
q = context.session.query(l3_db.RouterPort, qmodels.Port)
|
||||||
@ -162,7 +165,8 @@ def _update_internal_gateway_port_ip(context, router_id, subnet):
|
|||||||
routerport, port = q.first() or (None, None)
|
routerport, port = q.first() or (None, None)
|
||||||
|
|
||||||
if not routerport:
|
if not routerport:
|
||||||
LOG.exception('Unable able to find router.')
|
LOG.exception('Unable to find router for port %s on network %s.'
|
||||||
|
% (router_id, subnet['network_id']))
|
||||||
return
|
return
|
||||||
|
|
||||||
fixed_ips = [
|
fixed_ips = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user