openstack train版本使用api绑定multiattach的磁盘报错

报错信息:Multiattach volumes are only supported starting with compute API version 2.60

原因: train版本的nova api为v2.1 ,但代码侧版本判断需要Microversion 2.6支持共享磁盘挂载

解决办法:

修改支持版本限制,/usr/lib/python2.7/site-packages/nova/api/openstack/common.py

将api_version_request.is_supported(req, '2.60')修改为api_version_request.is_supported(req, '2.0')

def supports_multiattach_volume(req):
    """Check to see if the requested API version is high enough for multiattach

    Microversion 2.60 adds support for booting from a multiattach volume.
    The actual validation for a multiattach volume is done in the compute
    API code, this is just checking the version so we can tell the API
    code if the request version is high enough to even support it.

    :param req: The incoming API request
    :returns: True if the requested API microversion is high enough for
        volume multiattach support, False otherwise.
    """
    return api_version_request.is_supported(req, '2.0')

 


版权声明:本文为weixin_42320932原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。