Skip to content

Commit

Permalink
Dont retry if target creation succeeds
Browse files Browse the repository at this point in the history
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
  • Loading branch information
j-griffith committed Sep 30, 2013
1 parent 0f7d937 commit d9514d7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cinder/volume/drivers/lvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ def _create_tgtadm_target(self, iscsi_name, iscsi_target,
chap_auth,
check_exit_code=check_exit_code,
old_name=old_name)
break

except brick_exception.ISCSITargetCreateFailed:
if attempts == 0:
Expand Down

0 comments on commit d9514d7

Please sign in to comment.