刚接触openstack不久,参考官方文档实施3节点部署时遇到了一些问题,主要集中在compute node,还好有十几年的运维经验协助我把问题一一解决了。以下会用红字部分标识解决方法。
系统环境:CentOS 6.5 64位
各节点IP:完全按照官方文档中的IP进行了配置
官方文档:http://docs.openstack.org/icehouse/install-guide/install/zypper/content/
日志记录日期:2014-7-6
问题部分:
Controller Node
Updatethe ALLOWED_HOSTS in local_settings.py to include theaddresses you wish to access the dashboard from.
Edit /etc/openstack-dashboard/local_settings:
ALLOWED_HOSTS= [‘localhost‘, ‘my-desktop‘]
实际配置为:
ALLOWED_HOSTS = [‘10.0.0.11‘, ‘0.0.0.0‘]
这段配置估计是python的列表,指允许访问dashboard的hosts,
按照官方文档的配置,dashboard页面会报错无法开启。如下图所示:
通过检查Apache日志/var/log/httpd/error_log 后排除了此问题。
Compute Node
问题1:
OpenStack Networking (neutron)
To install the Networkingcomponents
yum install openstack-neutron-ml2 openstack-neutron-openvswitch
实际还缺少:
openstack-nova-compute
完整的内容为:
yum install openstack-neutron-ml2openstack-neutron-openvswitch openstack-nova-compute -y
问题2:
To configureCompute to use Networking
By default, mostdistributions configure Compute to use legacy networking. You must reconfigureCompute to manage networks through Networking.
Run the following commands:
Replace NEUTRON_PASS with the password you chose for the neutron user in the Identity service.
# openstack-config --set/etc/nova/nova.conf DEFAULT network_api_class nova.network.neutronv2.api.API # openstack-config --set/etc/nova/nova.conf DEFAULT neutron_url http://controller:9696 # openstack-config --set /etc/nova/nova.confDEFAULT neutron_auth_strategy keystone # openstack-config --set/etc/nova/nova.conf DEFAULT neutron_admin_tenant_name service # openstack-config --set/etc/nova/nova.conf DEFAULT neutron_admin_username neutron # openstack-config --set/etc/nova/nova.conf DEFAULT neutron_admin_password NEUTRON_PASS # openstack-config --set/etc/nova/nova.conf DEFAULT neutron_admin_auth_url http://controller:35357/v2.0 # openstack-config --set/etc/nova/nova.conf DEFAULT linuxnet_interface_driver nova.network.linux_net.LinuxOVSInterfaceDriver # openstack-config --set/etc/nova/nova.conf DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver # openstack-config --set/etc/nova/nova.conf DEFAULT security_group_api neutron
实际还缺少:
openstack-config --set /etc/nova/nova.conf DEFAULT qpid_hostname controller openstack-config --set /etc/nova/nova.conf DEFAULT rpc_backend qpid openstack-config --set /etc/nova/nova.conf DEFAULT glance_host controller openstack-config --set /etc/nova/nova.conf DEFAULT auth_strategy keystone openstack-config --set /etc/nova/nova.conf DEFAULT novncproxy_base_url http://10.0.0.11:6080/vnc_auto.html openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_proxyclient_address 10.0.0.31 openstack-config --set /etc/nova/nova.conf DEFAULT vncserver_listen 0.0.0.0 chkconfig openstack-nova-compute on
原因分析:
通过检查compute日志/var/log/nova/compute.log,发现如下问题。
1、compute node无法和controller node通信,如下图所示
查看/etc/nova/nova.conf配置文件,确认默认配置为rpc_backend=rabbit、qpid_hostname=localhost,故修改
rpc_backend=qpid
qpid_hostname=controller
2、compute node无法从controller node GET到导入的image,如下图所示
controller node 日志/var/log/glance/api.log截图
compute node日志/var/log/nova/compute.log截图
查看/etc/nova/nova.conf配置文件,确认默认配置为glance_host=$my_ip而my_ip=10.0.0.1,故修改
glance_host=controller
修改后发现还是无法获取到image,再次分析/var/log/glance/api.log后确认,GET的时候未带入token信息。查看/etc/nova/nova.conf配置文件,确认默认配置为auth_strategy=noauth,故修改
auth_strategy=keystone
3、controller node上的dashboard无法打开虚机的控制台,查看各日志均无任何报错信息。前台报错截图如下
搜索官方帮助区后解决了此问题
编辑compute节点的/etc/nova/nova.conf配置文件
novncproxy_base_url=http://10.0.0.11:6080/vnc_auto.html
vncserver_proxyclient_address=10.0.0.31
vncserver_listen=0.0.0.0
修改配置后需要重启openstack-nova-compute服务,并使用netstat命令检查5900端口状态,这是控制台需要访问compute的端口
问题3:
执行openstack-nova-compute启动命令,前端无任何报错信息,服务可正常启动。
/etc/init.d/openstack-nova-compute start
稍后检查openstack-nova-compute状态,会发现提示信息为进程不存在,但pid文件存在需要删除pid文件后方可再次启动服务。
/etc/init.d/openstack-nova-compute status rm -f /var/run/nova/nova-compute.pid
解决方法:
通过检查compute日志/var/log/nova/compute.log后排除了此问题。
官方文档中未对libvirtd设置进行介绍,实际使用中需要对libvirtd做如下配置。
· Edit the cgroup_device_acl array in the/etc/libvirt/qemu.conf file to:
cgroup_device_acl = [ "/dev/null", "/dev/full","/dev/zero", "/dev/random", "/dev/urandom", "/dev/ptmx", "/dev/kvm","/dev/kqemu", "/dev/rtc","/dev/hpet","/dev/net/tun" ]
· Enable live migration by updating/etc/libvirt/libvirtd.conf file:
listen_tls = 0 listen_tcp = 1 auth_tcp = "none"
启动openstack-nova-compute前需要先启动libvirtd服务,并将libvirtd设置为开机启动服务
/etc/init.d/libvirtd start chkconfig libvirtd on
本文出自 “lan2003” 博客,请务必保留此出处http://lan2003.blog.51cto.com/252098/1434981
openstack icehouse 3节点部署遇到的问题和解决方法,布布扣,bubuko.com
openstack icehouse 3节点部署遇到的问题和解决方法
原文地址:http://lan2003.blog.51cto.com/252098/1434981