我正在配置 openstack HA,并且能够使用 openstack yoga 文档配置 Nova 和 neutron 配置 (https://docs.openstack.org/install-guide/)。我遇到的唯一问题是,当我运行“openstack 网络代理列表”时,它显示为空。
我不知道我做错了什么。
提前感谢您的帮助
下面是neutron.conf文件的配置:
[DEFAULT]
core_plugin = ml2
#state_path
bind_host = 192.168.120.10
auth_strategy = keystone
service_plugins = router
allow_overlapping_ips = true
notify_nova_on_port_status_changes = true
notify_nova_on_port_data_changes = true
transport_url = rabbit://openstack:rabbit_pass@controller:5671
rpc_response_timeout = 500
rpc_response_timeout = 200
l3_ha = true
service_token_roles_required = true
[database]
connection = mysql+pymysql://neutron:[email protected]/neutron
[keystone_authtoken]
auth_type = password
project_domain_name = Default
project_name = service
user_domain_name = Default
username = neutron
password = neutron_pass
auth_url = https://controller:5000/v3
www_authenticate_uri = https://controller:5000/v3
memcached_servers = 192.168.120.11:11211,192.168.120.12:11211,192.168.120.13:11211
certfile = /etc/ssl/certs/neutron/openstack.pem
keyfile = /etc/ssl/private/neutron/openstackkey.pem
cafile = /etc/ssl/certs/ca.cer
[nova]
auth_type = password
project_domain_name = Default
project_name = service
user_domain_name = Default
username = nova
password = nova_pass
auth_url = https://controller:5000/v3
www_authenticate_uri = https://controller:5000/v3
memcached_servers = 192.168.120.11:11211,192.168.120.12:11211,192.168.120.13:11211
certfile = /etc/ssl/certs/neutron/openstack.pem
keyfile = /etc/ssl/private/neutron/openstackkey.pem
cafile = /etc/ssl/certs/ca.cer
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp
**rabbitmq log**
`
dev-team@cont-00:~$ sudo tail -f /var/log/rabbitmq/[email protected]
2022-12-15 12:04:08.319846-06:00 [info] <0.9671.0> Mirrored queue 'conductor_fanout_135dfab533b146d7a5955ba17cd79639' in vhost '/': Adding mirror on node 'rabbit@cont-01': <18272.7289.0>
2022-12-15 12:05:50.873928-06:00 [info] <0.9927.0> accepting AMQP connection <0.9927.0> (192.168.10.11:54102 -> 192.168.10.11:5671)
2022-12-15 12:05:50.880573-06:00 [info] <0.9927.0> Connection <0.9927.0> (192.168.10.11:54102 -> 192.168.10.11:5671) has a client-provided name: neutron-dhcp-agent:15818:93eba9f1-a48a-4cc0-b217-78b6a47c4e7d
2022-12-15 12:05:50.881628-06:00 [info] <0.9927.0> connection <0.9927.0> (192.168.10.11:54102 -> 192.168.10.11:5671 - neutron-dhcp-agent:15818:93eba9f1-a48a-4cc0-b217-78b6a47c4e7d): user 'openstack' authenticated and granted access to vhost '/'
2022-12-15 12:05:50.896757-06:00 [info] <0.9940.0> Mirrored queue 'dhcp_agent' in vhost '/': Adding mirror on node 'rabbit@cont-02': <18271.7555.0>
2022-12-15 12:05:50.902008-06:00 [info] <0.9940.0> Mirrored queue 'dhcp_agent' in vhost '/': Adding mirror on node 'rabbit@cont-01': <18272.7490.0>
2022-12-15 12:05:50.934746-06:00 [info] <0.9951.0> Mirrored queue 'dhcp_agent.cont-02.altracom.net' in vhost '/': Adding mirror on node 'rabbit@cont-02': <18271.7567.0>
2022-12-15 12:05:50.939653-06:00 [info] <0.9951.0> Mirrored queue 'dhcp_agent.cont-02.altracom.net' in vhost '/': Adding mirror on node 'rabbit@cont-01': <18272.7501.0>
2022-12-15 12:05:50.973962-06:00 [info] <0.9964.0> Mirrored queue 'dhcp_agent_fanout_ac659e839d164932b5663f471874a104' in vhost '/': Adding mirror on node 'rabbit@cont-02': <18271.7578.0>
2022-12-15 12:05:50.985345-06:00 [info] <0.9964.0> Mirrored queue 'dhcp_agent_fanout_ac659e839d164932b5663f471874a104' in vhost '/': Adding mirror on node 'rabbit@cont-01': <18272.7512.0>
`
**Configure the ml2 component sudo vi /etc/neutron/plugins/ml2/ml2_conf.ini**
[ml2]
type_drivers = flat,vlan,vxlan
tenant_network_types = vxlan/ml2/ml2_conf.ini
mechanism_drivers = linuxbridge,l2population
extension_drivers = port_security
[ml2_type_flat]
flat_networks = tunl
[ml2_type_vxlan]
vni_ranges = 1:1000
[securitygroup]
enable_ipset = true
**Configure the linux bridge sudo vi /etc/neutron/plugins/ml2/linuxbridge_agent.ini**
[linux_bridge]
physical_interface_mappings = tunl:ens192
[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
enable_security_group = true
[vxlan]
enable_vxlan = true
local_ip = 192.168.120.11
l2_population = true
**Configure layer-3 Layer 3 switch agent sudo vi /etc/neutron/l3_agent.ini**
[DEFAULT]
interface_driver = linuxbridge
**Configure DHCP proxy, use DNSMASQ sudo vi /etc/neutron/dhcp_agent.ini**
[DEFAULT]
interface_driver = linuxbridge
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true
**Do neutron basic configuration sudo vi /etc/neutron/metadata_agent.ini**
[DEFAULT]
nova_metadata_host = controller
metadata_proxy_shared_secret = shared_secret
sudo tail -f /var/log/neutron/neutron-linuxbridge-agent.log
2022-12-16 14:56:01.943 1968 ERROR neutron.plugins.ml2.drivers.agent._common_agent File "/usr/lib/python3/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 689, in send
2022-12-16 14:56:01.943 1968 ERROR neutron.plugins.ml2.drivers.agent._common_agent return self._send(target, ctxt, message, wait_for_reply, timeout,
2022-12-16 14:56:01.943 1968 ERROR neutron.plugins.ml2.drivers.agent._common_agent File "/usr/lib/python3/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 678, in _send
2022-12-16 14:56:01.943 1968 ERROR neutron.plugins.ml2.drivers.agent._common_agent result = self._waiter.wait(msg_id, timeout,
2022-12-16 14:56:01.943 1968 ERROR neutron.plugins.ml2.drivers.agent._common_agent File "/usr/lib/python3/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 567, in wait
2022-12-16 14:56:01.943 1968 ERROR neutron.plugins.ml2.drivers.agent._common_agent message = self.waiters.get(msg_id, timeout=timeout)
2022-12-16 14:56:01.943 1968 ERROR neutron.plugins.ml2.drivers.agent._common_agent File "/usr/lib/python3/dist-packages/oslo_messaging/_drivers/amqpdriver.py", line 443, in get
2022-12-16 14:56:01.943 1968 ERROR neutron.plugins.ml2.drivers.agent._common_agent raise oslo_messaging.MessagingTimeout(
2022-12-16 14:56:01.943 1968 ERROR neutron.plugins.ml2.drivers.agent._common_agent oslo_messaging.exceptions.MessagingTimeout: Timed out waiting for a reply to message ID 62c0b27563df4470818635c6515bdfc1
2022-12-16 14:56:01.943 1968 ERROR neutron.plugins.ml2.drivers.agent._common_agent
2022-12-16 14:56:31.946 1968 ERROR neutron.plugins.ml2.drivers.agent._common_agent [-] Failed reporting state!: oslo_messaging.exceptions.MessagingTimeout: Timed out waiting for a reply to message ID fe0871b76c214fa6989c9e8313b6e0f6
**Here is the other Agent configuration:**
在所有控制器上配置ml2组件sudo vi /etc/neutron/plugins/ml2/ml2_conf.ini [ml2] type_drivers = flat,vlan,vxlan
租户网络类型 = vxlan
机制驱动程序 = linuxbridge,l2population
扩展驱动程序 = 端口安全
[ml2_type_flat] flat_networks = 提供商
[ml2_type_vxlan] vni_ranges = 1:1000
[安全组] enable_ipset = true
在所有控制器上配置 Linux 桥接器 sudo vi /etc/neutron/plugins/ml2/linuxbridge_agent.ini [linux_bridge] physical_interface_mappings = provider:ens192
[安全组] 防火墙驱动程序 = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
启用安全组=true
[vxlan] 启用_vxlan = true
本地 IP = 192.168.120.11
本地 IP = 192.168.120.12
本地 IP = 192.168.120.13
l2_population = true
配置 layer-3 三层交换机代理 sudo vi /etc/neutron/l3_agent.ini 在所有控制器上 [DEFAULT] interface_driver = linuxbridge
配置 DHCP 代理,在所有控制器上使用 DNSMASQ sudo vi /etc/neutron/dhcp_agent.ini [DEFAULT] interface_driver = linuxbridge
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true
在所有控制器上执行 neutron 基本配置 sudo vi /etc/neutron/metadata_agent.ini [DEFAULT] nova_metadata_host = controller
metadata_proxy_shared_secret = metadata_secret
memcache_服务器 = 192.168.10.11:11211,192.168.10.12:11211,192.168.10.13:11211
再次配置nova,将上述密码添加到nova中 sudo vi /etc/nova/nova.conf 在所有控制器上 [neutron] auth_type = password project_domain_name = Default project_name = service user_domain_name = Default username = neutron password = FGG6A92 region_name = RegionOne auth_url = https://controller:5000/v3 www_authenticate_uri = https://controller:5000/v3 memcached_servers = 192.168.120.11:11211,192.168.120.12:11211,192.168.120.13:11211 certfile = /etc/ssl/certs/certitficate.pem keyfile = /etc/ssl/private/certitficatekey.pem cafile = /etc/ssl/certs/ca.cer service_metadata_proxy = true metadata_proxy_shared_secret = metadata_secret
sudo ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini