dhcp_release not called causing new VMs to fail DHCP
Bug #1250644 reported by
Carl Baldwin
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Carl Baldwin | ||
Havana |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I've found some situations where dhcp_release is not called when a port is deleted. When this happens, dnsmasq refused to give out the IP to a new port when the IP address gets recycled. The result is that the VM with the new port cannot get its IP address on boot.
There are a few conceivable scenarios that lead to this. I will attempt to describe some in the comments.
Changed in neutron: | |
assignee: | nobody → Carl Baldwin (carl-baldwin) |
Changed in neutron: | |
importance: | Undecided → Medium |
milestone: | none → icehouse-3 |
Changed in neutron: | |
status: | Fix Committed → Fix Released |
Changed in neutron: | |
milestone: | icehouse-3 → 2014.1 |
tags: | added: havana-backport-potential |
To post a comment you must log in.
One situation that leads to this:
2013-10-18 19:52:11.987 port created
2013-10-18 19:52:22.747 port added to the network cache
2013-10-18 19:52:49.580 port is in the cache at this time
2013-10-18 19:57:18.999 Sync state starts, dhcp_agent network cache is being rebuilt
2013-10-18 19:57:19.005 port deleted from db by the api server
dhcp-agent network cache is completely rebuilt and doesn't contain the deleted port
2013-10-18 19:57:33.944 port_delete_end rpc received by dhcp-agent
2013-10-18 19:58:12.295 port_delete_end function is called
2013-10-18 19:58:12.295 Port not found in the cache so dhcp_release is not called
2013-10-18 19:58:12.314 cache dumped but port is not there
In summary, the port delete is sent by RCP message to the DHCP agent. Before the agent acts on this message, the periodic sync state operation starts and fetches the current state. This current state doesn't include the port. The sync state operation does not figure out that dhcp_release should be called.
By the time the RPC message is acted on, the port is no longer in the local cache and so dhcp_release cannot be called because we don't know enough from the cache to call it.