]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
igw: valid client CHAP settings.
authorMike Christie <mchristi@redhat.com>
Fri, 28 Sep 2018 21:23:10 +0000 (16:23 -0500)
committerSébastien Han <seb@redhat.com>
Mon, 1 Oct 2018 16:23:03 +0000 (18:23 +0200)
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 <mchristi@redhat.com>
roles/ceph-validate/tasks/check_iscsi.yml [new file with mode: 0644]
roles/ceph-validate/tasks/main.yml

diff --git a/roles/ceph-validate/tasks/check_iscsi.yml b/roles/ceph-validate/tasks/check_iscsi.yml
new file mode 100644 (file)
index 0000000..6c6a767
--- /dev/null
@@ -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"
index 71b4904317991afc5d1d544da5e020b08c243012..5458a05672fe69fd1791aea880d5d8f3dda9c655 100644 (file)
@@ -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