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.
Reviewed: https:/ /review. openstack. org/325361 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=f9e9b30b934 43c986d3bee7f8b 4140b82050418b
Committed: https:/
Submitter: Jenkins
Branch: master
commit f9e9b30b93443c9 86d3bee7f8b4140 b82050418b
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 fixed_ip( ) and the instance's fixed IP is returned to the
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_
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 fixed_ip( ) are called.
the instance's "original" host, thus ensuring that the correct dnsmasq
handles the lease release and that nova-dhcpbridge and
release_
Change-Id: I0eec8c995dd8cf f50c37af8301869 7fc686fe727
Closes-bug: 1585601