← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1416933] Re: Race condition in Ha router updating port status

 

** Changed in: neutron/kilo
       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/1416933

Title:
  Race condition in Ha router updating port status

Status in OpenStack Neutron (virtual network service):
  Fix Committed
Status in neutron kilo series:
  Fix Released

Bug description:
  When L2 agent call 'get_devices_details_list', the ports in this l2 agent will firstly be updated to BUILD, then 'update_device_up' will update them to ACTIVE, but for a Ha router which has two l3 agents, there will be race condition.
  reproduce progress(not always happen, but much time):
  1.  'router-interface-add' add a subnet to Ha router
  2.  'router-gateway-set' set router gateway
  the gateway port status sometimes will always be BUILD

  in 'get_device_details', the port status will be update, but I think
  if a port status is ACTIVE and port['admin_state_up'] is True, this
  port should not be update,

  def get_device_details(self, rpc_context, **kwargs):
          ......
          ......
          new_status = (q_const.PORT_STATUS_BUILD if port['admin_state_up']
                        else q_const.PORT_STATUS_DOWN)
          if port['status'] != new_status:
              plugin.update_port_status(rpc_context,
                                        port_id,
                                        new_status,
                                        host)

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


References