mirror of https://github.com/ceph/ceph-ansible.git
iscsi: refact deprecated variables
This commit moves some old variables into ceph-defaults so we can move the `use_new_ceph_iscsi` fact in ceph-facts role in order. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/4195/head
parent
08a6d10c32
commit
a781ce881c
|
@ -751,6 +751,66 @@ dummy:
|
|||
#alertmanager_conf_dir: /etc/alertmanager
|
||||
|
||||
|
||||
##################################
|
||||
# DEPRECIATED iSCSI TARGET SETUP #
|
||||
##################################
|
||||
|
||||
# WARNING #
|
||||
|
||||
# The following values are depreciated. To setup targets, gateways, LUNs, and
|
||||
# clients you should use gwcli or dashboard. If the following values are set,
|
||||
# the old ceph-iscsi-config/ceph-iscsi-cli packages will be used.
|
||||
|
||||
# Specify the iqn for ALL gateways. This iqn is shared across the gateways, so an iscsi
|
||||
# client sees the gateway group as a single storage subsystem.
|
||||
#gateway_iqn: ""
|
||||
|
||||
# gateway_ip_list provides a list of the IP Addrresses - one per gateway - that will be used
|
||||
# as an iscsi target portal ip. The list must be comma separated - and the order determines
|
||||
# the sequence of TPG's within the iscsi target across each gateway. Once set, additional
|
||||
# gateways can be added, but the order must *not* be changed.
|
||||
#gateway_ip_list: 0.0.0.0
|
||||
|
||||
# rbd_devices defines the images that should be created and exported from the iscsi gateways.
|
||||
# If the rbd does not exist, it will be created for you. In addition you may increase the
|
||||
# size of rbd's by changing the size parameter and rerunning the playbook. A size value lower
|
||||
# than the current size of the rbd is ignored.
|
||||
#
|
||||
# the 'host' parameter defines which of the gateway nodes should handle the physical
|
||||
# allocation/expansion or removal of the rbd
|
||||
# to remove an image, simply use a state of 'absent'. This will first check the rbd is not allocated
|
||||
# to any client, and the remove it from LIO and then delete the rbd image
|
||||
#
|
||||
# NB. this variable definition can be commented out to bypass LUN management
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
#rbd_devices:
|
||||
# - { pool: 'rbd', image: 'ansible1', size: '30G', host: 'ceph-1', state: 'present' }
|
||||
# - { pool: 'rbd', image: 'ansible2', size: '15G', host: 'ceph-1', state: 'present' }
|
||||
# - { pool: 'rbd', image: 'ansible3', size: '30G', host: 'ceph-1', state: 'present' }
|
||||
# - { pool: 'rbd', image: 'ansible4', size: '50G', host: 'ceph-1', state: 'present' }
|
||||
#rbd_devices: {}
|
||||
|
||||
# client_connections defines the client ACL's to restrict client access to specific LUNs
|
||||
# The settings are as follows;
|
||||
# - image_list is a comma separated list of rbd images of the form <pool name>.<rbd_image_name>
|
||||
# - chap supplies the user and password the client will use for authentication of the
|
||||
# form <user>/<password>
|
||||
# - status shows the intended state of this client definition - 'present' or 'absent'
|
||||
#
|
||||
# NB. this definition can be commented out to skip client (nodeACL) management
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
#client_connections:
|
||||
# - { client: 'iqn.1994-05.com.redhat:rh7-iscsi-client', image_list: 'rbd.ansible1,rbd.ansible2', chap: 'rh7-iscsi-client/redhat', status: 'present' }
|
||||
# - { client: 'iqn.1991-05.com.microsoft:w2k12r2', image_list: 'rbd.ansible4', chap: 'w2k12r2/microsoft_w2k12', status: 'absent' }
|
||||
|
||||
#client_connections: {}
|
||||
|
||||
|
||||
|
||||
###############
|
||||
# DEPRECATION #
|
||||
###############
|
||||
|
|
|
@ -50,62 +50,3 @@ dummy:
|
|||
#ceph_rbd_target_api_docker_memory_limit: "{{ ansible_memtotal_mb }}m"
|
||||
#ceph_rbd_target_api_docker_cpu_limit: 1
|
||||
|
||||
|
||||
##################################
|
||||
# DEPRECIATED iSCSI TARGET SETUP #
|
||||
##################################
|
||||
|
||||
# WARNING #
|
||||
|
||||
# The following values are depreciated. To setup targets, gateways, LUNs, and
|
||||
# clients you should use gwcli or dashboard. If the following values are set,
|
||||
# the old ceph-iscsi-config/ceph-iscsi-cli packages will be used.
|
||||
|
||||
# Specify the iqn for ALL gateways. This iqn is shared across the gateways, so an iscsi
|
||||
# client sees the gateway group as a single storage subsystem.
|
||||
#gateway_iqn: ""
|
||||
|
||||
# gateway_ip_list provides a list of the IP Addrresses - one per gateway - that will be used
|
||||
# as an iscsi target portal ip. The list must be comma separated - and the order determines
|
||||
# the sequence of TPG's within the iscsi target across each gateway. Once set, additional
|
||||
# gateways can be added, but the order must *not* be changed.
|
||||
#gateway_ip_list: 0.0.0.0
|
||||
|
||||
# rbd_devices defines the images that should be created and exported from the iscsi gateways.
|
||||
# If the rbd does not exist, it will be created for you. In addition you may increase the
|
||||
# size of rbd's by changing the size parameter and rerunning the playbook. A size value lower
|
||||
# than the current size of the rbd is ignored.
|
||||
#
|
||||
# the 'host' parameter defines which of the gateway nodes should handle the physical
|
||||
# allocation/expansion or removal of the rbd
|
||||
# to remove an image, simply use a state of 'absent'. This will first check the rbd is not allocated
|
||||
# to any client, and the remove it from LIO and then delete the rbd image
|
||||
#
|
||||
# NB. this variable definition can be commented out to bypass LUN management
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
#rbd_devices:
|
||||
# - { pool: 'rbd', image: 'ansible1', size: '30G', host: 'ceph-1', state: 'present' }
|
||||
# - { pool: 'rbd', image: 'ansible2', size: '15G', host: 'ceph-1', state: 'present' }
|
||||
# - { pool: 'rbd', image: 'ansible3', size: '30G', host: 'ceph-1', state: 'present' }
|
||||
# - { pool: 'rbd', image: 'ansible4', size: '50G', host: 'ceph-1', state: 'present' }
|
||||
#rbd_devices: {}
|
||||
|
||||
# client_connections defines the client ACL's to restrict client access to specific LUNs
|
||||
# The settings are as follows;
|
||||
# - image_list is a comma separated list of rbd images of the form <pool name>.<rbd_image_name>
|
||||
# - chap supplies the user and password the client will use for authentication of the
|
||||
# form <user>/<password>
|
||||
# - status shows the intended state of this client definition - 'present' or 'absent'
|
||||
#
|
||||
# NB. this definition can be commented out to skip client (nodeACL) management
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
#client_connections:
|
||||
# - { client: 'iqn.1994-05.com.redhat:rh7-iscsi-client', image_list: 'rbd.ansible1,rbd.ansible2', chap: 'rh7-iscsi-client/redhat', status: 'present' }
|
||||
# - { client: 'iqn.1991-05.com.microsoft:w2k12r2', image_list: 'rbd.ansible4', chap: 'w2k12r2/microsoft_w2k12', status: 'absent' }
|
||||
|
||||
#client_connections: {}
|
||||
|
||||
|
|
|
@ -751,6 +751,66 @@ ceph_docker_registry: "registry.access.redhat.com"
|
|||
#alertmanager_conf_dir: /etc/alertmanager
|
||||
|
||||
|
||||
##################################
|
||||
# DEPRECIATED iSCSI TARGET SETUP #
|
||||
##################################
|
||||
|
||||
# WARNING #
|
||||
|
||||
# The following values are depreciated. To setup targets, gateways, LUNs, and
|
||||
# clients you should use gwcli or dashboard. If the following values are set,
|
||||
# the old ceph-iscsi-config/ceph-iscsi-cli packages will be used.
|
||||
|
||||
# Specify the iqn for ALL gateways. This iqn is shared across the gateways, so an iscsi
|
||||
# client sees the gateway group as a single storage subsystem.
|
||||
#gateway_iqn: ""
|
||||
|
||||
# gateway_ip_list provides a list of the IP Addrresses - one per gateway - that will be used
|
||||
# as an iscsi target portal ip. The list must be comma separated - and the order determines
|
||||
# the sequence of TPG's within the iscsi target across each gateway. Once set, additional
|
||||
# gateways can be added, but the order must *not* be changed.
|
||||
#gateway_ip_list: 0.0.0.0
|
||||
|
||||
# rbd_devices defines the images that should be created and exported from the iscsi gateways.
|
||||
# If the rbd does not exist, it will be created for you. In addition you may increase the
|
||||
# size of rbd's by changing the size parameter and rerunning the playbook. A size value lower
|
||||
# than the current size of the rbd is ignored.
|
||||
#
|
||||
# the 'host' parameter defines which of the gateway nodes should handle the physical
|
||||
# allocation/expansion or removal of the rbd
|
||||
# to remove an image, simply use a state of 'absent'. This will first check the rbd is not allocated
|
||||
# to any client, and the remove it from LIO and then delete the rbd image
|
||||
#
|
||||
# NB. this variable definition can be commented out to bypass LUN management
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
#rbd_devices:
|
||||
# - { pool: 'rbd', image: 'ansible1', size: '30G', host: 'ceph-1', state: 'present' }
|
||||
# - { pool: 'rbd', image: 'ansible2', size: '15G', host: 'ceph-1', state: 'present' }
|
||||
# - { pool: 'rbd', image: 'ansible3', size: '30G', host: 'ceph-1', state: 'present' }
|
||||
# - { pool: 'rbd', image: 'ansible4', size: '50G', host: 'ceph-1', state: 'present' }
|
||||
#rbd_devices: {}
|
||||
|
||||
# client_connections defines the client ACL's to restrict client access to specific LUNs
|
||||
# The settings are as follows;
|
||||
# - image_list is a comma separated list of rbd images of the form <pool name>.<rbd_image_name>
|
||||
# - chap supplies the user and password the client will use for authentication of the
|
||||
# form <user>/<password>
|
||||
# - status shows the intended state of this client definition - 'present' or 'absent'
|
||||
#
|
||||
# NB. this definition can be commented out to skip client (nodeACL) management
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
#client_connections:
|
||||
# - { client: 'iqn.1994-05.com.redhat:rh7-iscsi-client', image_list: 'rbd.ansible1,rbd.ansible2', chap: 'rh7-iscsi-client/redhat', status: 'present' }
|
||||
# - { client: 'iqn.1991-05.com.microsoft:w2k12r2', image_list: 'rbd.ansible4', chap: 'w2k12r2/microsoft_w2k12', status: 'absent' }
|
||||
|
||||
#client_connections: {}
|
||||
|
||||
|
||||
|
||||
###############
|
||||
# DEPRECATION #
|
||||
###############
|
||||
|
|
|
@ -743,6 +743,66 @@ alertmanager_data_dir: /var/lib/alertmanager
|
|||
alertmanager_conf_dir: /etc/alertmanager
|
||||
|
||||
|
||||
##################################
|
||||
# DEPRECIATED iSCSI TARGET SETUP #
|
||||
##################################
|
||||
|
||||
# WARNING #
|
||||
|
||||
# The following values are depreciated. To setup targets, gateways, LUNs, and
|
||||
# clients you should use gwcli or dashboard. If the following values are set,
|
||||
# the old ceph-iscsi-config/ceph-iscsi-cli packages will be used.
|
||||
|
||||
# Specify the iqn for ALL gateways. This iqn is shared across the gateways, so an iscsi
|
||||
# client sees the gateway group as a single storage subsystem.
|
||||
gateway_iqn: ""
|
||||
|
||||
# gateway_ip_list provides a list of the IP Addrresses - one per gateway - that will be used
|
||||
# as an iscsi target portal ip. The list must be comma separated - and the order determines
|
||||
# the sequence of TPG's within the iscsi target across each gateway. Once set, additional
|
||||
# gateways can be added, but the order must *not* be changed.
|
||||
gateway_ip_list: 0.0.0.0
|
||||
|
||||
# rbd_devices defines the images that should be created and exported from the iscsi gateways.
|
||||
# If the rbd does not exist, it will be created for you. In addition you may increase the
|
||||
# size of rbd's by changing the size parameter and rerunning the playbook. A size value lower
|
||||
# than the current size of the rbd is ignored.
|
||||
#
|
||||
# the 'host' parameter defines which of the gateway nodes should handle the physical
|
||||
# allocation/expansion or removal of the rbd
|
||||
# to remove an image, simply use a state of 'absent'. This will first check the rbd is not allocated
|
||||
# to any client, and the remove it from LIO and then delete the rbd image
|
||||
#
|
||||
# NB. this variable definition can be commented out to bypass LUN management
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
#rbd_devices:
|
||||
# - { pool: 'rbd', image: 'ansible1', size: '30G', host: 'ceph-1', state: 'present' }
|
||||
# - { pool: 'rbd', image: 'ansible2', size: '15G', host: 'ceph-1', state: 'present' }
|
||||
# - { pool: 'rbd', image: 'ansible3', size: '30G', host: 'ceph-1', state: 'present' }
|
||||
# - { pool: 'rbd', image: 'ansible4', size: '50G', host: 'ceph-1', state: 'present' }
|
||||
rbd_devices: {}
|
||||
|
||||
# client_connections defines the client ACL's to restrict client access to specific LUNs
|
||||
# The settings are as follows;
|
||||
# - image_list is a comma separated list of rbd images of the form <pool name>.<rbd_image_name>
|
||||
# - chap supplies the user and password the client will use for authentication of the
|
||||
# form <user>/<password>
|
||||
# - status shows the intended state of this client definition - 'present' or 'absent'
|
||||
#
|
||||
# NB. this definition can be commented out to skip client (nodeACL) management
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
#client_connections:
|
||||
# - { client: 'iqn.1994-05.com.redhat:rh7-iscsi-client', image_list: 'rbd.ansible1,rbd.ansible2', chap: 'rh7-iscsi-client/redhat', status: 'present' }
|
||||
# - { client: 'iqn.1991-05.com.microsoft:w2k12r2', image_list: 'rbd.ansible4', chap: 'w2k12r2/microsoft_w2k12', status: 'absent' }
|
||||
|
||||
client_connections: {}
|
||||
|
||||
|
||||
|
||||
###############
|
||||
# DEPRECATION #
|
||||
###############
|
||||
|
|
|
@ -318,3 +318,7 @@
|
|||
- (groups.get(grafana_server_group_name, []) | length > 0 or groups.get(mgr_group_name, []) | length > 0)
|
||||
- ip_version == 'ipv6'
|
||||
- dashboard_enabled | bool
|
||||
|
||||
- name: set_fact use_new_ceph_iscsi package or old ceph-iscsi-config/cli
|
||||
set_fact:
|
||||
use_new_ceph_iscsi: "{{ (gateway_ip_list == '0.0.0.0' and gateway_iqn | length == 0 and client_connections | length == 0 and rbd_devices | length == 0) | bool | ternary(true, false) }}"
|
|
@ -41,62 +41,3 @@ ceph_rbd_target_gw_docker_cpu_limit: 1
|
|||
# RBD_TARGET_API resource limitation
|
||||
ceph_rbd_target_api_docker_memory_limit: "{{ ansible_memtotal_mb }}m"
|
||||
ceph_rbd_target_api_docker_cpu_limit: 1
|
||||
|
||||
|
||||
##################################
|
||||
# DEPRECIATED iSCSI TARGET SETUP #
|
||||
##################################
|
||||
|
||||
# WARNING #
|
||||
|
||||
# The following values are depreciated. To setup targets, gateways, LUNs, and
|
||||
# clients you should use gwcli or dashboard. If the following values are set,
|
||||
# the old ceph-iscsi-config/ceph-iscsi-cli packages will be used.
|
||||
|
||||
# Specify the iqn for ALL gateways. This iqn is shared across the gateways, so an iscsi
|
||||
# client sees the gateway group as a single storage subsystem.
|
||||
gateway_iqn: ""
|
||||
|
||||
# gateway_ip_list provides a list of the IP Addrresses - one per gateway - that will be used
|
||||
# as an iscsi target portal ip. The list must be comma separated - and the order determines
|
||||
# the sequence of TPG's within the iscsi target across each gateway. Once set, additional
|
||||
# gateways can be added, but the order must *not* be changed.
|
||||
gateway_ip_list: 0.0.0.0
|
||||
|
||||
# rbd_devices defines the images that should be created and exported from the iscsi gateways.
|
||||
# If the rbd does not exist, it will be created for you. In addition you may increase the
|
||||
# size of rbd's by changing the size parameter and rerunning the playbook. A size value lower
|
||||
# than the current size of the rbd is ignored.
|
||||
#
|
||||
# the 'host' parameter defines which of the gateway nodes should handle the physical
|
||||
# allocation/expansion or removal of the rbd
|
||||
# to remove an image, simply use a state of 'absent'. This will first check the rbd is not allocated
|
||||
# to any client, and the remove it from LIO and then delete the rbd image
|
||||
#
|
||||
# NB. this variable definition can be commented out to bypass LUN management
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
#rbd_devices:
|
||||
# - { pool: 'rbd', image: 'ansible1', size: '30G', host: 'ceph-1', state: 'present' }
|
||||
# - { pool: 'rbd', image: 'ansible2', size: '15G', host: 'ceph-1', state: 'present' }
|
||||
# - { pool: 'rbd', image: 'ansible3', size: '30G', host: 'ceph-1', state: 'present' }
|
||||
# - { pool: 'rbd', image: 'ansible4', size: '50G', host: 'ceph-1', state: 'present' }
|
||||
rbd_devices: {}
|
||||
|
||||
# client_connections defines the client ACL's to restrict client access to specific LUNs
|
||||
# The settings are as follows;
|
||||
# - image_list is a comma separated list of rbd images of the form <pool name>.<rbd_image_name>
|
||||
# - chap supplies the user and password the client will use for authentication of the
|
||||
# form <user>/<password>
|
||||
# - status shows the intended state of this client definition - 'present' or 'absent'
|
||||
#
|
||||
# NB. this definition can be commented out to skip client (nodeACL) management
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
#client_connections:
|
||||
# - { client: 'iqn.1994-05.com.redhat:rh7-iscsi-client', image_list: 'rbd.ansible1,rbd.ansible2', chap: 'rh7-iscsi-client/redhat', status: 'present' }
|
||||
# - { client: 'iqn.1991-05.com.microsoft:w2k12r2', image_list: 'rbd.ansible4', chap: 'w2k12r2/microsoft_w2k12', status: 'absent' }
|
||||
|
||||
client_connections: {}
|
||||
|
|
|
@ -11,23 +11,28 @@
|
|||
common_repos:
|
||||
- tcmu-runner
|
||||
- python-rtslib
|
||||
|
||||
- name: set_fact base iscsi pkgs if new style ceph-iscsi
|
||||
set_fact:
|
||||
iscsi_base:
|
||||
- ceph-iscsi
|
||||
when: use_new_ceph_iscsi | bool
|
||||
|
||||
- name: set_fact base iscsi pkgs if using older ceph-iscsi-config
|
||||
set_fact:
|
||||
iscsi_base:
|
||||
- ceph-iscsi-cli
|
||||
- ceph-iscsi-config
|
||||
when: not use_new_ceph_iscsi | bool
|
||||
|
||||
- name: set_fact ceph_iscsi_repos
|
||||
set_fact:
|
||||
ceph_iscsi_repos: "{{ common_repos + iscsi_base }}"
|
||||
|
||||
- name: set_fact ceph_iscsi_pkgs
|
||||
set_fact:
|
||||
ceph_iscsi_pkgs: "{{ common_pkgs + iscsi_base }}"
|
||||
|
||||
- name: when ceph_iscsi_config_dev is true
|
||||
when:
|
||||
- ceph_origin == 'repository'
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
---
|
||||
- name: set_fact use_new_ceph_iscsi package or old ceph-iscsi-config/cli
|
||||
set_fact:
|
||||
use_new_ceph_iscsi: "{{ (gateway_ip_list | default('0.0.0.0') == '0.0.0.0' and gateway_iqn | default('') | length == 0 and client_connections | default({}) | length == 0 and rbd_devices | default({}) | length == 0) | bool | ternary(true, false) }}"
|
||||
|
||||
- name: make sure gateway_ip_list is configured
|
||||
fail:
|
||||
msg: "you must set a list of IPs (comma separated) for gateway_ip_list"
|
||||
when:
|
||||
- "gateway_ip_list | default('0.0.0.0') == '0.0.0.0'"
|
||||
- gateway_ip_list == '0.0.0.0'
|
||||
- not containerized_deployment | bool
|
||||
- not use_new_ceph_iscsi | bool
|
||||
|
||||
|
@ -15,14 +11,14 @@
|
|||
fail:
|
||||
msg: "you must set a iqn for the iSCSI target"
|
||||
when:
|
||||
- "gateway_iqn | default('') | length == 0"
|
||||
- gateway_iqn | length == 0
|
||||
- not containerized_deployment | bool
|
||||
- not use_new_ceph_iscsi | bool
|
||||
|
||||
- name: fail if unsupported chap configuration
|
||||
fail:
|
||||
msg: "Mixing clients with CHAP enabled and disabled is not supported."
|
||||
with_items: "{{ client_connections | default({}) }}"
|
||||
with_items: "{{ client_connections }}"
|
||||
when:
|
||||
- item.status is defined
|
||||
- item.status == "present"
|
||||
|
|
Loading…
Reference in New Issue