我的操作系统是 Debian 12。
我部署的openstack集群有两个节点,controller34为控制节点,worker35为工作节点,没有多余的网络节点,我的网络规划是工作节点和网络节点复用,我按照官网文档部署了neutron自服务网络,在控制节点的日志中发现如下错误 这是我的 IP 配置
root@controller34:/home/dky# cat /etc/network/interfaces
## This file describes the network interfaces available on your system
## and how to activate them. For more information, see interfaces(5).
#
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug enp125s0f0
iface enp125s0f0 inet static
address 192.168.203.34/24
gateway 192.168.203.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.203.11
这是我的错误日志
tail -100f /var/log/neutron/neutron-openvswitch-agent.log
2024-01-23 10:54:52.946 241411 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [-] Bridge enp125s0f0 for physical network provider does not exist. Agent terminated!
2024-01-23 10:54:56.939 241421 INFO neutron.common.config [-] Logging enabled!
这是我的配置文件
/etc/neutron/plugins/ml2/ml2_conf.ini
cat /etc/neutron/plugins/ml2/ml2_conf.ini
[ml2]
# ...
type_drivers = flat,vlan,vxlan
tenant_network_types = vxlan
mechanism_drivers = openvswitch,l2population
extension_drivers = port_security
[ml2_type_flat]
# ...
flat_networks = provider
[ml2_type_vxlan]
# ...
vni_ranges = 1:1000
/etc/neutron/plugins/ml2/openvswitch_agent.ini
root@controller34:/etc/neutron/plugins/ml2# cat /etc/neutron/plugins/ml2/openvswitch_agent.ini
[ovs]
bridge_mappings = provider:enp125s0f0
[vxlan]
local_ip = 192.168.203.34
l2_population = true
[securitygroup]
# ...
enable_security_group = true
firewall_driver = openvswitch
#firewall_driver = iptables_hybrid
我在工作节点的日志中没有发现任何错误。
这是我的 IP 配置:
root@controller34:/etc/neutron/plugins/ml2# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: enp1s0f0np0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 70:8c:b6:16:27:fb brd ff:ff:ff:ff:ff:ff
3: enp125s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether a4:16:e7:95:13:0b brd ff:ff:ff:ff:ff:ff
inet 192.168.203.34/24 brd 192.168.203.255 scope global enp125s0f0
valid_lft forever preferred_lft forever
inet6 fe80::a616:e7ff:fe95:130b/64 scope link
valid_lft forever preferred_lft forever
我尝试手动创建网桥,但是没有成功。目前我们还在测试阶段,所以我计划使用单个网络接口来构建外部网络、管理网络、租户网络。
答案1
桥接映射需要桥接,而不是接口,但从文档。但配置选项bridge_mappings
非常清楚。我还没有设置 OVN,所以这是针对 OVS 部署的,因为您似乎也需要:
# create provider bridge on control node
ovs-vsctl add-br br-provider
# add port to provider bridge (physnet is probably enp125s0f0 in your case)
ovs-vsctl add-port br-provider {{ physnet }}
# edit /etc/neutron/plugins/ml2/openvswitch_agent.ini
[ovs]
bridge_mappings = provider:br-provider
编辑配置文件后,重新启动neutron-openvswitch-agent.service
控制节点上的 ,甚至所有 neutron 服务。然后在计算节点上执行相同操作,因为它也需要桥接映射。如果您打算使用外部(提供商)网络,则需要另一个未配置 IP 的接口。