From b6b24a5ca97e748f07a52229f456e8977f6397a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 5 Oct 2017 16:40:07 +0200 Subject: [PATCH] iscsi: fix wrong group name for iscsi MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1498490 Signed-off-by: Sébastien Han --- group_vars/all.yml.sample | 2 +- group_vars/rhcs.yml.sample | 2 +- infrastructure-playbooks/purge-cluster.yml | 2 +- roles/ceph-defaults/defaults/main.yml | 2 +- roles/ceph-iscsi-gw/tasks/generate_crt.yml | 6 +++--- site.yml.sample | 4 ++-- tests/functional/centos/7/cluster/group_vars/iscsi-gws | 2 ++ tests/functional/centos/7/cluster/hosts | 2 +- 8 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 tests/functional/centos/7/cluster/group_vars/iscsi-gws diff --git a/group_vars/all.yml.sample b/group_vars/all.yml.sample index 22110f879..d79d71c9b 100644 --- a/group_vars/all.yml.sample +++ b/group_vars/all.yml.sample @@ -51,7 +51,7 @@ dummy: #restapi_group_name: restapis #rbdmirror_group_name: rbdmirrors #client_group_name: clients -#iscsi_gw_group_name: iscsi_gws +#iscsi_gw_group_name: iscsi-gws #mgr_group_name: mgrs # If check_firewall is true, then ansible will try to determine if the diff --git a/group_vars/rhcs.yml.sample b/group_vars/rhcs.yml.sample index 5ba40b7fc..ea5c849a4 100644 --- a/group_vars/rhcs.yml.sample +++ b/group_vars/rhcs.yml.sample @@ -51,7 +51,7 @@ fetch_directory: ~/ceph-ansible-keys #restapi_group_name: restapis #rbdmirror_group_name: rbdmirrors #client_group_name: clients -#iscsi_gw_group_name: iscsi_gws +#iscsi_gw_group_name: iscsi-gws #mgr_group_name: mgrs # If check_firewall is true, then ansible will try to determine if the diff --git a/infrastructure-playbooks/purge-cluster.yml b/infrastructure-playbooks/purge-cluster.yml index 578b22d22..3216ea0e4 100644 --- a/infrastructure-playbooks/purge-cluster.yml +++ b/infrastructure-playbooks/purge-cluster.yml @@ -509,7 +509,7 @@ igw_purge_type: all hosts: - - "{{ iscsi_gw_group_name|default('iscsi-gw') }}" + - "{{ iscsi_gw_group_name|default('iscsi-gws') }}" gather_facts: false # already gathered previously diff --git a/roles/ceph-defaults/defaults/main.yml b/roles/ceph-defaults/defaults/main.yml index 20a31d3e7..5d38348c8 100644 --- a/roles/ceph-defaults/defaults/main.yml +++ b/roles/ceph-defaults/defaults/main.yml @@ -43,7 +43,7 @@ nfs_group_name: nfss restapi_group_name: restapis rbdmirror_group_name: rbdmirrors client_group_name: clients -iscsi_gw_group_name: iscsi_gws +iscsi_gw_group_name: iscsi-gws mgr_group_name: mgrs # If check_firewall is true, then ansible will try to determine if the diff --git a/roles/ceph-iscsi-gw/tasks/generate_crt.yml b/roles/ceph-iscsi-gw/tasks/generate_crt.yml index db53acbaa..067e631de 100644 --- a/roles/ceph-iscsi-gw/tasks/generate_crt.yml +++ b/roles/ceph-iscsi-gw/tasks/generate_crt.yml @@ -1,16 +1,16 @@ --- -- name: (local) create ssl crt/key files +- name: create ssl crt/key files shell: | openssl req -newkey rsa:2048 -nodes -keyout /etc/ceph/iscsi-gateway.key -x509 -days 365 -out /etc/ceph/iscsi-gateway.crt -subj "/C=US/ST=./L=./O=RedHat/OU=Linux/CN={{ ansible_hostname }}" run_once: True -- name: (local) create pem +- name: create pem shell: | cat /etc/ceph/iscsi-gateway.crt /etc/ceph/iscsi-gateway.key > /etc/ceph/iscsi-gateway.pem run_once: True register: pem -- name: (local) create public key from pem +- name: create public key from pem shell: | openssl x509 -inform pem -in /etc/ceph/iscsi-gateway.pem -pubkey -noout > /etc/ceph/iscsi-gateway-pub.key run_once: True diff --git a/site.yml.sample b/site.yml.sample index be79b4800..0d6128908 100644 --- a/site.yml.sample +++ b/site.yml.sample @@ -12,7 +12,7 @@ - rbdmirrors - clients - mgrs - - iscsi_gws + - iscsi-gws gather_facts: false @@ -142,7 +142,7 @@ - ceph-config - ceph-client -- hosts: iscsi_gws +- hosts: iscsi-gws gather_facts: false become: True roles: diff --git a/tests/functional/centos/7/cluster/group_vars/iscsi-gws b/tests/functional/centos/7/cluster/group_vars/iscsi-gws new file mode 100644 index 000000000..f08f50a87 --- /dev/null +++ b/tests/functional/centos/7/cluster/group_vars/iscsi-gws @@ -0,0 +1,2 @@ +--- +gateway_ip_list: 192.168.1.90 diff --git a/tests/functional/centos/7/cluster/hosts b/tests/functional/centos/7/cluster/hosts index b0bf472bc..257f98aa8 100644 --- a/tests/functional/centos/7/cluster/hosts +++ b/tests/functional/centos/7/cluster/hosts @@ -24,5 +24,5 @@ ceph-nfs0 [rbdmirrors] ceph-rbd-mirror0 -[iscsi_gws] +[iscsi-gws] ceph-iscsi-gw0 ceph_repository="dev"