[openstack-dev] [neutron] duplicate dhcp port when deleting original dhcp port and restart dhcp-agent

Yangxurong yangxurong at huawei.com
Thu Jul 10 03:04:16 UTC 2014


Hi, folks,

my testing case is as follows:
1.delete dhcp port
2.restart dhcp-agent

then, there will be double dhcp port.
I'm not sure whether dhcp port should be vied for user and can be deleted, IMO, dhcp port is inner port and thus is not supposed to view for user. Now, if we delete the dhcp port, we will create double dhcp port.
    def enable(self):
        """Enables DHCP for this network by spawning a local process."""
        interface_name = self.device_manager.setup(self.network,
                                                   reuse_existing=True)       ----------->create the first dhcp port
        if self.active:
            self.restart()                                                     ----------->create duplicate dhcp port
        elif self._enable_dhcp():
            self.interface_name = interface_name
            self.spawn_process()
so, alternative solutions:

1.       Dhcp port should not be viewed for user, so , user can't delete it

2.       Deleting dhcp port and restart the dhcp-agent, we should get network before creating dhcp port rather than passthrough.

Regards,
XuRong Yang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140710/9abe20ba/attachment.html>


More information about the OpenStack-dev mailing list