Comment 2 for bug 1585601

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