Nov 262013
 

今天打算尝试使用RDO进行部署,把Neutron单独一个节点进行部署,而不是安装在控制节点上。我对packstack的那个应答文件还是很熟悉的。应该只需要设置几个参数就可以。

CONFIG_NEUTRON_SERVER_HOST=172.28.1.12
CONFIG_NEUTRON_L3_HOSTS=172.28.1.12
CONFIG_NEUTRON_DHCP_HOSTS=172.28.1.12
CONFIG_NEUTRON_METADATA_HOSTS=172.28.1.12

这个时候packstack就会把Neutron安装在一个单独的节点里。一起看上去都很顺利,我登陆Dashboard,结果出现错误。这我一下子就蒙了。我重新安装一遍,检查参数,发现没任何问题。

先把Dashboard打开debug状态,看看为啥不能登陆

编辑 /usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py

#DEBUG = False
DEBUG = True

重启apache,这时候登陆Dashboard。就可以明显看到无法登陆的错误。

无法连接到Neutron.

看到这个错误,我第一想到的就是这个bug

http://openstack.redhat.com/forum/discussion/910/havanna-issues-with-multi-node#Item_14

我检查一下我的两个计算节点的 /var/log/neutron/openvswitch-agent.log

2013-11-26 20:37:50.713 996 INFO neutron.plugins.openvswitch.agent.ovs_neutron_agent [-] 
Agent tunnel out of sync with plugin!
2013-11-26 20:38:51.033 996 INFO neutron.plugins.openvswitch.agent.ovs_neutron_agent [-] 
Agent tunnel out of sync with plugin!

这个时候,我去网络节点,添加两条iptables的规则

iptables -I INPUT -s 172.28.1.10/32 -p tcp --dport 9696 -j ACCEPT
iptables -I INPUT -s 172.28.1.132/32 -p tcp --dport 9696 -j ACCEPT

这时候重启一下计算节点的switch agent,

/etc/init.d/neutron-openvswitch-agent restart

log里的错误信息就没有。

不过这个时候我还是无法登陆Dashboard,还是显示相同的错误,无法连接到Neutron.

我登陆Neutron,查看一下 /var/log/neutron/server.log

 TRACE neutron.common.config ImportError: No module named keystoneclient.middleware.auth_token

猜测网络节点没有安装keystone client,并且还发现neutron server是无法启动。

yum -y install python-keystoneclient

重启

/etc/init.d/neutron-server restart

这个时候,我就可以登陆Dashboard.

 

顺便给redhat报告一个bug.http://openstack.redhat.com/forum/discussion/945/havana-neutron-in-single-node-lack-keystone-client#Item_1

  4 Responses to “一次Openstack的排错经历”

  1. 我也遇到类似的错误,不过命令行与dashboard都报错:Connection to neutron failed: Maximum attempts reached,后来发现:用脚本创建的keystone的neutron 的API endpoint没有指向neutron-server的节点,于是直接更改一下API endpoint 就可以了

  2. Very nice。 一步步讲是看到了哪些可疑现象或log的错误提示,然后做了哪些尝试。

    赞!

 Leave a Reply

(required)

(required)

This site uses Akismet to reduce spam. Learn how your comment data is processed.