From eddb95941b7c57cde28be4d99751f80d30ce6fc4 Mon Sep 17 00:00:00 2001 From: Mike Christie Date: Fri, 28 Sep 2018 16:23:10 -0500 Subject: [PATCH] igw: valid client CHAP settings. The linux kernel target layer, LIO, does not support the iscsi target to mix ACLs that have chap enabled and disabled under the same tpg. This patch adds a check and fails if this type of setup is detected. This fixes Red Hat BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1615088 Signed-off-by: Mike Christie --- roles/ceph-validate/tasks/check_iscsi.yml | 10 ++++++++++ roles/ceph-validate/tasks/main.yml | 5 +++++ 2 files changed, 15 insertions(+) create mode 100644 roles/ceph-validate/tasks/check_iscsi.yml diff --git a/roles/ceph-validate/tasks/check_iscsi.yml b/roles/ceph-validate/tasks/check_iscsi.yml new file mode 100644 index 000000000..6c6a7670c --- /dev/null +++ b/roles/ceph-validate/tasks/check_iscsi.yml @@ -0,0 +1,10 @@ +--- +- name: fail if unsupported chap configuration + fail: + msg: "Mixing clients with CHAP enabled and disabled is not supported." + with_items: "{{ client_connections | default({}) }}" + when: + - item.status is defined + - item.status == "present" + - item.chap != '' + - " '' in client_connections | selectattr('status', 'match', 'present') | map(attribute='chap') | list" diff --git a/roles/ceph-validate/tasks/main.yml b/roles/ceph-validate/tasks/main.yml index 71b490431..5458a0567 100644 --- a/roles/ceph-validate/tasks/main.yml +++ b/roles/ceph-validate/tasks/main.yml @@ -82,3 +82,8 @@ - radosgw_interface != "dummy" - radosgw_address == "0.0.0.0" - radosgw_address_block == "subnet" + +- name: include check_iscsi.yml + include: check_iscsi.yml + when: + - iscsi_gw_group_name in group_names -- 2.39.5