From: Avishay Traeger Date: Tue, 19 Mar 2013 07:42:06 +0000 (+0200) Subject: Fix Storwize/SVC LUN allocation with holes. X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=e0878c86207d5ff5c2ebaa69eac454af545925ef;p=openstack-build%2Fcinder-build.git Fix Storwize/SVC LUN allocation with holes. The Storwize/SVC driver should find the first unused LUN, but continues searching, returning erroneous results. Added 'break' statement to fix. Change-Id: Ibd95714e086a513a39fe9d20ffec57135dc5ec55 Fixes: bug 1157012 --- diff --git a/cinder/volume/drivers/storwize_svc.py b/cinder/volume/drivers/storwize_svc.py index 8d72b6f29..65c7e771a 100644 --- a/cinder/volume/drivers/storwize_svc.py +++ b/cinder/volume/drivers/storwize_svc.py @@ -593,6 +593,7 @@ class StorwizeSVCDriver(san.SanISCSIDriver): for index, n in enumerate(lun_used): if n > index: result_lun = str(index) + break # Volume is not mapped to host, create a new LUN if not mapped_flag: