Skip to content

Instantly share code, notes, and snippets.

@WaltHP
Created May 17, 2016 16:51
Show Gist options
  • Select an option

  • Save WaltHP/bd735390145331661ede84ba278f6976 to your computer and use it in GitHub Desktop.

Select an option

Save WaltHP/bd735390145331661ede84ba278f6976 to your computer and use it in GitHub Desktop.
diff --git a/cinder/volume/drivers/san/hp/hp_3par_common.py b/cinder/volume/drivers/san/hp/hp_3par_common.py
index 3081c33..e5f5c30 100644
--- a/cinder/volume/drivers/san/hp/hp_3par_common.py
+++ b/cinder/volume/drivers/san/hp/hp_3par_common.py
@@ -1066,11 +1066,18 @@ class HP3PARCommon(object):
active_volume_vluns.append(vlun)
else:
inactive_volume_vluns.append(vlun)
+
+ LOG.warning("Active volume(%s) VLUNS : %s" %
+ (volume_name, active_volume_vluns))
+ LOG.warning("INActive volume(%s) VLUNS : %s" %
+ (volume_name, inactive_volume_vluns))
if active_volume_vluns:
volume_vluns = active_volume_vluns
elif inactive_volume_vluns:
volume_vluns = inactive_volume_vluns
+ LOG.warning("Delete VLUNS : %s" % volume_vluns)
+
if not volume_vluns:
msg = (
_LW("3PAR vlun for volume %(name)s not found on "
@@ -1082,12 +1089,14 @@ class HP3PARCommon(object):
removed_luns = []
for vlun in volume_vluns:
if self.VLUN_TYPE_MATCHED_SET == vlun['type']:
+ LOG.warning("Deleting VLUN : %s" % vlun)
self.client.deleteVLUN(volume_name, vlun['lun'], hostname,
vlun['portPos'])
else:
# This is HOST_SEES or a type that is not MATCHED_SET.
# By deleting one VLUN, all the others should be deleted, too.
if vlun['lun'] not in removed_luns:
+ LOG.warning("Deleting VLUN : %s" % vlun)
self.client.deleteVLUN(volume_name, vlun['lun'], hostname)
removed_luns.append(vlun['lun'])
@@ -1097,6 +1106,7 @@ class HP3PARCommon(object):
vluns = []
try:
vluns = self.client.getHostVLUNs(hostname)
+ LOG.warning("VLUNS LEFT OVER = %s" % vluns)
except hpexceptions.HTTPNotFound:
LOG.debug("All VLUNs removed from host %s", hostname)
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment