Error: Build of instance c1192e0a-e815-4f4e-b995-05d0c6bd2dfc aborted: Failed to allocate the network(s), not rescheduling?

Error: Build of instance c1192e0a-e815-4f4e-b995-05d0c6bd2dfc aborted: Failed to allocate the network(s), not rescheduling?

`在此处输入代码在 OpenStack 中构建机器时出现此错误 我检查了 Nova 服务日志并收到此错误

错误:实例 c1192e0a-e815-4f4e-b995-05d0c6bd2dfc 的构建已中止:无法分配网络,无法重新安排

Neutron 无法创建and/or 附加新网络端口的情况很常见,要进一步调查原因,您需要查看 neutron 日志。

访问您的控制器主机并使用类似以下内容读取日志流:

tail -f /var/log/kolla/neutron/*.log

如果您使用 kolla-ansible 部署您的集群,或者

tail -f /var/log/containers/neutron/*.log 

如果您在容器化发行版上运行,或者

tail -f /var/log/neutron/*.log

如果它是基于流程的系统

如果您可以 post 一些日志片段,我们可以帮助您更接近于解决问题。

我遇到过这个错误,但这些日志中没有任何提示。

openstack server show error_instance获取一些错误信息:

..._build_and_run_instance nova.exception.BuildAbortException: Build of instance aborted: Failed to allocate the networks(s), not rescheduling...

然后我检查我的管理程序的 ip 信息:

9: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue master brmgt state UP group default qlen 1000
    link/ether bc brd ff:ff:ff:ff:ff:ff
10: bond1.320@bond1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master brcls state UP group default qlen 1000
    link/ether be brd ff:ff:ff:ff:ff:ff
15: brq12805e86-a2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether f4 brd ff:ff:ff:ff:ff:ff
17: rename17@bond0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether bc brd ff:ff:ff:ff:ff:ff
19: tap79852d9e-f7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master brq12805e86-a2 state UNKNOWN group default qlen 1000
    link/ether f4 brd ff:ff:ff:ff:ff:ff

显然,接口名称 rename17@bond0 格式错误,而不是以前的管理程序中的名称 bond0.999@bond0

我通过以下方式修复了它:

mv /etc/udev/rules.d/70-persistent-net.rules /etc/udev/rules.d/70-persistent-net.rules.bak
ip l d rename17
docker restart neutron_linuxbridge_agent

PS:在我的例子中,我们使用 linuxbridgevlan 的网络。

我停止了 rabitmq1 和 rabitmq2 和 rabitmq3 之后我启动了 rabitmq3 和 rabitmq2 和 rabitmq1 然后重新启动 Lxc neutron 最后我可以修复错误