【openstack报错】【因更新包而致】IncompatibleObjectVersion: Version 1.9 of Instance is not supported
【时间】2014年2月18日
【平台】ubuntu 12.04.3
openstack havana
【日志】/var/log/upstart/nova-compute.log 内容如下:
ERROR nova.openstack.common.periodic_task [-] Error during ComputeManager._heal_instance_info_cache: Version 1.9 of Instance is not supported
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/amqp.py", line 461, in _process_data
**args)
File "/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/dispatcher.py", line 172, in dispatch
result = getattr(proxyobj, method)(ctxt, **kwargs)
File "/usr/lib/python2.7/dist-packages/nova/conductor/manager.py", line 573, in object_class_action
objver)
File "/usr/lib/python2.7/dist-packages/nova/objects/base.py", line 230, in obj_class_from_name
objver=objver)
IncompatibleObjectVersion: Version 1.9 of Instance is not supported
【情景】为了启用metedata 功能,在compute节点上安装了nova-api-metadata,先是发现dashboard面板上的instance的操作状态无法更新,继而又发现
后台使用nova命令行也无法完成instance的创建、删除、开关机等操作。
【分析】因为nova相关模块部署的时间较早,版本较低,而新安装的模块nova-api-metadata版本较高,可能有不兼容的地方存在,比如api接口、对象属性等等,
所以导致nova api 调用操作无法生效,dashboard面板上的instance的操作状态无法更新。
【解决】修改以下文件:
1) /usr/lib/python2.7/dist-packages/nova/objects/base.py
2) /usr/lib/python2.7/dist-packages/nova/tests/objects/test_instance.py
3) /usr/lib/python2.7/dist-packages/nova/tests/objects/test_objects.py
【参考】https://review.openstack.org/#/c/52450/