Merge "Adding LOG statements to debug 1838449" into stable/queens
This commit is contained in:
commit
4a80731ae4
|
@ -116,12 +116,19 @@ class L3RpcCallback(object):
|
||||||
router_ids = kwargs.get('router_ids')
|
router_ids = kwargs.get('router_ids')
|
||||||
host = kwargs.get('host')
|
host = kwargs.get('host')
|
||||||
context = neutron_context.get_admin_context()
|
context = neutron_context.get_admin_context()
|
||||||
|
LOG.debug('Sync routers for ids %(router_ids)s in %(host)s',
|
||||||
|
{'router_ids': router_ids,
|
||||||
|
'host': host})
|
||||||
routers = self._routers_to_sync(context, router_ids, host)
|
routers = self._routers_to_sync(context, router_ids, host)
|
||||||
if utils.is_extension_supported(
|
if utils.is_extension_supported(
|
||||||
self.plugin, constants.PORT_BINDING_EXT_ALIAS):
|
self.plugin, constants.PORT_BINDING_EXT_ALIAS):
|
||||||
self._ensure_host_set_on_ports(context, host, routers)
|
self._ensure_host_set_on_ports(context, host, routers)
|
||||||
# refresh the data structure after ports are bound
|
# refresh the data structure after ports are bound
|
||||||
routers = self._routers_to_sync(context, router_ids, host)
|
routers = self._routers_to_sync(context, router_ids, host)
|
||||||
|
LOG.debug('The sync data for ids %(router_ids)s in %(host)s is: '
|
||||||
|
'%(routers)s', {'router_ids': router_ids,
|
||||||
|
'host': host,
|
||||||
|
'routers': routers})
|
||||||
return routers
|
return routers
|
||||||
|
|
||||||
def _routers_to_sync(self, context, router_ids, host=None):
|
def _routers_to_sync(self, context, router_ids, host=None):
|
||||||
|
|
|
@ -21,6 +21,7 @@ from neutron_lib import constants as n_const
|
||||||
from neutron_lib.plugins import constants as plugin_constants
|
from neutron_lib.plugins import constants as plugin_constants
|
||||||
from neutron_lib.plugins import directory
|
from neutron_lib.plugins import directory
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
|
from oslo_log import helpers as log_helpers
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from sqlalchemy import or_
|
from sqlalchemy import or_
|
||||||
|
|
||||||
|
@ -398,6 +399,9 @@ class L3_DVRsch_db_mixin(l3agent_sch_db.L3AgentSchedulerDbMixin):
|
||||||
result_set = set(super(L3_DVRsch_db_mixin,
|
result_set = set(super(L3_DVRsch_db_mixin,
|
||||||
self)._get_router_ids_for_agent(
|
self)._get_router_ids_for_agent(
|
||||||
context, agent_db, router_ids))
|
context, agent_db, router_ids))
|
||||||
|
LOG.debug("Routers %(router_ids)s bound to L3 agent in host %(host)s",
|
||||||
|
{'router_ids': result_set,
|
||||||
|
'host': agent_db['host']})
|
||||||
router_ids = set(router_ids or [])
|
router_ids = set(router_ids or [])
|
||||||
if router_ids and result_set == router_ids:
|
if router_ids and result_set == router_ids:
|
||||||
# no need for extra dvr checks if requested routers are
|
# no need for extra dvr checks if requested routers are
|
||||||
|
@ -424,13 +428,21 @@ class L3_DVRsch_db_mixin(l3agent_sch_db.L3AgentSchedulerDbMixin):
|
||||||
list(subnet_ids))):
|
list(subnet_ids))):
|
||||||
result_set.add(router_id)
|
result_set.add(router_id)
|
||||||
|
|
||||||
|
LOG.debug("Routers %(router_ids)s are scheduled or have "
|
||||||
|
"serviceable ports in host %(host)s",
|
||||||
|
{'router_ids': result_set,
|
||||||
|
'host': agent_db['host']})
|
||||||
for dvr_router in dvr_routers:
|
for dvr_router in dvr_routers:
|
||||||
result_set |= set(
|
result_set |= set(
|
||||||
self._get_other_dvr_router_ids_connected_router(
|
self._get_other_dvr_router_ids_connected_router(
|
||||||
context, dvr_router))
|
context, dvr_router))
|
||||||
|
|
||||||
|
LOG.debug("Router IDs %(router_ids)s for agent in host %(host)s",
|
||||||
|
{'router_ids': result_set,
|
||||||
|
'host': agent_db['host']})
|
||||||
return list(result_set)
|
return list(result_set)
|
||||||
|
|
||||||
|
@log_helpers.log_method_call
|
||||||
def _check_dvr_serviceable_ports_on_host(self, context, host, subnet_ids):
|
def _check_dvr_serviceable_ports_on_host(self, context, host, subnet_ids):
|
||||||
"""Check for existence of dvr serviceable ports on host
|
"""Check for existence of dvr serviceable ports on host
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue