• RPCVersionCapError: Requested message version, 4.17 is incompatible. It needs to be equal in major version and less than or equal in minor version as the specified version cap 4.11.


    【问题描述】

    RPCVersionCapError: Requested message version, 4.17 is incompatible. It needs to be equal in major version and less than or equal in minor version as the specified version cap 4.11.

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/openstack/extensions.py", line 336, in wrapped

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions return f(*args, **kwargs)

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/servers.py", line 865, in delete

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions self._delete(req.environ['nova.context'], req, id)

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/servers.py", line 719, in _delete

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions self.compute_api.delete(context, instance)

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 200, in inner

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions return function(self, context, instance, *args, **kwargs)

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 208, in _wrapped

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions return fn(self, context, instance, *args, **kwargs)

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 148, in inner

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions return f(self, context, instance, *args, **kw)

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 2130, in delete

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions self._delete_instance(context, instance)

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 2121, in _delete_instance

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions task_state=task_states.DELETING)

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 1788, in _delete

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions self.detach_usb_list(context, instance)

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 200, in inner

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions return function(self, context, instance, *args, **kwargs)

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 191, in wrapped

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions return function(self, context, instance, *args, **kwargs)

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 208, in _wrapped

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions return fn(self, context, instance, *args, **kwargs)

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 3596, in detach_usb_list

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions return self.compute_rpcapi.detach_usb_list(context, instance)

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/nova/compute/rpcapi.py", line 458, in detach_usb_list

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions return cctxt.call(ctxt, 'detach_usb_list', instance=instance)

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/client.py", line 164, in call

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions self._check_version_cap(msg.get('version'))

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/client.py", line 121, in _check_version_cap

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions version_cap=self.version_cap)

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions RPCVersionCapError: Requested message version, 4.17 is incompatible. It needs to be equal in major version and less than or equal in minor version as the specified version cap 4.11.

    2019-08-16 10:33:21.706 35 ERROR nova.api.openstack.extensions

    2019-08-16 10:33:21.708 35 INFO nova.api.openstack.wsgi [req-2bd614de-973d-48fe-b9c2-392a65195a62 11668b80d3264ff7b0e602c4b603af5e 7fadd01436224d6c8d317c5a321fb3f6 - default default] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.

       

    【问题定位】

       

    日志显示版本不兼容,RPC当前版本为4.17,但是应该使用4.11或者之前的版本。

    重启nova-api服务,此问题不再复现。

       

    后来查看了nova的配置文件,研究对比了一下和其他环境的区别。

    [upgrade_levels]

    compute = auto

       

     

    /etc/nova/nova.conf 配置文件里面,上面红色字体的参数为auto,这个参数主要是针对同时存在多个版本的nova-compute设计的。

       

     

    nova-api的启动顺序在nova-compute之前,所以,在最开始的时候并不能取到nova-compute的版本,直接取了默认的mitaka,也就是4.11的版本。

    然后在调用nova-api的时候,如果nova-compute的版本不是mitaka,版本就会有不匹配的问题。

       

     

    但是在重启的时候, 通过上面的函数重新取了nova-compute的版本。

       

       

    【解决方法】

    /etc/nova/nova.conf 配置文件里面的红色字段修改为None:

    [upgrade_levels]

    compute = None

       

     

    在上代码中,如果取到的imp_version为None,则直接返回True。

      

  • 相关阅读:
    Scrapy学习篇(九)之文件与图片下载
    Scrapy学习篇(八)之settings
    SQL拾遗
    SQL命令导入导出
    Spring Security构建Rest服务-1401-权限表达式
    Spring Security构建Rest服务-1400-授权
    Spring Security构建Rest服务-1300-Spring Security OAuth开发APP认证框架之JWT实现单点登录
    Spring Security构建Rest服务-1205-Spring Security OAuth开发APP认证框架之Token处理
    Spring Security构建Rest服务-1204-Spring Security OAuth开发APP认证框架之Token处理
    Spring Security构建Rest服务-1203-Spring Security OAuth开发APP认证框架之短信验证码登录
  • 原文地址:https://www.cnblogs.com/liuxia912/p/11377573.html
Copyright © 2020-2023  润新知