From 8263dafeb0a0235555af75848eaf4a03e3d5ca7e Mon Sep 17 00:00:00 2001 From: Vladislav Belogrudov Date: Wed, 19 Apr 2017 17:28:11 +0300 Subject: [PATCH] Allow different configuration of iSCSI helper Currently Cinder configuration hard-codes tgtadm as the only iSCSI management utility. tgtd and tgtadm are older tools to manage iSCSI volumes. Newer versions of Linux distros use targetcli and kernel based iSCSI facilities (LIO) and can be a preferred way for some users. Change-Id: I10c0a7d596994a9201218e58ca2ad184774a8ce2 Closes-Bug: #1684139 --- ansible/roles/cinder/defaults/main.yml | 2 +- ansible/roles/cinder/templates/cinder.conf.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/cinder/defaults/main.yml b/ansible/roles/cinder/defaults/main.yml index 585da77ddc..6d0cff78ea 100644 --- a/ansible/roles/cinder/defaults/main.yml +++ b/ansible/roles/cinder/defaults/main.yml @@ -132,7 +132,7 @@ cinder_backends: enabled: "{{ enable_cinder_backend_hnas_nfs | bool }}" cinder_enabled_backends: "{{ cinder_backends|selectattr('enabled', 'equalto', true)|list }}" - +cinder_iscsi_helper: "tgtadm" ############################################# # Hitachi NAS Platform iSCSI and NFS drivers diff --git a/ansible/roles/cinder/templates/cinder.conf.j2 b/ansible/roles/cinder/templates/cinder.conf.j2 index 224677fd5c..427481e808 100644 --- a/ansible/roles/cinder/templates/cinder.conf.j2 +++ b/ansible/roles/cinder/templates/cinder.conf.j2 @@ -96,7 +96,7 @@ lock_path = /var/lib/cinder/tmp volume_group = {{ cinder_volume_group }} volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver volume_backend_name = lvm-1 -iscsi_helper = tgtadm +iscsi_helper = {{ cinder_iscsi_helper }} iscsi_protocol = iscsi {% endif %}