[openstack常见问题解决方法总结]一、创建实例失败: 首先用下面命令查看服务是否正常nova-manage service list 如果不正常,则使用下面命令重启,如果还不行,则查看日志,service nova-api restartservice nova-cert restartservice nova-consoleauth restartservice nova-s...
显示全部[openstack常见问题解决方法总结]
一、创建实例失败:
首先用下面命令查看服务是否正常
- nova-manage service list
如果不正常,则使用下面命令重启,如果还不行,则查看日志, - service nova-api restart
- service nova-cert restart
- service nova-consoleauth restart
- service nova-scheduler restart
- service nova-conductor restart
- service nova-novncproxy restart
二、对网络的判断:
可以查看网桥
- ovs-vsctl show
网络流量查看:
- udhcpc eth0
三、安装后检测环境时遇到的问题及解决办法:
问题1 :aboutyun@controller:~$ keystone tenant-create --name admin --description "admin Tenant"
___提示:_____An unexpected error prevented the server from fulfilling your request. (HTTP 500)
_____原因1:
环境变量错误
记得重启后,执行下面命令
- export OS_SERVICE_TOKEN=570f150cb897e793e58f
- export OS_SERVICE_ENDPOINT=http://controller:35357/v2.0
原因2:_
____查看keystone日志,__获取如下关键信息 :
_1. (OperationalError) no such table: project u'INSERT INTO project (id, name, domain_id, des
- cription, enabled, extra) VALUES (?, ?, ?, ?, ?, ?)' ('70c0487ba99743719d6721a34560fca2',
u'admin', 'default', u'Admin Tenant', 1, '{}')
意思是说表不存在,进入mysql - mysql -uroot -p
- use keystone_
____1. show tables;
竟然是空的,也就是没有同步成功。
执行命令,再次同步。
- su -s /bin/sh -c "keystone-manage db_sync" keystone
还需要输入密码,算了还是使用root。
再次运行命令,还是不成功。
为什么?还是从配置入手。
编辑 /etc/keystone/keystone.conf
数据库明明连接上了,为什么会不成功, - [database]
- ...
connection = mysql://keystone:KEYSTONE_DBPASS@controller/keystone
后来在配置文件中,发现了sqllite,注释掉即可
再次运行命令
- su -s /bin/sh -c "keystone-manage db_sync" keystone
四、创建镜像的问题:_1. glance image-create --name "cirros-0.3.3-x86_64" --file cirros-0.3.3-x86_64-disk.img \___2. --disk-format qcow2 --container-format bare --is-public True --progress
__global name '_' is not defined glance
原来环境变量的问题。source 已经source了,但是却没有起作用。最后使用绝招
- export OS_TENANT_NAME=admin
- export OS_USERNAME=admin
- export OS_PASSWORD=ADMIN_PASS
- export OS_AUTH_URL=http://controller:35357/v2.0
在shell中直接执行shell。然后通过 - echo $OS_TENANT_NAME
检验能否安装成功。
__五、部署nova的注意点_nova-conductor在 nova-compute 服务 和 the database之间,它使 nova-compute 服务无需直接访问___云数据库(cloud database)。尽管如此,不要将
__nova-conductor部署在运行nova-compute 服务的节点上。
收起