VMware: Enforce minimum vCenter version of 5.5
As of Ocata, the minimum version of VMware vCenter will be enforced at 5.1.0. And any version less than 5.5.0 will be warned as deprecated. In two releases, 5.5.0 will become the new minimum version. The VMware driver CI will has already migrated to vCenter 6.0. DocImpact: Need version updates on the minimum vCenter included in http://docs.openstack.org/mitaka/config-reference/compute/hypervisor-vmware.html Change-Id: I9f13e6cd6a49699f2b3cdce892fbf02634bf7618
This commit is contained in:
parent
15a159b3fc
commit
2851ceaed3
@ -1242,7 +1242,7 @@ class FakeVim(object):
|
||||
|
||||
about_info = DataObject()
|
||||
about_info.name = "VMware vCenter Server"
|
||||
about_info.version = "5.1.0"
|
||||
about_info.version = constants.MIN_VC_VERSION
|
||||
about_info.instanceUuid = _FAKE_VCENTER_UUID
|
||||
|
||||
service_content.about = about_info
|
||||
|
@ -2289,18 +2289,17 @@ class VMwareAPIVMTestCase(test.NoDBTestCase):
|
||||
self.conn._create_nodename(test_mor),
|
||||
"VC driver failed to create the proper node name")
|
||||
|
||||
@mock.patch.object(driver.LOG, 'warning')
|
||||
def test_min_version(self, mock_warning):
|
||||
self.conn._check_min_version()
|
||||
self.assertFalse(mock_warning.called)
|
||||
@mock.patch.object(oslo_vim_util, 'get_vc_version', return_value='5.0.0')
|
||||
def test_invalid_min_version(self, mock_version):
|
||||
self.assertRaises(exception.NovaException,
|
||||
self.conn._check_min_version)
|
||||
|
||||
@mock.patch.object(driver.LOG, 'warning')
|
||||
@mock.patch.object(oslo_vim_util, 'get_vc_version',
|
||||
return_value='5.0.0')
|
||||
def test_invalid_min_version(self, mock_version, mock_warning):
|
||||
@mock.patch.object(oslo_vim_util, 'get_vc_version', return_value='5.1.0')
|
||||
def test_warning_deprecated_version(self, mock_version, mock_warning):
|
||||
self.conn._check_min_version()
|
||||
# assert that the min version is in a warning message
|
||||
expected_arg = {'version': constants.MIN_VC_VERSION}
|
||||
# assert that the next min version is in the warning message
|
||||
expected_arg = {'version': constants.NEXT_MIN_VC_VERSION}
|
||||
version_arg_found = False
|
||||
for call in mock_warning.call_args_list:
|
||||
if call[0][1] == expected_arg:
|
||||
|
@ -19,6 +19,7 @@ Shared constants across the VMware driver
|
||||
from nova.network import model as network_model
|
||||
|
||||
MIN_VC_VERSION = '5.1.0'
|
||||
NEXT_MIN_VC_VERSION = '5.5.0'
|
||||
# The minimum VC version for Neutron 'ovs' port type support
|
||||
MIN_VC_OVS_VERSION = '5.5.0'
|
||||
|
||||
|
@ -127,15 +127,22 @@ class VMwareVCDriver(driver.ComputeDriver):
|
||||
|
||||
def _check_min_version(self):
|
||||
min_version = v_utils.convert_version_to_int(constants.MIN_VC_VERSION)
|
||||
next_min_ver = v_utils.convert_version_to_int(
|
||||
constants.NEXT_MIN_VC_VERSION)
|
||||
vc_version = vim_util.get_vc_version(self._session)
|
||||
LOG.info(_LI("VMware vCenter version: %s"), vc_version)
|
||||
if min_version > v_utils.convert_version_to_int(vc_version):
|
||||
# TODO(garyk): enforce this from M
|
||||
if v_utils.convert_version_to_int(vc_version) < min_version:
|
||||
raise exception.NovaException(
|
||||
_('Detected vCenter version %(version)s. Nova requires VMware '
|
||||
'vCenter version %(min_version)s or greater.') % {
|
||||
'version': vc_version,
|
||||
'min_version': constants.MIN_VC_VERSION})
|
||||
elif v_utils.convert_version_to_int(vc_version) < next_min_ver:
|
||||
LOG.warning(_LW('Running Nova with a VMware vCenter version less '
|
||||
'than %(version)s is deprecated. The required '
|
||||
'minimum version of vCenter will be raised to '
|
||||
'%(version)s in the 13.0.0 release.'),
|
||||
{'version': constants.MIN_VC_VERSION})
|
||||
'%(version)s in the 16.0.0 release.'),
|
||||
{'version': constants.NEXT_MIN_VC_VERSION})
|
||||
|
||||
@property
|
||||
def need_legacy_block_device_info(self):
|
||||
|
@ -0,0 +1,7 @@
|
||||
---
|
||||
upgrade:
|
||||
- As of Ocata, the minimum version of VMware vCenter that nova compute will
|
||||
interoperate with will be 5.1.0. Deployments using older versions of
|
||||
vCenter should upgrade. Running with vCenter version less than 5.5.0 is
|
||||
also now deprecated and 5.5.0 will become the minimum version in the
|
||||
16.0.0 Pike release of Nova.
|
Loading…
Reference in New Issue
Block a user