← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1212555] Re: remove schedule_network in nicira plugin

 

** Changed in: neutron
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1212555

Title:
  remove schedule_network in nicira plugin

Status in OpenStack Neutron (virtual network service):
  Fix Released

Bug description:
  In neutron/api/rpc/agentnotifiers/dhcp_rpc_agent_api.py, DhcpAgentNotifyAPI._notification() will call schedule_network() when method is port_create_end.  and the comment says:
  """
  # we don't schedule when we create network
  # because we want to give admin a chance to
  # schedule network manually by API
  """
  which i think it is reasonable

  However, in neutron/plugins/nicira/NeutronPlugin.py, the NvpPluginV2.create_network() and NvpPluginV2.create_port() both will call the schedule_network(). I think fresh created network should not call schedule_network(), and the create_port() should not too because the DhcpAgentNotifyAPI will call it again. If we meant to make mistake in neutron.tests.unit.nicira.test_agent_scheduler.NVPDhcpAgentNotifierTestCase.test_network_port_create_notification we can see the log warning: 
  """WARNING [neutron.db.agentschedulers_db] Fail scheduling network"""
  because the default value of 'dhcp_agents_per_network' is 1, and all the duplicated calling of schedule_network() will cause log.warn() from neutron/db/agentschedulers_db.py

  So i think it will be better to remove calling schedule_network() in
  nicira plugin and leave it to dhcp_rpc_agent_api, or we can remove
  schedule_network() from dhcp_rpc_agent and leave it to all plugin.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1212555/+subscriptions