Merge "PowerMax Driver - Legacy volume not found" into stable/train

This commit is contained in:
Zuul 2020-03-31 20:03:18 +00:00 committed by Gerrit Code Review
commit cfa2d1be17
6 changed files with 49 additions and 8 deletions

View File

@ -619,6 +619,15 @@ class PowerMaxData(object):
'snapvx_source': 'false',
'storageGroupId': []}
volume_details_legacy = {'cap_gb': 2,
'num_of_storage_groups': 1,
'volumeId': device_id,
'volume_identifier': test_volume.id,
'wwn': volume_wwn,
'snapvx_target': 'false',
'snapvx_source': 'false',
'storageGroupId': []}
volume_list = [
{'id': '6b70de13-98c5-46b2-8f24-e4e96a8988fa',
'count': 2,

View File

@ -671,6 +671,26 @@ class PowerMaxRestTest(test.TestCase):
name_id=self.data.test_clone_volume._name_id)
self.assertEqual(self.data.device_id, found_dev_id)
def test_check_volume_device_id_legacy_case(self):
element_name = self.utils.get_volume_element_name(
self.data.test_volume.id)
with mock.patch.object(self.rest, 'get_volume',
return_value=self.data.volume_details_legacy):
found_dev_id = self.rest.check_volume_device_id(
self.data.array, self.data.device_id, element_name)
self.assertEqual(self.data.device_id, found_dev_id)
def test_check_volume_device_id_legacy_case_no_match(self):
element_name = self.utils.get_volume_element_name(
self.data.test_volume.id)
volume_details_no_match = deepcopy(self.data.volume_details_legacy)
volume_details_no_match['volume_identifier'] = 'no_match'
with mock.patch.object(self.rest, 'get_volume',
return_value=volume_details_no_match):
found_dev_id = self.rest.check_volume_device_id(
self.data.array, self.data.device_id, element_name)
self.assertIsNone(found_dev_id)
def test_find_mv_connections_for_vol(self):
device_id = self.data.device_id
ref_lun_id = int(

View File

@ -119,9 +119,10 @@ class PowerMaxFCDriver(san.SanDriver, driver.FibreChannelDriver):
4.1.1 - QoS calulation fix
4.1.2 - Volume group delete fix (bug #1853589)
4.1.3 - Retype attached replication fix (#1851371)
4.1.4 - Legacy volume not found fix (#1867163)
"""
VERSION = "4.1.3"
VERSION = "4.1.4"
# ThirdPartySystems wiki
CI_WIKI_NAME = "EMC_VMAX_CI"

View File

@ -124,9 +124,10 @@ class PowerMaxISCSIDriver(san.SanISCSIDriver):
4.1.1 - QoS calulation fix
4.1.2 - Volume group delete fix (bug #1853589)
4.1.3 - Retype attached replication fix (#1851371)
4.1.4 - Legacy volume not found fix (#1867163)
"""
VERSION = "4.1.3"
VERSION = "4.1.4"
# ThirdPartySystems wiki
CI_WIKI_NAME = "EMC_VMAX_CI"

View File

@ -943,13 +943,18 @@ class PowerMaxRest(object):
'Device id = %(di)s',
{'en': element_name, 'vi': vol_identifier,
'di': device_id})
if vol_identifier == element_name:
found_device_id = device_id
elif name_id:
# This may be host-assisted migration case
element_name = self.utils.get_volume_element_name(name_id)
if vol_identifier == element_name:
if vol_identifier:
if vol_identifier in element_name:
found_device_id = device_id
if vol_identifier != element_name:
LOG.debug("Device %(di)s is a legacy volume created "
"using SMI-S.",
{'di': device_id})
elif name_id:
# This may be host-assisted migration case
element_name = self.utils.get_volume_element_name(name_id)
if vol_identifier == element_name:
found_device_id = device_id
return found_device_id
def add_vol_to_sg(self, array, storagegroup_name, device_id, extra_specs,

View File

@ -0,0 +1,5 @@
---
fixes:
- |
PowerMax Driver - Issue with upgrades from pre Pike to Pike and later.
The device is not found when trying to snapshot a legacy volume.