From cc02854357dafa55cabb256c9207198cc8c38c24 Mon Sep 17 00:00:00 2001 From: chen-li Date: Tue, 12 Nov 2013 09:17:17 +0800 Subject: [PATCH] Remove the warning for Scheduling Network when a new port is created, the schedule_network in agentschedulers_db is called. Since this network may already be hosted, it will directly return None in dhcp_agent_scheduler, which cause the agentschedulers_db.schedule_network log a warning message. This is really annoying and making users confused. And, real warnings are already addressed in the real scheduler function. which is neutron.scheduler.dhcp_agent_scheduler.ChanceScheduler.schedule by default. Change-Id: I11bdbe47c2cc0fc45fb143970fb6762678bc27e5 Closes-Bug: #1192786 --- neutron/db/agentschedulers_db.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/neutron/db/agentschedulers_db.py b/neutron/db/agentschedulers_db.py index d50e714e04..4965d13387 100644 --- a/neutron/db/agentschedulers_db.py +++ b/neutron/db/agentschedulers_db.py @@ -203,11 +203,8 @@ class DhcpAgentSchedulerDbMixin(dhcpagentscheduler def schedule_network(self, context, created_network): if self.network_scheduler: - chosen_agent = self.network_scheduler.schedule( + return self.network_scheduler.schedule( self, context, created_network) - if not chosen_agent: - LOG.warn(_('Fail scheduling network %s'), created_network) - return chosen_agent def auto_schedule_networks(self, context, host): if self.network_scheduler: