Do not install unneeded iscsitarget for lvm
iscsitarget daemon is not required when running lvm backend.
Update cinder.volume accordingly.
Change-Id: Ia1d603ad3c351ca05e3d73923ffd5e2041636ab7
Related-Prod: PROD-22900
diff --git a/cinder/map.jinja b/cinder/map.jinja
index 5bf2863..18050cf 100644
--- a/cinder/map.jinja
+++ b/cinder/map.jinja
@@ -77,9 +77,11 @@
'BaseDefaults': default_params,
'Debian': {
'pkgs': ['cinder-volume', 'lvm2', 'sysfsutils', 'sg3-utils', 'python-cinder','python-mysqldb','p7zip', 'gettext-base', 'python-memcache', 'python-pycadf'],
- 'iscsi_pkgs': ['iscsitarget', 'open-iscsi', 'iscsitarget-dkms'],
+ 'openiscsi_pkgs': ['open-iscsi', 'tgt'],
+ 'iscsitarget_pkgs': ['iscsitarget', 'iscsitarget-dkms'],
'services': ['cinder-volume'],
- 'iscsi_services': ['iscsitarget', 'open-iscsi'],
+ 'iscsitarget_services': ['iscsitarget'],
+ 'openiscsi_services': ['open-iscsi', 'tgt', 'iscsid'],
'wipe_method': 'none',
'notification': False,
'audit': {
@@ -108,9 +110,11 @@
},
'RedHat': {
'pkgs': ['openstack-cinder', 'python-cinder', 'lvm2', 'sysfsutils', 'sg3_utils', 'device-mapper-multipath', 'device-mapper-multipath-libs', 'python-pycadf'],
- 'iscsi_pkgs': ['iscsitarget', 'open-iscsi', 'iscsitarget-dkms'],
+ 'iscsitarget_pkgs': ['iscsitarget', 'iscsitarget-dkms'],
+ 'openiscsi_pkgs': ['open-iscsi', 'tgt'],
+ 'iscsitarget_services': ['iscsitarget'],
+ 'openiscsi_services': ['open-iscsi', 'tgt', 'iscsid'],
'services': ['openstack-cinder-volume'],
- 'iscsi_services': ['iscsitarget', 'open-iscsi'],
'wipe_method': 'none',
'notification': False,
'audit': {
diff --git a/cinder/volume.sls b/cinder/volume.sls
index 6a466ff..fd94860 100644
--- a/cinder/volume.sls
+++ b/cinder/volume.sls
@@ -191,11 +191,29 @@
{%- endif %}
-{%- if backend.engine in ['iscsi' , 'hp_lefthand', 'lvm'] %}
+{%- if backend.engine in ['lvm'] %}
+
+cinder_openiscsi_packages_{{ loop.index }}:
+ pkg.installed:
+ - names: {{ volume.openiscsi_pkgs }}
+ - require:
+ - pkg: cinder_volume_packages
+
+cinder_openiscsi_service:
+ service.running:
+ - names: {{ volume.openiscsi_services }}
+ - enable: true
+ {%- if grains.get('noservices') %}
+ - onlyif: /bin/false
+ {%- endif %}
+ - require:
+ - pkg: cinder_openiscsi_packages_{{ loop.index }}
+
+{%- elif backend.engine in ['iscsi' , 'hp_lefthand'] %}
cinder_iscsi_packages_{{ loop.index }}:
pkg.installed:
- - names: {{ volume.iscsi_pkgs }}
+ - names: {{ volume.iscsitarget_pkgs + volume.openiscsi_pkgs }}
- require:
- pkg: cinder_volume_packages
@@ -208,7 +226,7 @@
cinder_scsi_service:
service.running:
- - names: {{ volume.iscsi_services }}
+ - names: {{ volume.iscsitarget_services + volume.openiscsi_services }}
- enable: true
{%- if grains.get('noservices') %}
- onlyif: /bin/false