Merge "Allow cinder-volume to be configured to use HNAS nfs"

This commit is contained in:
Jenkins 2017-01-24 13:08:38 +00:00 committed by Gerrit Code Review
commit 1da30ce395
6 changed files with 50 additions and 20 deletions

View File

@ -279,6 +279,7 @@ enable_ceph: "no"
enable_ceph_rgw: "no" enable_ceph_rgw: "no"
enable_cinder: "no" enable_cinder: "no"
enable_cinder_backend_hnas_iscsi: "no" enable_cinder_backend_hnas_iscsi: "no"
enable_cinder_backend_hnas_nfs: "no"
enable_cinder_backend_iscsi: "no" enable_cinder_backend_iscsi: "no"
enable_cinder_backend_lvm: "no" enable_cinder_backend_lvm: "no"
enable_cinder_backend_nfs: "no" enable_cinder_backend_nfs: "no"

View File

@ -77,20 +77,32 @@ cinder_backends:
- name: "nfs-1" - name: "nfs-1"
driver: "nfs" driver: "nfs"
enabled: "{{ enable_cinder_backend_nfs | bool }}" enabled: "{{ enable_cinder_backend_nfs | bool }}"
- name: "hnas_iscsi" - name: "hnas-iscsi"
driver: "iscsi" driver: "hnas_iscsi"
enabled: "{{ enable_cinder_backend_hnas_iscsi | bool }}" enabled: "{{ enable_cinder_backend_hnas_iscsi | bool }}"
- name: "hnas-nfs"
driver: "hnas_nfs"
enabled: "{{ enable_cinder_backend_hnas_nfs | bool }}"
cinder_enabled_backends: "{{ cinder_backends|selectattr('enabled', 'equalto', true)|list }}" cinder_enabled_backends: "{{ cinder_backends|selectattr('enabled', 'equalto', true)|list }}"
##################### #############################################
# HNAS iscsi backend # Hitachi NAS Platform iSCSI and NFS drivers
##################### #############################################
hnas_volume_backend_name: "hnas_iscsi_backend" # iscsi
hnas_username: hnas_iscsi_backend: "hnas_iscsi_backend"
hnas_password: hnas_iscsi_username:
hnas_mgmt_ip0: hnas_iscsi_password:
hnas_svc0_volume_type: hnas_iscsi_mgmt_ip0:
hnas_svc0_hdp: hnas_iscsi_svc0_volume_type:
hnas_svc0_iscsi_ip: hnas_iscsi_svc0_hdp:
hnas_iscsi_svc0_ip:
# nfs
hnas_nfs_backend: "hnas_nfs_backend"
hnas_nfs_username:
hnas_nfs_password:
hnas_nfs_mgmt_ip0:
hnas_nfs_svc0_volume_type:
hnas_nfs_svc0_hdp:

View File

@ -65,4 +65,4 @@
- "{{ node_custom_config }}/cinder/nfs_shares.j2" - "{{ node_custom_config }}/cinder/nfs_shares.j2"
- "{{ node_custom_config }}/cinder/cinder-volume/nfs_shares.j2" - "{{ node_custom_config }}/cinder/cinder-volume/nfs_shares.j2"
- "{{ node_custom_config }}/cinder/{{ inventory_hostname }}/nfs_shares.j2" - "{{ node_custom_config }}/cinder/{{ inventory_hostname }}/nfs_shares.j2"
skip: "{{ not enable_cinder_backend_nfs | bool }}" skip: "{{ not enable_cinder_backend_nfs | bool and not enable_cinder_backend_hnas_nfs | bool }}"

View File

@ -126,15 +126,28 @@ nfs_shares_config = /etc/cinder/nfs_shares
{% if enable_cinder_backend_hnas_iscsi | bool %} {% if enable_cinder_backend_hnas_iscsi | bool %}
[hnas-iscsi] [hnas-iscsi]
volume_driver = cinder.volume.drivers.hitachi.hnas_iscsi.HNASISCSIDriver volume_driver = cinder.volume.drivers.hitachi.hnas_iscsi.HNASISCSIDriver
volume_backend_name = {{ hnas_volume_backend_name }} volume_backend_name = {{ hnas_iscsi_backend }}
hnas_username = {{ hnas_username }} hnas_username = {{ hnas_iscsi_username }}
hnas_password = {{ hnas_password }} hnas_password = {{ hnas_iscsi_password }}
hnas_mgmt_ip0 = {{ hnas_mgmt_ip0 }} hnas_mgmt_ip0 = {{ hnas_iscsi_mgmt_ip0 }}
hnas_chap_enabled = True hnas_chap_enabled = True
hnas_svc0_volume_type = {{ hnas_svc0_volume_type }} hnas_svc0_volume_type = {{ hnas_iscsi_svc0_volume_type }}
hnas_svc0_hdp = {{ hnas_svc0_hdp }} hnas_svc0_hdp = {{ hnas_iscsi_svc0_hdp }}
hnas_svc0_iscsi_ip = {{ hnas_svc0_iscsi_ip }} hnas_svc0_iscsi_ip = {{ hnas_iscsi_svc0_ip }}
{% endif %}
{% if enable_cinder_backend_hnas_nfs | bool %}
[hnas-nfs]
volume_driver = cinder.volume.drivers.hitachi.hnas_nfs.HNASNFSDriver
nfs_shares_config = /home/cinder/nfs_shares
volume_backend_name = {{ hnas_nfs_backend }}
hnas_username = {{ hnas_nfs_username }}
hnas_password = {{ hnas_nfs_password }}
hnas_mgmt_ip0 = {{ hnas_nfs_mgmt_ip0 }}
hnas_svc0_volume_type = {{ hnas_nfs_svc0_volume_type }}
hnas_svc0_hdp = {{ hnas_nfs_svc0_hdp }}
{% endif %} {% endif %}
[privsep_entrypoint] [privsep_entrypoint]

View File

@ -124,6 +124,7 @@ kolla_internal_vip_address: "10.10.10.254"
#enable_ceph_rgw: "no" #enable_ceph_rgw: "no"
#enable_cinder: "no" #enable_cinder: "no"
#enable_cinder_backend_hnas_iscsi: "no" #enable_cinder_backend_hnas_iscsi: "no"
#enable_cinder_backend_hnas_nfs: "no"
#enable_cinder_backend_iscsi: "no" #enable_cinder_backend_iscsi: "no"
#enable_cinder_backend_lvm: "no" #enable_cinder_backend_lvm: "no"
#enable_cinder_backend_nfs: "no" #enable_cinder_backend_nfs: "no"

View File

@ -0,0 +1,3 @@
---
features:
- Allow cinder-volume to be configured to use HNAS nfs.