]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Delete DHCP port without DHCP server on a net node
authorStephen Ma <stephen.ma@hp.com>
Sun, 27 Oct 2013 15:14:21 +0000 (08:14 -0700)
committerStephen Ma <stephen.ma@hp.com>
Tue, 15 Apr 2014 20:35:01 +0000 (20:35 +0000)
commit8cf394b896e3644ff51edf6a0d462501fb6e6843
treebf7d5509381ba967a331c664ca44800e6e53e8f4
parent1867207470f1fece50a458c2f2d1bf27bd9e3869
Delete DHCP port without DHCP server on a net node

A DHCP-network was deleted from one host using neutron
dhcp-agent-network-remove and then added to another host
using neutron dhcp-agent-network-add command. While the
dhcp-agent-network-remove command was in progress, the
host crashed.  As a result, the removal of the DHCP-network
was partially done. The network was disassociated from
the agent in mysql. However, the agent never made the
release_dhcp_port RPC call to delete the port -- even
after the agent restarted. The end result is that there
are two DHCP ports for the same network. One of these
is found on the host that is no longer hosting the
dhcp-server.

This fix make the DHCP agent invoke the release_dhcp_port
RPC call on a stale network whose dnsmasq process is not
running (not active). Before this change, the RPC call is
made on a stale network only when the dnsmasq process is
running.

Closes-Bug: #1244860
Change-Id: Ie0bafdac698810b5455550c306c6a75ddf91d9bb
neutron/agent/linux/dhcp.py
neutron/tests/unit/test_linux_dhcp.py