Fix LVM iSCSI driver tgtadm CHAP authentication

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 e356389154)
This commit is contained in:
Tomoki Sekiyama 2014-10-14 19:09:44 -04:00 committed by john-griffith
parent f7ee62cc58
commit be3d4604dc
1 changed files with 2 additions and 1 deletions

View File

@ -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)