标签:msgpack.pack python msgpack.packs nova msgpack msgpack-python
I got the following errors when I was deploying OpenStack with devstack. 2013-02-28 01:08:28 DEBUG nova.utils [-] backend <module ‘nova.db.sqlalchemy.migration‘ from ‘/opt/stack /nova/nova/db/sqlalchemy/migration.pyc‘> from (pid=27011) __get_backend /opt/stack/nova/nova/utils.py:50 6 Command failed, please check log for more info 2013-02-28 01:09:15 CRITICAL nova [-] ‘module‘ object has no attribute ‘packs‘ 2013-02-28 01:09:15 TRACE nova Traceback (most recent call last): 2013-02-28 01:09:15 TRACE nova File "/opt/stack/nova/bin/nova-manage", line 1404, in <module> 2013-02-28 01:09:15 TRACE nova main() 2013-02-28 01:09:15 TRACE nova File "/opt/stack/nova/bin/nova-manage", line 1392, in main 2013-02-28 01:09:15 TRACE nova rpc.cleanup() 2013-02-28 01:09:15 TRACE nova File "/opt/stack/nova/nova/openstack/common/rpc/__init__.py", line 203, in cleanup 2013-02-28 01:09:15 TRACE nova return _get_impl().cleanup() 2013-02-28 01:09:15 TRACE nova File "/opt/stack/nova/nova/openstack/common/rpc/__init__.py", line 264, in _get_impl 2013-02-28 01:09:15 TRACE nova _RPCIMPL = importutils.import_module(cfg.CONF.rpc_backend) 2013-02-28 01:09:15 TRACE nova File "/opt/stack/nova/nova/openstack/common/importutils.py", line 58, i n import_module 2013-02-28 01:09:15 TRACE nova __import__(import_str) 2013-02-28 01:09:15 TRACE nova File "/opt/stack/nova/nova/openstack/common/rpc/impl_kombu.py", line 30 , in <module> 2013-02-28 01:09:15 TRACE nova import kombu.messaging 2013-02-28 01:09:15 TRACE nova File "/usr/lib/python2.7/site-packages/kombu/messaging.py", line 15, in <module> 2013-02-28 01:09:15 TRACE nova from kombu.serialization import encode 2013-02-28 01:09:15 TRACE nova File "/usr/lib/python2.7/site-packages/kombu/serialization.py", line 30 0, in <module> 2013-02-28 01:09:15 TRACE nova register_msgpack() 2013-02-28 01:09:15 TRACE nova File "/usr/lib/python2.7/site-packages/kombu/serialization.py", line 28 2, in register_msgpack 2013-02-28 01:09:15 TRACE nova registry.register(‘msgpack‘, msgpack.packs, msgpack.unpacks, 2013-02-28 01:09:15 TRACE nova AttributeError: ‘module‘ object has no attribute ‘packs‘ 2013-02-28 01:09:15 TRACE nova ++ failed ++ local r=1 +++ jobs -p ++ kill ++ set +o xtrace
解决办法: 1, yun -y install msgpack-python 2,modif vim /usr/lib/python2.6/site-packages/kombu-1.1.3-py2.6.egg/kombu/serialization.py 278 def register_msgpack(): 279 """See http://msgpack.sourceforge.net/""" 280 try: 281 import msgpack 282 #registry.register(‘msgpack‘, msgpack.packs, msgpack.unpacks,#修改msgpack.pack 283 registry.register(‘msgpack‘, msgpack.pack, msgpack.unpack, 284 content_type=‘application/x-msgpack‘, 285 content_encoding=‘binary‘) 286 except ImportError: 287 288 def not_available(*args, **kwargs): 289 """In case a client receives a msgpack message, but yaml 290 isn‘t installed.""" 291 raise SerializerNotInstalled( 292 "No decoder installed for msgpack. " 293 "Install the msgpack library") 294 registry.register(‘msgpack‘, None, not_available, 295 ‘application/x-msgpack‘)
本文出自 “欢迎评论,欢迎点赞” 博客,请务必保留此出处http://swq499809608.blog.51cto.com/797714/1630492
TRACE nova AttributeError: 'module' object has no attribute 'packs' 解决办法
标签:msgpack.pack python msgpack.packs nova msgpack msgpack-python
原文地址:http://swq499809608.blog.51cto.com/797714/1630492