求教-neutron代理报错的分析

正明 发布于 2014/11/04 11:02
阅读 3K+
收藏 0

安裝步驟按照文档openstack-install-guide-apt-trunk.pdf指导,做到增加网络组件部分(6. Add a networking component)驗证时出現錯误。

在controller节点执行命令 neutron agent-list 返回结果不正确,如下图。

root@controller :~# neutron agent-list
+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+
| id                                   | agent_type         | host    | alive | admin_state_up | binary                    |
+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+
| 0def60fd-7d9c-4f21-a5f3-8099815da788 | DHCP agent         | network | xxx   | True           | neutron-dhcp-agent        |
| 3d99c6d2-90b8-4ba8-8138-84cba8aa8304 | L3 agent           | network | xxx   | True           | neutron-l3-agent          |
| bf06584d-9884-4617-b637-d760e4243f86 | Open vSwitch agent | network | xxx   | True           | neutron-openvswitch-agent |
+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+

在network节点,查看metadata-agent的日志信息,截取如下,提示“No module named rabbit”,但确认rabbit MQ 已經配置了。

root@network :/var/log/neutron# tail -f /var/log/neutron/metadata-agent.log 

2014-11-04 09:56:32.876 13367 ERROR neutron.agent.metadata.agent [req-be2a1901-871d-49e5-948b-240371fa4913 None] Failed reporting state!
2014-11-04 09:56:32.876 13367 TRACE neutron.agent.metadata.agent Traceback (most recent call last):
2014-11-04 09:56:32.876 13367 TRACE neutron.agent.metadata.agent   File "/usr/lib/python2.7/dist-packages/neutron/agent/metadata/agent.py", line 339, in _report_state
2014-11-04 09:56:32.876 13367 TRACE neutron.agent.metadata.agent     use_call=self.agent_state.get('start_flag'))
2014-11-04 09:56:32.876 13367 TRACE neutron.agent.metadata.agent   File "/usr/lib/python2.7/dist-packages/neutron/agent/rpc.py", line 72, in report_state
2014-11-04 09:56:32.876 13367 TRACE neutron.agent.metadata.agent     return self.call(context, msg, topic=self.topic)
2014-11-04 09:56:32.876 13367 TRACE neutron.agent.metadata.agent   File "/usr/lib/python2.7/dist-packages/neutron/openstack/common/rpc/proxy.py", line 125, in call
2014-11-04 09:56:32.876 13367 TRACE neutron.agent.metadata.agent     result = rpc.call(context, real_topic, msg, timeout)
2014-11-04 09:56:32.876 13367 TRACE neutron.agent.metadata.agent   File "/usr/lib/python2.7/dist-packages/neutron/openstack/common/rpc/__init__.py", line 112, in call
2014-11-04 09:56:32.876 13367 TRACE neutron.agent.metadata.agent     return _get_impl().call(CONF, context, topic, msg, timeout)
2014-11-04 09:56:32.876 13367 TRACE neutron.agent.metadata.agent   File "/usr/lib/python2.7/dist-packages/neutron/openstack/common/rpc/__init__.py", line 274, in _get_impl
2014-11-04 09:56:32.876 13367 TRACE neutron.agent.metadata.agent     _RPCIMPL = importutils.import_module(impl)
2014-11-04 09:56:32.876 13367 TRACE neutron.agent.metadata.agent   File "/usr/lib/python2.7/dist-packages/neutron/openstack/common/importutils.py", line 57, in import_module
2014-11-04 09:56:32.876 13367 TRACE neutron.agent.metadata.agent     __import__(import_str)
2014-11-04 09:56:32.876 13367 TRACE neutron.agent.metadata.agent ImportError: No module named rabbit
2014-11-04 09:56:32.876 13367 TRACE neutron.agent.metadata.agent 

请高手幚忙分析,或提供思路。

以下是问题补充:

@正明:补丁描述,neutron节点上的metadata_agent.ini配置文件如下 root@network:/etc/neutron# tail -f /etc/neutron/metadata_agent.ini [DEFAULT] auth_url = http://10.5.89.101:5000/v2.0 auth_region = regionOne admin_tenant_name = service admin_user = neutron admin_password = NEUTRON_PASS nova_metadata_ip = 10.5.89.101 metadata_proxy_shared_secret = 1e48fca6776a44d18688 verbose = True (2014/11/04 11:11)
@正明:上面的补充描述格式乱了,重新贴一下,neutron节点上的metadata_agent.ini配置文件 root@network:/etc/neutron# tail -f /etc/neutron/metadata_agent.ini [DEFAULT] auth_url = http://10.5.89.101:5000/v2.0 auth_region = regionOne admin_tenant_name = service admin_user = neutron admin_password = NEUTRON_PASS nova_metadata_ip = 10.5.89.101 metadata_proxy_shared_secret = 1e48fca6776a44d18688 verbose = True (2014/11/04 11:15)
@正明:上面的补充描述格式乱了,重新贴一下,neutron节点上的metadata_agent.ini配置文件 root@network:/etc/neutron# tail -f /etc/neutron/metadata_agent.ini [DEFAULT] auth_url = http://10.5.89.101:5000/v2.0 auth_region = regionOne admin_tenant_name = service admin_user = neutron admin_password = NEUTRON_PASS nova_metadata_ip = 10.5.89.101 metadata_proxy_shared_secret = 1e48fca6776a44d18688 verbose = True (2014/11/04 11:16)
加载中
0
正明
正明

结帖,非常感谢openstack群的"上海-IT Crowd"兄弟,根据他的建议才得以解决。

----------------------------------------------------------------------------------------

改一下network节点的neutron.conf配置文件中的rpc_backend参数值。

原来是按照官方文档设置的,rpc_backend=rabbit,改为:

root@network :/etc/neutron# grep rpc_backend neutron.conf

rpc_backend = neutron.openstack.common.rpc.impl_kombu

----------------------------------------------------------------------------------

root@controller :/usr# neutron agent-list
+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+
| id                                   | agent_type         | host    | alive | admin_state_up | binary                    |
+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+
| 0def60fd-7d9c-4f21-a5f3-8099815da788 | DHCP agent         | network | :-)   | True           | neutron-dhcp-agent        |
| 210ae258-207b-4a2f-b329-eafa80120615 | Metadata agent     | network | :-)   | True           | neutron-metadata-agent    |
| 3d99c6d2-90b8-4ba8-8138-84cba8aa8304 | L3 agent           | network | :-)   | True           | neutron-l3-agent          |
| bf06584d-9884-4617-b637-d760e4243f86 | Open vSwitch agent | network | :-)   | True           | neutron-openvswitch-agent |
+--------------------------------------+--------------------+---------+-------+----------------+---------------------------+

正常了。

neo_seele
neo_seele
感谢分享,我也遇到类似的问题通过您的帖子解决了,请问这样解决的原理是什么呀,因为比较担心会对后续的安装搭建产生影响,自己水平不高,对于和教程不一样的地方还是不放心。
返回顶部
顶部