summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomoki Sekiyama <tomoki.sekiyama@hds.com>2014-10-14 19:09:44 -0400
committerjohn-griffith <john.griffith@solidfire.com>2014-10-14 21:50:15 -0600
commitbe3d4604dc0566e0838959d998ff1d37755de6d3 (patch)
tree5353a18e891d1bfb700c831f37dbd532d5a8af91
parentf7ee62cc58d8b642af67510a310f6259492a4508 (diff)
downloadcinder-proposed/juno.tar.gz
Fix LVM iSCSI driver tgtadm CHAP authentication2014.2.rc32014.2proposed/juno
Currently CHAP Authentication in LVM iSCSI driver with tgtadm does not work. This is because the tgtadm helper creates the target configuration file with an 'IncomingUser' entry, which is ignored by tgtd. This patch fixes it to 'incominguser'. Change-Id: I14871985a2a916834122f849238f05b75726bc1a Closes-Bug: #1329214 (cherry picked from commit e3563891545c801726d227f752cf99488ed5c7dd)
-rw-r--r--cinder/brick/iscsi/iscsi.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cinder/brick/iscsi/iscsi.py b/cinder/brick/iscsi/iscsi.py
index f557e6172..e94a3438e 100644
--- a/cinder/brick/iscsi/iscsi.py
+++ b/cinder/brick/iscsi/iscsi.py
@@ -171,8 +171,9 @@ class TgtAdm(TargetAdmin):
if chap_auth is None:
volume_conf = self.VOLUME_CONF % (name, path, write_cache)
else:
+ chap_str = re.sub('^IncomingUser ', 'incominguser ', chap_auth)
volume_conf = self.VOLUME_CONF_WITH_CHAP_AUTH % (name,
- path, chap_auth,
+ path, chap_str,
write_cache)
LOG.info(_('Creating iscsi_target for: %s') % vol_id)