From d9514d796185220715b09c8c17e71eeb1337ba2f Mon Sep 17 00:00:00 2001 From: John Griffith Date: Mon, 30 Sep 2013 08:45:52 -0600 Subject: [PATCH] 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 --- cinder/volume/drivers/lvm.py | 1 + 1 file changed, 1 insertion(+) 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: -- 2.45.2