From 633d3ea8417376a324335165bbf4b373ace9f56b Mon Sep 17 00:00:00 2001 From: "Walter A. Boring IV" Date: Tue, 10 Nov 2015 14:12:09 -0800 Subject: [PATCH] 3PAR Fix find_existing_vluns When 3PAR iSCSI driver is configured for multipath, with multiple ip addresses in hp3par_iscsi_ips, find_existing_vluns fails to return more than 1 vlun. The problem with this is that every time initialize_connection is called, the driver will not find the vlun it expects to be there, and then it will create a new one. This patch removes the break inside of find_existing_vluns, so that it returns the entire list, not just the first vlun. Change-Id: I0861745717cf9045e10a030dc25fab419f7b1f58 Closes-Bug: #1515033 --- cinder/volume/drivers/hpe/hpe_3par_common.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cinder/volume/drivers/hpe/hpe_3par_common.py b/cinder/volume/drivers/hpe/hpe_3par_common.py index 56d685d08..25a35eec6 100644 --- a/cinder/volume/drivers/hpe/hpe_3par_common.py +++ b/cinder/volume/drivers/hpe/hpe_3par_common.py @@ -212,10 +212,11 @@ class HPE3PARCommon(object): 2.0.52 - Added update_migrated_volume. bug #1492023 2.0.53 - Fix volume size conversion. bug #1513158 3.0.0 - Rebranded HP to HPE. + 3.0.1 - Fixed find_existing_vluns bug #1515033 """ - VERSION = "3.0.0" + VERSION = "3.0.1" stats = {} @@ -2415,11 +2416,9 @@ class HPE3PARCommon(object): vol_name = self._get_3par_vol_name(volume['id']) host_vluns = self.client.getHostVLUNs(host['name']) - # The first existing VLUN found will be returned. for vlun in host_vluns: if vlun['volumeName'] == vol_name: existing_vluns.append(vlun) - break except hpeexceptions.HTTPNotFound: # ignore, no existing VLUNs were found LOG.debug("No existing VLUNs were found for host/volume " -- 2.45.2