centos 下的 dhcp_release



nova-network在删除实例的时候,会解绑固定IP。有两种机制,超时和强制。采用超时解绑上用一个定时任务(fixed_ip_disassociate_timeout 配置)解绑。强制解绑使用另外一个选项force_dhcp_release,当实例删除的时候,调用dhcp_release外部命令,发送一个DHCPRELEASE 消息给 dnsmasq 服务器,dnsmasq服务器删除固定IP的匹配关系。

在 multi-host 环境下,force_dhcp_release 很重要。dhcp_release是dnsmasq的一部分,但是在 Fedora 和 CentOS 下,没有编译进 dnsmasq 包。另外 Fedora 的 openstack-nova 没有包含dhcp_release命令的 sudoers 规则.

The component nova-network disassociate fixed IP of VM when it deleted. There are two mechanisms by timeout and force. Disassociate by timeout is a periodical task (period can be set by flag –fixed_ip_disassociate_timeout). The force disassociate is optional (enabled by flag –force_dhcp_release) and involved when instance have been deleted. In fact this process use CLI tool dhcp_release to send DHCPRELEASE message to dnsmasq server for drop lease and change state of fixed ip in database. In multi-host scheme it is important. So, dhcp_release is part of dnsmasq and not included in builds in Fedora and CentOS. Also, in Fedora builds of openstack-nova does not exists sudoers rule for dhcp_release command.

此条目发表在OpenStack分类目录,贴了, 标签。将固定链接加入收藏夹。