报错信息: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')