← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1408909] Re: Release_dhcp_port doesn't work when remove network from dhcp agent

 

[Expired for neutron because there has been no activity for 60 days.]

** Changed in: neutron
       Status: Incomplete => Expired

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

Title:
  Release_dhcp_port doesn't work when remove network from dhcp agent

Status in neutron:
  Expired

Bug description:
  In the bug:https://bugs.launchpad.net/neutron/+bug/1288923
  It changes that reserve the dhcp port to be reused  after remove-network-from-agent.
  The code is: 
        port['device_id'] = constants.DEVICE_ID_RESERVED_DHCP_PORT
                  self.update_port(context, port['id'], dict(port=port))
  Then the code will be executed to release_dhcp_port. The above port device_id in the database has been modified, so it can't release the dhcp port.

  def delete_ports_by_device_id(self, context, device_id, network_id=None):
          query = (context.session.query(models_v2.Port.id)
                   .enable_eagerloads(False)
                   .filter(models_v2.Port.device_id == device_id))
          if network_id:
              query = query.filter(models_v2.Port.network_id == network_id)
          port_ids = [p[0] for p in query]
          for port_id in port_ids:
              try:
                  self.delete_port(context, port_id)

  The "port_ids" will be none,so the release_dhcp_port doesn't work.It seems inappropriate.
  I think if we want to reserve the dhcp port,we do not need "release_dhcp_port", so delete it.
  Or we have other ways of handling here.

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


References