Deleting a live-migrated instance causes its fixed IP to remain reserved

Bug #1585601 reported by Artom Lifshitz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Artom Lifshitz

Bug Description

When using nova-network, an attempt to boot an instance with the fixed IP of an instance that has been live-migrated and then deleted will fail with 'Fixed IP address is already in use on instance.'

To reproduce:

1. Boot an instance
2. Live-migrate it
3. Delete it
4. Boot a new instance with the same fixed IP.

This has been reported against Icehouse and has been reproduced in master, and is therefore presumably present in all versions in-between.

Changed in nova:
assignee: nobody → Artom Lifshitz (notartom)
tags: added: live-migration
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/325361

Changed in nova:
status: New → In Progress
Matt Riedemann (mriedem)
Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/325361
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=f9e9b30b93443c986d3bee7f8b4140b82050418b
Submitter: Jenkins
Branch: master

commit f9e9b30b93443c986d3bee7f8b4140b82050418b
Author: Artom Lifshitz <email address hidden>
Date: Fri Jun 3 15:08:08 2016 +0000

    Call release_dhcp via RPC to ensure correct host

    When deleting an instance in a nova-network environment, the network
    manager calls release_dhcp() on the local host. The linux_net driver
    then executes dhcp_release, a binary that comes with dnsmasq that
    releases a DHCP lease on the local host. Upon lease release, dnsmasq
    calls its dhcp-script, nova-dhcpbridge. The latter calls
    release_fixed_ip() and the instance's fixed IP is returned to the
    pool. This is fine if an instance has never been live-migrated.

    If an instance has been live-migrated, the dnsmasq on its new
    host fails with 'unknown lease' because it's not the same dnsmasq that
    originally handed out the lease. Having failed, dnsmasq doesn't call
    nova-dhcpbridge and release_fixed_ip() is never called. The fixed IP
    is not returned to the pool and a new instance cannot be booted with
    that IP.

    This patches adds a release_dhcp RPC call that calls release_dhcp on
    the instance's "original" host, thus ensuring that the correct dnsmasq
    handles the lease release and that nova-dhcpbridge and
    release_fixed_ip() are called.

    Change-Id: I0eec8c995dd8cff50c37af83018697fc686fe727
    Closes-bug: 1585601

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 14.0.0.0b3

This issue was fixed in the openstack/nova 14.0.0.0b3 development milestone.

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.