Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disassociate fixed IPs not known to dnsmasq
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 3f6739e 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. Bug 1180766 Change-Id: Icc022ea2fb7af08fb7354e3a49c77ad5ae58f34c
- Loading branch information