VMAX driver - Concurrency issues involving replicated volumes
VMAX driver currently has some limitations surrounding concurrent operations involving replicated volumes. The next version of Unisphere for VMAX has some improvements made in this area. One of these improvements is on volume retrieval from the array. This patch switches to the 90 endpoint on volume retrieval, where supported, to utilize the improvement. Change-Id: I0ac7f98e529961ab559289e257b4f58c8577e121 Closes-bug: 1753707
This commit is contained in:
parent
e271cd549d
commit
3743982928
@ -659,6 +659,7 @@ class VMAXCommonData(object):
|
||||
{"symmetrixId": array_herc,
|
||||
"model": "VMAXHERC",
|
||||
"ucode": "5978.1091.1092"}]
|
||||
version_details = {"version": "V9.0.0.1"}
|
||||
|
||||
headroom = {"headroom": [{"headroomCapacity": 20348.29}]}
|
||||
|
||||
@ -847,6 +848,8 @@ class FakeRequestsSession(object):
|
||||
if job['jobId'] in url:
|
||||
return_object = job
|
||||
break
|
||||
elif 'version' in url:
|
||||
return_object = self.data.version_details
|
||||
else:
|
||||
for symm in self.data.symmetrix:
|
||||
if symm['symmetrixId'] in url:
|
||||
@ -1652,6 +1655,13 @@ class VMAXRestTest(test.TestCase):
|
||||
array_details = self.rest.get_array_serial(self.data.failed_resource)
|
||||
self.assertIsNone(array_details)
|
||||
|
||||
def test_get_uni_version(self):
|
||||
version, major_version = self.rest.get_uni_version()
|
||||
self.assertEqual('90', major_version)
|
||||
with mock.patch.object(self.rest, '_get_request', return_value=None):
|
||||
version, major_version = self.rest.get_uni_version()
|
||||
self.assertIsNone(major_version)
|
||||
|
||||
def test_get_srp_by_name(self):
|
||||
ref_details = self.data.srp_details
|
||||
srp_details = self.rest.get_srp_by_name(
|
||||
|
@ -430,6 +430,20 @@ class VMAXRest(object):
|
||||
is_next_gen = True
|
||||
return is_next_gen
|
||||
|
||||
def get_uni_version(self):
|
||||
"""Get the unisphere version from the server.
|
||||
|
||||
:return: version and major_version(e.g. ("V8.4.0.16", "84"))
|
||||
"""
|
||||
version, major_version = None, None
|
||||
target_uri = "/%s/system/version" % U4V_VERSION
|
||||
response = self._get_request(target_uri, 'version')
|
||||
if response and response.get('version'):
|
||||
version = response['version']
|
||||
version_list = version.split('.')
|
||||
major_version = version_list[0][1] + version_list[1]
|
||||
return version, major_version
|
||||
|
||||
def get_srp_by_name(self, array, srp=None):
|
||||
"""Returns the details of a storage pool.
|
||||
|
||||
@ -944,8 +958,10 @@ class VMAXRest(object):
|
||||
:returns: volume dict
|
||||
:raises: VolumeBackendAPIException
|
||||
"""
|
||||
version = self.get_uni_version()[1]
|
||||
volume_dict = self.get_resource(
|
||||
array, SLOPROVISIONING, 'volume', resource_name=device_id)
|
||||
array, SLOPROVISIONING, 'volume', resource_name=device_id,
|
||||
version=version)
|
||||
if not volume_dict:
|
||||
exception_message = (_("Volume %(deviceID)s not found.")
|
||||
% {'deviceID': device_id})
|
||||
|
Loading…
Reference in New Issue
Block a user