From 73225d285c065ad45499a0fd8dd64649ea8a1a31 Mon Sep 17 00:00:00 2001 From: Vladislav Belogrudov Date: Mon, 7 Aug 2017 13:06:21 +0300 Subject: [PATCH] Allow Cinder to use ZFSSA iSCSI volume service Added configuration to enable Oracle ZFS Storage Appliance: https://docs.openstack.org/cinder/pike/configuration/block-storage/drivers/zfssa-iscsi-driver.html Change-Id: Id5807f0d4567e16a68283cace7e126eddc4dea20 Implements: blueprint zfssa-cinder-support --- ansible/group_vars/all.yml | 5 +++-- ansible/roles/cinder/defaults/main.yml | 15 +++++++++++++++ ansible/roles/cinder/templates/cinder.conf.j2 | 14 ++++++++++++++ ...as-cinder-volume-backend-cadd90a57fdc671b.yaml | 3 +++ 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/add-zfssa-iscsi-as-cinder-volume-backend-cadd90a57fdc671b.yaml diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 992eb4b2d9..d5b20468e5 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -333,9 +333,10 @@ enable_cinder: "no" enable_cinder_backup: "yes" enable_cinder_backend_hnas_iscsi: "no" enable_cinder_backend_hnas_nfs: "no" -enable_cinder_backend_iscsi: "no" +enable_cinder_backend_iscsi: "{{ enable_cinder_backend_lvm | bool or enable_cinder_backend_hnas_iscsi | bool or enable_cinder_backend_zfssa_iscsi | bool }}" enable_cinder_backend_lvm: "no" enable_cinder_backend_nfs: "no" +enable_cinder_backend_zfssa_iscsi: "no" enable_cloudkitty: "no" enable_congress: "no" enable_designate: "no" @@ -366,7 +367,7 @@ enable_horizon_zun: "{{ enable_zun | bool }}" enable_hyperv: "no" enable_influxdb: "no" enable_ironic: "no" -enable_iscsid: "{{ enable_cinder_backend_iscsi | bool or enable_cinder_backend_lvm | bool or enable_ironic | bool }}" +enable_iscsid: "{{ enable_cinder_backend_iscsi | bool or enable_ironic | bool }}" enable_karbor: "no" enable_kuryr: "no" enable_magnum: "no" diff --git a/ansible/roles/cinder/defaults/main.yml b/ansible/roles/cinder/defaults/main.yml index 29170c6327..594f444d6d 100644 --- a/ansible/roles/cinder/defaults/main.yml +++ b/ansible/roles/cinder/defaults/main.yml @@ -136,6 +136,8 @@ cinder_backends: enabled: "{{ enable_cinder_backend_hnas_nfs | bool }}" - name: "vmwarevc-vmdk" enabled: "{{ cinder_backend_vmwarevc_vmdk | bool }}" + - name: "zfssa-iscsi" + enabled: "{{ enable_cinder_backend_zfssa_iscsi | bool }}" cinder_enabled_backends: "{{ cinder_backends|selectattr('enabled', 'equalto', true)|list }}" cinder_iscsi_helper: "tgtadm" @@ -159,3 +161,16 @@ hnas_nfs_password: hnas_nfs_mgmt_ip0: hnas_nfs_svc0_volume_type: hnas_nfs_svc0_hdp: + +############################################# +# Oracle ZFS Storage Appliance iSCSI driver +############################################# +zfssa_iscsi_backend: "zfssa_iscsi_backend" +zfssa_iscsi_san_ip: +zfssa_iscsi_login: +zfssa_iscsi_password: +zfssa_iscsi_pool: +zfssa_iscsi_project: +zfssa_iscsi_initiator_group: +zfssa_iscsi_target_portal: +zfssa_iscsi_target_interfaces: diff --git a/ansible/roles/cinder/templates/cinder.conf.j2 b/ansible/roles/cinder/templates/cinder.conf.j2 index cfda535720..48f8435ae1 100644 --- a/ansible/roles/cinder/templates/cinder.conf.j2 +++ b/ansible/roles/cinder/templates/cinder.conf.j2 @@ -162,6 +162,20 @@ vmware_cluster_name = {{ vmware_vcenter_cluster_name }} vmware_insecure = True {% endif %} +{% if enable_cinder_backend_zfssa_iscsi | bool %} +[zfssa-iscsi] +volume_backend_name = {{ zfssa_iscsi_backend }} +volume_driver = cinder.volume.drivers.zfssa.zfssaiscsi.ZFSSAISCSIDriver +san_ip = {{ zfssa_iscsi_san_ip }} +san_login = {{ zfssa_iscsi_login }} +san_password = {{ zfssa_iscsi_password }} +zfssa_pool = {{ zfssa_iscsi_pool }} +zfssa_project = {{ zfssa_iscsi_project }} +zfssa_initiator_group = {{ zfssa_iscsi_initiator_group }} +zfssa_target_portal = {{ zfssa_iscsi_target_portal }} +zfssa_target_interfaces = {{ zfssa_iscsi_target_interfaces }} +{% endif %} + [privsep_entrypoint] helper_command=sudo cinder-rootwrap /etc/cinder/rootwrap.conf privsep-helper --config-file /etc/cinder/cinder.conf diff --git a/releasenotes/notes/add-zfssa-iscsi-as-cinder-volume-backend-cadd90a57fdc671b.yaml b/releasenotes/notes/add-zfssa-iscsi-as-cinder-volume-backend-cadd90a57fdc671b.yaml new file mode 100644 index 0000000000..c7d7ddd71c --- /dev/null +++ b/releasenotes/notes/add-zfssa-iscsi-as-cinder-volume-backend-cadd90a57fdc671b.yaml @@ -0,0 +1,3 @@ +--- +features: + - Allow cinder-volume to use Oracle ZFS Storage Appliance iSCSI backend.