VMAX driver - Cleanup of Initiator group fails
When the last volume has been deleted from the Storage Group and the Masking View has been deleted and the initiator group is no longer in use, the deletion of the Initiator group fails. The initiator group is actually deleted off the array, but the code is throwing up an error when it uses the now deleted initiator group name to search for remaining masking views. The solution is to check if the initiator group has been deleted by common.terminate_connection before searching for remaining masking views. Change-Id: I79559789459f73c4adebf010d84cbeedd25f7f74 Closes-Bug: #1605193
This commit is contained in:
@@ -245,18 +245,38 @@ class EMCVMAXFCDriver(driver.FibreChannelDriver):
|
||||
|
||||
LOG.debug("Looking for masking views still associated with "
|
||||
"Port Group %s.", portGroupInstanceName)
|
||||
mvInstances = self._get_common_masking_views(
|
||||
portGroupInstanceName, initiatorGroupInstanceName)
|
||||
if len(mvInstances) > 0:
|
||||
LOG.debug("Found %(numViews)lu MaskingViews.",
|
||||
{'numViews': len(mvInstances)})
|
||||
else: # No views found.
|
||||
LOG.debug("No MaskingViews were found. Deleting zone.")
|
||||
# check if the initiator group has been deleted
|
||||
checkIgInstanceName = (
|
||||
self.common.check_ig_instance_name(initiatorGroupInstanceName))
|
||||
|
||||
# if it has not been deleted, check for remaining masking views
|
||||
if checkIgInstanceName is not None:
|
||||
mvInstances = self._get_common_masking_views(
|
||||
portGroupInstanceName, initiatorGroupInstanceName)
|
||||
|
||||
if len(mvInstances) > 0:
|
||||
LOG.debug("Found %(numViews)lu MaskingViews.",
|
||||
{'numViews': len(mvInstances)})
|
||||
data = {'driver_volume_type': 'fibre_channel',
|
||||
'data': {}}
|
||||
else: # no masking views found
|
||||
LOG.debug("No MaskingViews were found. Deleting zone.")
|
||||
data = {'driver_volume_type': 'fibre_channel',
|
||||
'data': {'target_wwn': target_wwns,
|
||||
'initiator_target_map': init_targ_map}}
|
||||
|
||||
LOG.debug("Return FC data for zone removal: %(data)s.",
|
||||
{'data': data})
|
||||
|
||||
else: # The initiator group has been deleted
|
||||
LOG.debug("Initiator Group has been deleted. Deleting zone.")
|
||||
data = {'driver_volume_type': 'fibre_channel',
|
||||
'data': {'target_wwn': target_wwns,
|
||||
'initiator_target_map': init_targ_map}}
|
||||
LOG.debug("Return FC data for zone removal: %(data)s.",
|
||||
{'data': data})
|
||||
|
||||
LOG.debug("Return FC data for zone removal: %(data)s.",
|
||||
{'data': data})
|
||||
|
||||
else:
|
||||
LOG.warning(_LW("Volume %(volume)s is not in any masking view."),
|
||||
{'volume': volume['name']})
|
||||
|
||||
Reference in New Issue
Block a user