neutron-openvswitch-agent 服务启动失败

本文记录了neutron-openvswitch-agent服务出现错误并无法启动的问题解决过程,包括日志分析、清理流表及服务重启等步骤。

1.openvswitch-agent.log日志报错信息,重启neutron-openvswitch-agent服务成功,但是服务状态无法启动。

2019-06-13 12:30:22.510 4208 INFO neutron.agent.securitygroups_rpc [req-8edf01ca-a3fc-43c6-bdce-44083eb1a518 - - - - -] Refresh firewall rules
2019-06-13 12:30:22.646 4208 INFO neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [req-8edf01ca-a3fc-43c6-bdce-44083eb1a518 - - - - -] Configuration for devices up [] and devices down [] complet
ed.
2019-06-13 12:30:49.938 4208 INFO neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [req-8edf01ca-a3fc-43c6-bdce-44083eb1a518 - - - - -] Agent caught SIGTERM, quitting daemon loop.
2019-06-13 12:30:50.049 4208 ERROR neutron.agent.linux.async_process [-] Error received from [ovsdb-client monitor Interface name,ofport,external_ids --format=json]: None
2019-06-13 12:30:50.049 4208 ERROR neutron.agent.linux.async_process [-] Process [ovsdb-client monitor Interface name,ofport,external_ids --format=json] dies due to the error: None
2019-06-13 12:30:50.060 4208 INFO oslo_rootwrap.client [req-8edf01ca-a3fc-43c6-bdce-44083eb1a518 - - - - -] Stopping rootwrap daemon process with pid=4241
2019-06-13 12:30:51.791 8239 INFO neutron.common.config [-] Logging enabled!
2019-06-13 12:30:51.792 8239 INFO neutron.common.config [-] /usr/bin/neutron-openvswitch-agent version 8.1.2
2019-06-13 12:30:51.800 8239 WARNING oslo_config.cfg [-] Option "prevent_arp_spoofing" from group "AGENT" is deprecated for removal.  Its value may be silently ignored in the future.
2019-06-13 12:30:51.924 8239 INFO oslo_rootwrap.client [-] Spawned new rootwrap daemon process with pid=8279
2019-06-13 12:30:52.013 8239 INFO neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [req-f04c0a10-18f2-45d1-93d7-6056f75a81f2 - - - - -] Mapping physical network physnet1 to bridge br-ex
2019-06-13 12:30:52.124 8239 INFO neutron.agent.l2.extensions.manager [req-f04c0a10-18f2-45d1-93d7-6056f75a81f2 - - - - -] Loaded agent extensions: []
2019-06-13 12:30:52.256 8239 INFO neutron.plugins.ml2.drivers.openvswitch.agent.ovs_dvr_neutron_agent [req-f04c0a10-18f2-45d1-93d7-6056f75a81f2 - - - - -] L2 Agent operating in DVR Mode with MAC fa:16:3f:d9:0a:
54
2019-06-13 12:30:52.519 8239 INFO neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [-] Agent has just been revived. Doing a full sync.
2019-06-13 12:30:52.753 8239 CRITICAL neutron [req-f04c0a10-18f2-45d1-93d7-6056f75a81f2 - - - - -] KeyError: 6
2019-06-13 12:30:52.753 8239 ERROR neutron Traceback (most recent call last):
2019-06-13 12:30:52.753 8239 ERROR neutron   File "/usr/bin/neutron-openvswitch-agent", line 10, in <module>
2019-06-13 12:30:52.753 8239 ERROR neutron     sys.exit(main())
2019-06-13 12:30:52.753 8239 ERROR neutron   File "/usr/lib/python2.7/site-packages/neutron/cmd/eventlet/plugins/ovs_neutron_agent.py", line 20, in main
2019-06-13 12:30:52.753 8239 ERROR neutron     agent_main.main()
2019-06-13 12:30:52.753 8239 ERROR neutron   File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/main.py", line 49, in main
2019-06-13 12:30:52.753 8239 ERROR neutron     mod.main()
2019-06-13 12:30:52.753 8239 ERROR neutron   File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/ovs_ofctl/main.py", line 36, in main
2019-06-13 12:30:52.753 8239 ERROR neutron     ovs_neutron_agent.
### Neutron 服务进程未找到及权限问题分析 在 OpenStack 的 DevStack 环境中,如果 `neutron-metadata-agent` 和 `neutron-openvswitch-agent` 进程未找到或出现权限问题,通常是由于配置文件错误、服务启动或用户权限不足引起的。以下是具体原因和解决方案。 #### 1. 配置文件检查 确保 `/etc/neutron/metadata_agent.ini` 文件中正确配置了元数据代理的参数。例如: ```ini [DEFAULT] nova_metadata_ip = controller metadata_proxy_shared_secret = westos ``` 这些参数用于启用元数据代理并设置共享密钥[^1]。如果配置不正确,`neutron-metadata-agent` 可能无法正常启动。 对于 `neutron-openvswitch-agent`,需要确认 `/etc/neutron/plugins/ml2/openvswitch_agent.ini` 文件中的配置是否正确。特别是以下部分: ```ini [ovs] local_ip = <your_local_ip> bridge_mappings = physnet1:br-ex ``` 此外,还需要确保集成网桥 `br-int` 和外部网桥 `br-ex` 已正确创建并连接到物理网络接口[^2]。 #### 2. 服务状态检查 使用以下命令检查相关服务的状态: ```bash systemctl status neutron-metadata-agent systemctl status neutron-openvswitch-agent ``` 如果服务启动,可以尝试手动启动它们: ```bash systemctl start neutron-metadata-agent systemctl start neutron-openvswitch-agent ``` 同时,确保服务设置为开机自启: ```bash systemctl enable neutron-metadata-agent systemctl enable neutron-openvswitch-agent ``` #### 3. 日志分析 查看日志文件以获取更多信息。相关日志路径通常为: - `/var/log/neutron/metadata-agent.log` - `/var/log/neutron/openvswitch-agent.log` 通过以下命令查看日志内容: ```bash tail -f /var/log/neutron/metadata-agent.log tail -f /var/log/neutron/openvswitch-agent.log ``` 如果日志中显示权限错误(如 `operation not permitted`),可能是因为运行服务的用户缺少必要的权限。确保服务以正确的用户(通常是 `neutron`)运行,并且该用户对所需资源具有适当的访问权限。 #### 4. 权限问题排查 检查 `neutron` 用户的权限设置。例如,确保 `/etc/neutron/` 目录及其子文件的权限正确: ```bash chown -R neutron:neutron /etc/neutron/ chmod -R 640 /etc/neutron/ ``` 此外,Open vSwitch 的 TAP 设备可能需要额外的权限调整。根据引用内容[^2],由于 OpenStack 安全组规则与 iptables 的兼容性问题,TAP 设备不能直接连接到 Open vSwitch 端口。因此,确保安全组规则已正确应用,并验证 Open vSwitch 的配置是否符合要求。 #### 5. Dev
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值