]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Dont retry if target creation succeeds
authorJohn Griffith <john.griffith@solidfire.com>
Mon, 30 Sep 2013 14:45:52 +0000 (08:45 -0600)
committerJohn Griffith <john.griffith@solidfire.com>
Mon, 30 Sep 2013 14:48:59 +0000 (08:48 -0600)
The target creation retry loop was not breaking when
the target was succesfully created.  This is "sometimes" ok,
however in other cases this will actually cause a failure in
the second create and the backing Lun will be deleted and not
created again succesfully due most likely to a busy status on the
target.

Add a break in the try block.

Change-Id: I875f6302868651b5b42d4796cd2714fba35e525e
Closes-Bug: #1226337

cinder/volume/drivers/lvm.py

index 10112fff6f1adf139a1a9da0a78acd7f73c72d9b..e89e9dd8988526716748959d18e436e76f71a59e 100644 (file)
@@ -436,6 +436,7 @@ class LVMISCSIDriver(LVMVolumeDriver, driver.ISCSIDriver):
                     chap_auth,
                     check_exit_code=check_exit_code,
                     old_name=old_name)
+                break
 
             except brick_exception.ISCSITargetCreateFailed:
                 if attempts == 0: