最近陆续出现过创建虚拟机失败的现象,经查证,日志显示fixed-ip没有可有的了。但用命令行查询发现还有很多未使用。
由于nova-network在删除实例的时候,会解绑固定IP。它有两种机制,超时和强制。
超时由fixed_ip_disassociate_timeout字段配置
强制由force_dhcp_release配置,当实例删除的时候,调用dhcp_release外部命令,发送一个DHCPRELEASE 消息给dnsmasq 服务器,dnsmasq服务器删除固定IP的匹配关系。
解决办法:
(1)Manually set instance_id=NULL in the fixed_ips table allows things to
work again.
(2)can you try with the flag:force_dhcp_release=True
然后重启即可生效