From: John Griffith Date: Mon, 30 Sep 2013 14:45:52 +0000 (-0600) Subject: Dont retry if target creation succeeds X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=d9514d796185220715b09c8c17e71eeb1337ba2f;p=openstack-build%2Fcinder-build.git Dont retry if target creation succeeds 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 --- diff --git a/cinder/volume/drivers/lvm.py b/cinder/volume/drivers/lvm.py index 10112fff6..e89e9dd89 100644 --- a/cinder/volume/drivers/lvm.py +++ b/cinder/volume/drivers/lvm.py @@ -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: