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

Bug #1585601 reported by Artom Lifshitz on 2016-05-25
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
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

Fix proposed to branch: master

Changed in nova:
status: New → In Progress
Matt Riedemann (mriedem) on 2016-07-26
Changed in nova:
importance: Undecided → Medium

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

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

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers