]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
3PAR Fix find_existing_vluns
authorWalter A. Boring IV <walter.boring@hpe.com>
Tue, 10 Nov 2015 22:12:09 +0000 (14:12 -0800)
committerWalter A. Boring IV <walter.boring@hpe.com>
Fri, 13 Nov 2015 16:42:34 +0000 (08:42 -0800)
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

index 56d685d080ff8648232a29bb0726eee7872d8dc6..25a35eec63deab275e5c3972ba347f8842a6fffc 100644 (file)
@@ -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 "