Comment 4 for bug 1180766

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/34688
Committed: http://github.com/openstack/nova/commit/383ca6cf5ff9172a43339dbf845245fbdf2f8210
Submitter: Jenkins
Branch: master

commit 383ca6cf5ff9172a43339dbf845245fbdf2f8210
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(),
    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.

    Bug 1180766

    Change-Id: Icc022ea2fb7af08fb7354e3a49c77ad5ae58f34c