Disassociate failed dhcp fixed ip in deallocate_for_instance() method

Bug #1180766 reported by Yufang Zhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Chet Burgess
Grizzly
Fix Released
Medium
Vish Ishaya

Bug Description

Currently, fix_ip disassociation only happens in release_fixed_ip(), which is called by dhcp-bridge 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 not trigger dhcp-bridge to run. Thus the fixed ip would not be disassociated from instance until _disassociate_stale_fixed_ips() begins to run. We need a fix for this problem.

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

Fix proposed to branch: master
Review: https://review.openstack.org/29361

Changed in nova:
assignee: nobody → Yufang Zhang (yufang521247)
status: New → In Progress
Revision history for this message
Yufang Zhang (yufang521247) wrote :

Step to reproduce this bug:

1. create an instance in nova
2. stop libvirtd before the instance spawns successfully

Results:
Instance fails to spawn, and the fixed ip associated with the instance is not released when instance is re-scheduled. After some time(fixed_ip_disassociate_timeout), the fixed ip is returned back to pool.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/34688

Changed in nova:
assignee: Yufang Zhang (yufang521247) → Chet Burgess (cfb-n)
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

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
importance: Undecided → Medium
no longer affects: nova/folsom
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/36573

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/36580

Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-2
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/grizzly)

Reviewed: https://review.openstack.org/36580
Committed: http://github.com/openstack/nova/commit/7fae6661b894596b45ec31e70627b76a643276d8
Submitter: Jenkins
Branch: stable/grizzly

commit 7fae6661b894596b45ec31e70627b76a643276d8
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
    (cherry picked from commit 383ca6cf5ff9172a43339dbf845245fbdf2f8210)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/folsom)

Fix proposed to branch: stable/folsom
Review: https://review.openstack.org/39345

Thierry Carrez (ttx)
Changed in nova:
milestone: havana-2 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.