Currently, fix_ip disassociation only happens in release_fixed_ip(),
which is called by dhcp-bridge script when ip is released. But there
are circumstances when instancs fail to get lease from dnsmasq(instances
fail to boot or instances fail to spawn). In such case, DHCPRELEASE
packet sent to dnsmasq would never trigger dhcp-bridge to run. Thus the
fixed ip would not be disassociated from instance until
_disassociate_stale_fixed_ips() begins to run.
Actually, this patch borrows the idea from Vishvananda's
3f6739e2a8acdf20d01c0b5039a33f26d879587b commit: explicitly disassociate
fixed ip which is not known to dnsmasq, instead of via the dhcp-release
script.
Steps to reproduce:
1. Create an instance which doesn't send dhcp request to dnsmasq.
2. Delete the instance.
3. The fixed ip associated with the instance is not returned to pool.
Reviewed: https:/ /review. openstack. org/34688 github. com/openstack/ nova/commit/ 383ca6cf5ff9172 a43339dbf845245 fbdf2f8210
Committed: http://
Submitter: Jenkins
Branch: master
commit 383ca6cf5ff9172 a43339dbf845245 fbdf2f8210
Author: Yufang Zhang <email address hidden>
Date: Thu May 16 19:42:36 2013 +0800
Disassociate fixed IPs not known to dnsmasq
Currently, fix_ip disassociation only happens in release_fixed_ip(), te_stale_ fixed_ips( ) begins to run.
which is called by dhcp-bridge script when ip is released. But there
are circumstances when instancs fail to get lease from dnsmasq(instances
fail to boot or instances fail to spawn). In such case, DHCPRELEASE
packet sent to dnsmasq would never trigger dhcp-bridge to run. Thus the
fixed ip would not be disassociated from instance until
_disassocia
Actually, this patch borrows the idea from Vishvananda's cdf20d01c0b5039 a33f26d879587b commit: explicitly disassociate
3f6739e2a8a
fixed ip which is not known to dnsmasq, instead of via the dhcp-release
script.
Steps to reproduce:
1. Create an instance which doesn't send dhcp request to dnsmasq.
2. Delete the instance.
3. The fixed ip associated with the instance is not returned to pool.
Bug 1180766
Change-Id: Icc022ea2fb7af0 8fb7354e3a49c77 ad5ae58f34c