← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1401132] Re: The logic in linux dhcp-agent disable for removing ports is broken

 

** 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/1401132

Title:
  The logic in linux dhcp-agent disable for removing ports is broken

Status in neutron:
  Fix Released

Bug description:
  https://github.com/openstack/neutron/blob/master/neutron/agent/linux/dhcp.py#L215

      def disable(self, retain_port=False):
          """Disable DHCP for this network by killing the local process."""
          pid = self.pid

          if pid:
              if self.active:
                  cmd = ['kill', '-9', pid]
                  utils.execute(cmd, self.root_helper)
              else:
                  LOG.debug('DHCP for %(net_id)s is stale, pid %(pid)d '
                            'does not exist, performing cleanup',
                            {'net_id': self.network.id, 'pid': pid})
              if not retain_port:
                  self.device_manager.destroy(self.network,
                                              self.interface_name)
          else:
              LOG.debug('No DHCP started for %s', self.network.id)

  if there was no pid (for some reason the local process (dnsmasq) didn't 
  start, but the port was created, the port will be left there, and no 
  disable will remove the actual port.

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


References