Skip to content

Instantly share code, notes, and snippets.

@j-griffith
Last active December 16, 2015 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j-griffith/5485632 to your computer and use it in GitHub Desktop.
Save j-griffith/5485632 to your computer and use it in GitHub Desktop.
@@ -386,10 +386,15 @@ class LVMISCSIDriver(LVMVolumeDriver, driver.ISCSIDriver):
# NOTE(jdg): For TgtAdm case iscsi_name is the ONLY param we need
# should clean this all up at some point in the future
- self.tgtadm.create_iscsi_target(iscsi_name, iscsi_target,
- 0, volume_path, chap_auth,
- check_exit_code=False,
- old_name=old_name)
+ if old_name is None:
+ self.tgtadm.create_iscsi_target(iscsi_name, iscsi_target,
+ 0, volume_path, chap_auth,
+ check_exit_code=False)
+ else:
+ self.tgtadm.create_iscsi_target(iscsi_name, iscsi_target,
+ 0, volume_path, chap_auth,
+ check_exit_code=False,
+ old_name=old_name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment