diff --git a/neutron/db/agentschedulers_db.py b/neutron/db/agentschedulers_db.py index 4eba552ac17..c780d3d2129 100644 --- a/neutron/db/agentschedulers_db.py +++ b/neutron/db/agentschedulers_db.py @@ -17,7 +17,6 @@ import datetime import random import time -import debtcollector from neutron_lib import constants from oslo_config import cfg from oslo_log import log as logging @@ -155,24 +154,6 @@ class AgentSchedulerDbMixin(agents_db.AgentDbMixin): self.add_worker(check_worker) - @debtcollector.removals.remove( - message="This will be removed in the O cycle. " - "Please use 'add_agent_status_check_worker' instead." - ) - def add_agent_status_check(self, function): - loop = loopingcall.FixedIntervalLoopingCall(function) - # TODO(enikanorov): make interval configurable rather than computed - interval = max(cfg.CONF.agent_down_time // 2, 1) - # add random initial delay to allow agents to check in after the - # neutron server first starts. random to offset multiple servers - initial_delay = random.randint(interval, interval * 2) - loop.start(interval=interval, initial_delay=initial_delay) - - if hasattr(self, 'periodic_agent_loops'): - self.periodic_agent_loops.append(loop) - else: - self.periodic_agent_loops = [loop] - def agent_dead_limit_seconds(self): return cfg.CONF.agent_down_time * 2 @@ -262,18 +243,6 @@ class DhcpAgentSchedulerDbMixin(dhcpagentscheduler network_scheduler = None - @debtcollector.removals.remove( - message="This will be removed in the O cycle. " - "Please use 'add_periodic_dhcp_agent_status_check' instead." - ) - def start_periodic_dhcp_agent_status_check(self): - if not cfg.CONF.allow_automatic_dhcp_failover: - LOG.info(_LI("Skipping periodic DHCP agent status check because " - "automatic network rescheduling is disabled.")) - return - - self.add_agent_status_check(self.remove_networks_from_down_agents) - def add_periodic_dhcp_agent_status_check(self): if not cfg.CONF.allow_automatic_dhcp_failover: LOG.info(_LI("Skipping periodic DHCP agent status check because " diff --git a/neutron/db/l3_agentschedulers_db.py b/neutron/db/l3_agentschedulers_db.py index ffa717727ea..d09800501c8 100644 --- a/neutron/db/l3_agentschedulers_db.py +++ b/neutron/db/l3_agentschedulers_db.py @@ -13,7 +13,6 @@ # License for the specific language governing permissions and limitations # under the License. -import debtcollector from neutron_lib import constants from oslo_config import cfg from oslo_db import exception as db_exc @@ -71,19 +70,6 @@ class L3AgentSchedulerDbMixin(l3agentscheduler.L3AgentSchedulerPluginBase, router_scheduler = None - @debtcollector.removals.remove( - message="This will be removed in the O cycle. " - "Please use 'add_periodic_l3_agent_status_check' instead." - ) - def start_periodic_l3_agent_status_check(self): - if not cfg.CONF.allow_automatic_l3agent_failover: - LOG.info(_LI("Skipping period L3 agent status check because " - "automatic router rescheduling is disabled.")) - return - - self.add_agent_status_check( - self.reschedule_routers_from_down_agents) - def add_periodic_l3_agent_status_check(self): if not cfg.CONF.allow_automatic_l3agent_failover: LOG.info(_LI("Skipping period L3 agent status check because "