Browse Source

PowerMax Driver - Legacy volume not found

The equals check is too stringent for legacy pre Pike volumes
after an upgrade.  Pre PIke is SMI-S, Pike and later is REST
and identifier name is persisted differently.

Change-Id: I963ad219c2e3b1c9c5edaa8f7e0d3dea911ecd8e
Closes-Bug: #1867163
(cherry picked from commit 4296ea130e)
(cherry picked from commit b2d61850b0)
(cherry picked from commit db58c6c902)
changes/07/715007/2
Helen Walsh 3 months ago
parent
commit
917e0b0cef
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

@@ -975,6 +975,15 @@ class VMAXCommonData(object):
'serial_number': array,
'vmax_model': vmax_model}

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):
@@ -3270,6 +3279,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

@@ -102,9 +102,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.2.3 - Legacy volume not found fix (#1867163)
"""

VERSION = "3.2.2"
VERSION = "3.2.3"

# ThirdPartySystems wiki
CI_WIKI_NAME = "EMC_VMAX_CI"


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

@@ -107,9 +107,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.2.3 - Legacy volume not found fix (#1867163)
"""

VERSION = "3.2.2"
VERSION = "3.2.3"
# ThirdPartySystems wiki
CI_WIKI_NAME = "EMC_VMAX_CI"



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

@@ -756,14 +756,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