注意:我已经在不同的论坛和此处看到了这个问题和错误,但它们都对我不起作用,并且它们属于 openstack 的早期版本。所以,我发布了一个新问题。
我一直在根据其安装文档设置 OpenStack Train,在设置服务后,我尝试使用此处的说明创建自助服务网络,但在“验证操作”部分的第 3 步中,我看到了所有端口已关闭:
[root@dev-openstack-controller ~]# openstack port list
+--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+
| ID | Name | MAC Address | Fixed IP Addresses | Status |
+--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+
| 628ec286-90aa-4cca-92da-f698fb44a4e6 | | fa:16:3e:a9:31:55 | ip_address='10.100.1.1', subnet_id='8d579a73-6951-445f-9905-51b9be2a6ff5' | DOWN |
| bb77b0d9-7ea8-47d3-b951-139a7616a4bd | | fa:16:3e:89:52:37 | ip_address='203.0.113.166', subnet_id='0666d21c-0fd9-4caf-b560-f7d11e50cd83' | DOWN |
| d2b684c9-eeee-47c4-ae12-dc97e19adf48 | | fa:16:3e:cc:b8:3d | ip_address='10.100.1.2', subnet_id='8d579a73-6951-445f-9905-51b9be2a6ff5' | DOWN |
| fb7aff87-d083-4ed2-bf82-2ab4393373c7 | | fa:16:3e:c8:a7:95 | ip_address='203.0.113.101', subnet_id='0666d21c-0fd9-4caf-b560-f7d11e50cd83' | DOWN |
+--------------------------------------+------+-------------------+------------------------------------------------------------------------------+--------+
首先,我不知道为什么我看到 4 个端口而不是 2 个,其次,当我检查 neutron 日志时,我收到以下错误,表示无法绑定端口:
2020-04-18 11:05:12.321 25009 INFO neutron.plugins.ml2.plugin [req-5c9c16a4-2327-4f46-b0ab-84e4e128d783 - - - - -] Attempt 10 to bind port 628ec286-90aa-4cca-92da-f698fb44a4e6
2020-04-18 11:05:12.347 25009 ERROR neutron.plugins.ml2.managers [req-5c9c16a4-2327-4f46-b0ab-84e4e128d783 - - - - -] Port 628ec286-90aa-4cca-92da-f698fb44a4e6 does not have an IP address assigned and there are no driver with 'connectivity' = 'l2'. The port cannot be bound.
2020-04-18 11:05:12.348 25009 ERROR neutron.plugins.ml2.managers [req-5c9c16a4-2327-4f46-b0ab-84e4e128d783 - - - - -] Failed to bind port 628ec286-90aa-4cca-92da-f698fb44a4e6 on host dev-openstack-controller.ershandc.org for vnic_type normal using segments [{'network_id': 'ae2b1f57-d91a-4ecd-ad15-2cc4b51a376f', 'segmentation_id': 45, 'physical_network': None, 'id': 'c28112f0-4f07-4f23-9f89-c3e37e68054c', 'network_type': u'vxlan'}]
对于平面网络我也遇到同样的错误:
2020-04-18 11:05:11.107 25009 INFO neutron.plugins.ml2.plugin [req-5c9c16a4-2327-4f46-b0ab-84e4e128d783 - - - - -] Attempt 10 to bind port bb77b0d9-7ea8-47d3-b951-139a7616a4bd
2020-04-18 11:05:11.135 25009 ERROR neutron.plugins.ml2.managers [req-5c9c16a4-2327-4f46-b0ab-84e4e128d783 - - - - -] Port bb77b0d9-7ea8-47d3-b951-139a7616a4bd does not have an IP address assigned and there are no driver with 'connectivity' = 'l2'. The port cannot be bound.
2020-04-18 11:05:11.136 25009 ERROR neutron.plugins.ml2.managers [req-5c9c16a4-2327-4f46-b0ab-84e4e128d783 - - - - -] Failed to bind port bb77b0d9-7ea8-47d3-b951-139a7616a4bd on host dev-openstack-controller.ershandc.org for vnic_type normal using segments [{'network_id': '25c5e314-e851-4a9c-ac7a-8e7b3e426deb', 'segmentation_id': None, 'physical_network': u'provider', 'id': '6dccf301-422b-41b9-b719-2999200126c6', 'network_type': u'flat'}]
我在 ml2 插件上尝试了不同的连接。大多数情况与 ml2_plugin.conf 中的以下行相关:
[ml2_type_flat]
flat_networks = flat
vni_ranges = 1:1000
根据openstack文档,它应该是
flat
,但我也尝试过
*
,但没有成功。有人可以为我详细说明问题吗?我正在 CentOS 7 虚拟机上安装。如果需要更多信息,请告诉我。
正如日志所示“没有'connectivity'='l2'的驱动程序”,问题出在ml2_conf.ini中。就我而言,整个驱动程序定义都在 [DEFAULT] 部分中。我将它们移动到正确的位置 [ml2],一切开始正常工作。
openstack network create --provider-network-type geneve n1
openstack subnet create --subnet-range 10.1.1.0/24 --network n1 n1subnet
openstack port create --network n1 --fixed-ip subnet=n1subnet,ip-address=10.1.1.14 port2
我的ml2_conf.ini文件如下: