使用OpenStack遇到的问题

openstack的相关包:

First you have to import several GPG public keys:

rpm –import http://download.openSUSE.org/repositories/isv:/B1-Systems:/OpenStack:/release:/Essex/SLE_11_SP2/repodata/repomd.xml.key

rpm –import http://download.opensuse.org/repositories/isv:/B1-Systems:/OpenStack:/release:/Essex:/requirements/SLE_11_SP2/repodata/repomd.xml.key

Then you can add the repositories using zypper:

zypper ar http://download.opensuse.org/repositories/isv:/B1-Systems:/OpenStack:/release:/Essex/SLE_11_SP2/isv:B1-Systems:OpenStack:release:Essex.repo

zypper ar http://download.opensuse.org/repositories/isv:/B1-Systems:/OpenStack:/release:/Essex:/requirements/SLE_11_SP2/isv:B1-Systems:OpenStack:release:Essex:requirements.repo

其它依赖包:

zypper ar http://download.opensuse.org/repositories/isv:/B1-Systems:/OpenStack:/requirements/SLE_11_SP2/isv:B1-Systems:OpenStack:requirements.repo

RabbitMQ软件包:

You can find an up to date version of RabbitMQ in the project “isv:B1-Systems:OpenStack:tools:rabbitmq” for SLES11 SP2 and openSUSE 12.1. Add the public GPG key and the repository on your queuing system this way:

SLES11 SP2(rabbitmq-server)

rpm –import http://download.opensuse.org/repositories/isv:/B1-Systems:/OpenStack:/tools:/rabbitmq/SLE_11_SP2/repodata/repomd.xml.key

zypper ar http://download.opensuse.org/repositories/isv:/B1-Systems:/OpenStack:/tools:/rabbitmq/SLE_11_SP2/isv:B1-Systems:OpenStack:tools:rabbitmq.repo

在自己安装的过程中也遇到了不少问题,我列出了一些我碰到过的问题和我现在没解决的问题,如果哪位大侠走过就指点一下,谢谢!

1.安装完openstack-nova-compute后没有日志输出:

缺少python依赖包,安装依赖包

python-repoze.lru-0.3-1.1.x86_64.rpm

2.安装完nova-compute后启动服务:

此时如果没有初始化数据会报告一个无法查询数据库的错误。

解决方法:

配置nova.conf的nova数据库,并使用nova-manage db sync初始化数据库。

3.配置libvirt和libvirt_type,启动nova-compute,出现问题:

2012-04-13 23:56:24 AUDIT nova.service [-] Starting compute node (version 2012.1-LOCALBRANCH:LOCALREVISION)

2012-04-13 23:56:24 CRITICAL nova [-] [Errno 2] No such file or directory: ‘/usr/lib64/python2.6/site-packages/instances’

解决方法,创建目录:

mkdir -p /usr/lib64/python2.6/site-packages/instances

4.nova-compute启动时出现:

2012-04-15 18:25:18 TRACE nova     raise exception.ClassNotFound(class_name=class_str, exception=exc)

2012-04-15 18:25:18 TRACE nova ClassNotFound: Class API could not be found: No module named glance.common

2012-04-15 18:25:18 TRACE nova

解决方法:(安装缺少的python包)

Installing: python-dateutil-1.5-1.1 [done]

Installing: python-pycrypto-2.5-1.1 [done]

Installing: python-passlib-1.5.3-1.1 [done]

Installing: python-xattr-0.6.2-1.1 [done]

Installing: python-PasteScript-1.7.5-1.1 [done]

Installing: python-python-memcached-1.47-1.1 [done]

Installing: libmysqlclient_r15-5.0.94-0.2.4.1 [done]

Installing: python-ldap-2.3.5-1.21 [done]

Installing: python-mysql-1.2.2-2.12 [done]

Installing: python-keystone-2012.1-1.1 [done]

5.安装完成后启动nova-compute,启动,nova-compute日志

2012-04-15 19:51:06 TRACE nova   File “/usr/lib64/python2.6/site-packages/sqlalchemy/engine/default.py”, line 330, in do_execute

2012-04-15 19:51:06 TRACE nova     cursor.execute(statement, parameters)

2012-04-15 19:51:06 TRACE nova   File “/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py”, line 166, in execute

2012-04-15 19:51:06 TRACE nova     self.errorhandler(self, exc, value)

2012-04-15 19:51:06 TRACE nova   File “/usr/lib64/python2.6/site-packages/MySQLdb/connections.py”, line 35, in defaulterrorhandler

2012-04-15 19:51:06 TRACE nova     raise errorclass, errorvalue

目前来看nova数据库需要连接后数据库还没初始化。

解决方法,初始化nova数据库:

susesp2:/var/log/nova # nova-manage db sync

2012-04-15 20:02:45 DEBUG nova.utils [-] backend <module ‘nova.db.sqlalchemy.migration’ from ‘/usr/lib64/python2.6/site-packages/nova/db/sqlalchemy/migration.pyc’> from (pid=10941) __get_backend /usr/lib64/python2.6/site-packages/nova/utils.py:658

2012-04-15 20:03:23 WARNING nova.utils [-] /usr/lib64/python2.6/site-packages/nova/db/sqlalchemy/migrate_repo/versions/075_convert_bw_usage_to_store_network_id.py:49: SADeprecationWarning: useexisting is deprecated.  Use extend_existing.

useexisting=True)

2012-04-15 20:03:31 WARNING nova.utils [-] /usr/lib64/python2.6/site-packages/nova/db/sqlalchemy/migrate_repo/versions/081_drop_instance_id_bw_cache.py:40: SADeprecationWarning: useexisting is deprecated.  Use extend_existing.

useexisting=True)

6.libvirt连接错误:

2012-04-15 20:24:08 TRACE nova   File “/usr/lib64/python2.6/site-packages/libvirt.py”, line 2836, in getVersion

2012-04-15 20:24:08 TRACE nova     if ret == -1: raise libvirtError (‘virConnectGetVersion() failed’, conn=self)

2012-04-15 20:24:08 TRACE nova libvirtError: internal error Cannot find suitable emulator for x86_64

解决方法:

Essex默认配置nova.conf的libvirt_type=”xen”默认配置文件中需要有引号,无法读取,解决方式,libvirt_type=xen这样即可。

相关推荐