使用OpenStack遇到的问题(4)

13.在测试的时候,多次对于网络操作,会引起如下错误:
2012-05-11 17:51:04 TRACE nova.rpc.amqp [u'Traceback (most recent call last):\n', u'  File "/usr/lib64/Python2.6/site-packages/nova/rpc/amqp.py", line 252, in _process_data\n    rval = node_func(context=ctxt, **node_args)\n', u'  File "/usr/lib64/python2.6/site-packages/nova/network/manager.py", line 258, in wrapped\n    return func(self, context, *args, **kwargs)\n', u'  File "/usr/lib64/python2.6/site-packages/nova/network/manager.py", line 321, in allocate_for_instance\n    **kwargs)\n', u'  File "/usr/lib64/python2.6/site-packages/nova/network/manager.py", line 258, in wrapped\n    return func(self, context, *args, **kwargs)\n', u'  File "/usr/lib64/python2.6/site-packages/nova/network/manager.py", line 907, in allocate_for_instance\n    requested_networks=requested_networks)\n', u'  File "/usr/lib64/python2.6/site-packages/nova/network/manager.py", line 196, in _allocate_fixed_ips\n    utils.to_primitive(network)}})\n', u'  File "/usr/lib64/python2.6/site-packages/nova/rpc/__init__.py", line 68, in call\n    return _get_impl().call(context, topic, msg, timeout)\n', u'  File "/usr/lib64/python2.6/site-packages/nova/rpc/impl_kombu.py", line 674, in call\n    return rpc_amqp.call(context, topic, msg, timeout, Connection.pool)\n', u'  File "/usr/lib64/python2.6/site-packages/nova/rpc/amqp.py", line 338, in call\n    rv = list(rv)\n', u'  File "/usr/lib64/python2.6/site-packages/nova/rpc/amqp.py", line 306, in __iter__\n    raise result\n', u'RemoteError: Remote error: NetworkNotFound Network 4 could not be found.\n[u\'Traceback (most recent call last):\\n\', u\'  File "/usr/lib64/python2.6/site-packages/nova/rpc/amqp.py", line 252, in _process_data\\n    rval = node_func(context=ctxt, **node_args)\\n\', u\'  File "/usr/lib64/python2.6/site-packages/nova/network/manager.py", line 785, in set_network_host\\n    self.host)\\n\', u\'  File "/usr/lib64/python2.6/site-packages/nova/db/api.py", line 818, in network_set_host\\n    return IMPL.network_set_host(context, network_id, host_id)\\n\', u\'  File "/usr/lib64/python2.6/site-packages/nova/db/sqlalchemy/api.py", line 102, in wrapper\\n    return f(*args, **kwargs)\\n\', u\'  File "/usr/lib64/python2.6/site-packages/nova/db/sqlalchemy/api.py", line 2110, in network_set_host\\n    raise exception.NetworkNotFound(network_id=network_id)\\n\', u\'NetworkNotFound: Network 4 could not be found.\\n\'].\n’].

解决方法:
drop database nova;
create database nova;
重新初始化数据库:
nova-manage db sync

尚未解决的问题:(路过的大侠指点一下),在key注入时失败:

2012-04-19 16:46:44 DEBUG nova.utils [req-a9beb228-97cb-4854-b6a6-e16009f10f94 kevin mycloud] Running cmd (subprocess): sudo kpartx -d /dev/loop3 from (pid=24116) execute /usr/lib64/python2.6/site-packages/nova/utils.py:219

2012-04-19 16:46:44 DEBUG nova.utils [req-a9beb228-97cb-4854-b6a6-e16009f10f94 kevin mycloud] Running cmd (subprocess): sudo losetup –detach /dev/loop3 from (pid=24116) execute /usr/lib64/python2.6/site-packages/nova/utils.py:219

2012-04-19 16:46:45 WARNING nova.virt.libvirt.connection [req-a9beb228-97cb-4854-b6a6-e16009f10f94 kevin mycloud] [instance: 07525848-d3d6-4545-866a-cd3da516182d] Ignoring error injecting data into image a0c337e6-0716-46db-9e33-078321398bf3 (Unexpected error while running command.

Command: sudo mkdir -p /tmp/tmpGTSXMs/root/.ssh

Exit code: 1

Stdout: ”

Stderr: “mkdir: cannot create directory `/tmp/tmpGTSXMs/root’: Read-only file system\n”)

2012-04-19 16:46:52 DEBUG nova.virt.libvirt.connection [req-a9beb228-97cb-4854-b6a6-e16009f10f94 kevin mycloud]

对于在SUSE SP2上安装openstack之前建议先测试python版本是否满足openstack Essex需要:

test script:

## vim: set syn=on ts=4 sw=4 sts=0 noet foldmethod=indent:

## purpose: check if python interpreter contains blocking issues for OpenStack

## copyright: B1 Systems GmbH <info@b1-systems.de>, 2012.

## license: GPLv3+,

## author: Christian Berendt <berendt@b1-systems.de>, 2012.

print “test if keyword arguments with unicode keys are working without problems”

print “expected result: {u’key’: ‘value’}”

print

def testing(**kwargs):

print kwargs

try:

testing(**{u’key’: ‘value’})

except TypeError:

print “ERROR: catched TypeError, keyword arguments with unicode keys are NOT working”

print

print “test if ident of thread is working without problems”

print “expected result: a long integer (for example: 140630265239296)”

print

import threading

t = threading.current_thread()

ident = t.ident

if ident == None:

print “ERROR: ident of current thread is None, ident of threads is NOT working”

else:

print ident

如果输出为这段代码,基本python解析器满足要求,不会有大问题,不然在对应xml解析等问题上还是有很多问题:

print “test if ident of thread is working without problems”

print “expected result: a long integer (for example: 140630265239296)”

说明针对XEN镜像注入网络配置文件和key的问题,目前来看由于XEN的镜像不支持注入,需要修改openstack代码,目前还在研究代码,杯具,还不会改,求有经验者指导!!!

遇到问题追加及补充

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/cbdff21b353b3205e2991f4e81b86ec7.html