Browse Source

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

changes/32/723532/1
Zuul 2 months ago
committed by Gerrit Code Review
parent
commit
5da6530592
5 changed files with 50 additions and 9 deletions
  1. +29
    -0
      cinder/tests/unit/volume/drivers/dell_emc/vmax/test_vmax.py
  2. +2
    -1
      cinder/volume/drivers/dell_emc/vmax/fc.py
  3. +2
    -1
      cinder/volume/drivers/dell_emc/vmax/iscsi.py
  4. +12
    -7
      cinder/volume/drivers/dell_emc/vmax/rest.py
  5. +5
    -0
      releasenotes/notes/bug-fix-1867163-27afa39ac77b9e15.yaml

+ 29
- 0
cinder/tests/unit/volume/drivers/dell_emc/vmax/test_vmax.py View File

@@ -685,6 +685,15 @@ class VMAXCommonData(object):

headroom = {"headroom": [{"headroomCapacity": 20348.29}]}

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': []}


class FakeLookupService(object):
def get_device_mapping_from_network(self, initiator_wwns, target_wwns):
@@ -2953,6 +2962,26 @@ class VMAXRestTest(test.TestCase):
self.assertEqual(self.rest.get_vmax_model(self.data.array),
reference)

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)


class VMAXProvisionTest(test.TestCase):
def setUp(self):


+ 2
- 1
cinder/volume/drivers/dell_emc/vmax/fc.py View File

@@ -101,9 +101,10 @@ class VMAXFCDriver(san.SanDriver, driver.FibreChannelDriver):
- Fix for initiator retrieval and short hostname unmapping
(bugs #1783855 #1783867)
- Fix for HyperMax OS Upgrade Bug (bug #1790141)
3.1.2 - Legacy volume not found fix (#1867163)
"""

VERSION = "3.1.1"
VERSION = "3.1.2"

# ThirdPartySystems wiki
CI_WIKI_NAME = "EMC_VMAX_CI"


+ 2
- 1
cinder/volume/drivers/dell_emc/vmax/iscsi.py View File

@@ -106,9 +106,10 @@ class VMAXISCSIDriver(san.SanISCSIDriver):
- Fix for initiator retrieval and short hostname unmapping
(bugs #1783855 #1783867)
- Fix for HyperMax OS Upgrade Bug (bug #1790141)
3.1.2 - Legacy volume not found fix (#1867163)
"""

VERSION = "3.1.1"
VERSION = "3.1.2"

# ThirdPartySystems wiki
CI_WIKI_NAME = "EMC_VMAX_CI"


+ 12
- 7
cinder/volume/drivers/dell_emc/vmax/rest.py View File

@@ -754,14 +754,19 @@ class VMAXRest(object):
LOG.debug('Element name = %(en)s, Vol identifier = %(vi)s, '
'Device id = %(di)s, vol details = %(vd)s',
{'en': element_name, 'vi': vol_identifier,
'di': device_id, 'vd': vol_details})
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:
'di': device_id})
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):


+ 5
- 0
releasenotes/notes/bug-fix-1867163-27afa39ac77b9e15.yaml 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.

Loading…
Cancel
Save