微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

由于Lxc容器没有网络连接,OpenStack Ansible部署失败

如何解决由于Lxc容器没有网络连接,OpenStack Ansible部署失败

我正在尝试部署OpenStack Ansible。运行第一个剧本constexpr时,在任务static_cast<unsigned int>期间所有容器都出错(请参见下文),并且剧本失败。

openstack-ansible setup-hosts.yml

当我连接到任何容器并运行[openstack_hosts : Remove the blacklisted packages](本地DNS)时,都会收到相同的错误fatal: [infra1_repo_container-1f1565cd]: Failed! => {"changed": false,"cmd": "apt-get update","msg": "E: The repository 'http://ubuntu.mirror.lrz.de/ubuntu bionic Release' no longer has a Release file.\nE: The repository 'http://ubuntu.mirror.lrz.de/ubuntu bionic-updates Release' no longer has a Release file.\nE: The repository 'http://ubuntu.mirror.lrz.de/ubuntu bionic-backports Release' no longer has a Release file.\nE: The repository 'http://ubuntu.mirror.lrz.de/ubuntu bionic-security Release' no longer has a Release file.","rc": 100,"stderr": "E: The repository 'http://ubuntu.mirror.lrz.de/ubuntu bionic Release' no longer has a Release file.\nE: The repository 'http://ubuntu.mirror.lrz.de/ubuntu bionic-updates Release' no longer has a Release file.\nE: The repository 'http://ubuntu.mirror.lrz.de/ubuntu bionic-backports Release' no longer has a Release file.\nE: The repository 'http://ubuntu.mirror.lrz.de/ubuntu bionic-security Release' no longer has a Release file.\n","stderr_lines": ["E: The repository 'http://ubuntu.mirror.lrz.de/ubuntu bionic Release' no longer has a Release file.","E: The repository 'http://ubuntu.mirror.lrz.de/ubuntu bionic-updates Release' no longer has a Release file.","E: The repository 'http://ubuntu.mirror.lrz.de/ubuntu bionic-backports Release' no longer has a Release file.","E: The repository 'http://ubuntu.mirror.lrz.de/ubuntu bionic-security Release' no longer has a Release file."],"stdout": "Ign:1 http://ubuntu.mirror.lrz.de/ubuntu bionic InRelease\nIgn:2 http://ubuntu.mirror.lrz.de/ubuntu bionic-updates InRelease\nIgn:3 http://ubuntu.mirror.lrz.de/ubuntu bionic-backports InRelease\nIgn:4 http://ubuntu.mirror.lrz.de/ubuntu bionic-security InRelease\nErr:5 http://ubuntu.mirror.lrz.de/ubuntu bionic Release\n Cannot initiate the connection to 192.168.100.6:8000 (192.168.100.6). - connect (101: Network is unreachable)\nErr:6 http://ubuntu.mirror.lrz.de/ubuntu bionic-updates Release\n Cannot initiate the connection to 192.168.100.6:8000 (192.168.100.6). - connect (101: Network is unreachable)\nErr:7 http://ubuntu.mirror.lrz.de/ubuntu bionic-backports Release\n Cannot initiate the connection to 192.168.100.6:8000 (192.168.100.6). - connect (101: Network is unreachable)\nErr:8 http://ubuntu.mirror.lrz.de/ubuntu bionic-security Release\n Cannot initiate the connection to 192.168.100.6:8000 (192.168.100.6). - connect (101: Network is unreachable)\nReading package lists...\n","stdout_lines": ["Ign:1 http://ubuntu.mirror.lrz.de/ubuntu bionic InRelease","Ign:2 http://ubuntu.mirror.lrz.de/ubuntu bionic-updates InRelease","Ign:3 http://ubuntu.mirror.lrz.de/ubuntu bionic-backports InRelease","Ign:4 http://ubuntu.mirror.lrz.de/ubuntu bionic-security InRelease","Err:5 http://ubuntu.mirror.lrz.de/ubuntu bionic Release"," Cannot initiate the connection to 192.168.100.6:8000 (192.168.100.6). - connect (101: Network is unreachable)","Err:6 http://ubuntu.mirror.lrz.de/ubuntu bionic-updates Release","Err:7 http://ubuntu.mirror.lrz.de/ubuntu bionic-backports Release","Err:8 http://ubuntu.mirror.lrz.de/ubuntu bionic-security Release","Reading package lists..."]} )。但是,当我通过运行ping 192.168.100.6指定接口时,连接成功。 在infra_cinder容器上运行connect: Network is unreachable会产生:

ping -I eth1 192.168.100.6

因此似乎没有认路由,这就是为什么连接失败的原因(与其他红外线容器类似)。 OSA不应该自动配置吗?我没有在文档中找到有关容器认路由的任何信息。

这是我的openstack_user_config.yml:

ip r

解决方法

我试图从配置回溯到AIO,但是仍然出现相同的错误。最终,在重新启动服务器后,它消失了,因此,毕竟配置似乎没有问题...

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。