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
This commit is contained in:
chen-li 2013-11-12 09:17:17 +08:00
parent ba52f489b6
commit 3ef877fc5a

View File

@ -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: