From 73835b7c08c6cdc7996d0af0acbe3011b92d3246 Mon Sep 17 00:00:00 2001 From: Keigo Noha Date: Fri, 13 Dec 2024 18:12:13 +0900 Subject: [PATCH] Stop and disable iscsi-starter.service When an EDPM node rebooted which runs a VM with iscsi-backed volume, it leaves node records under /var/lib/iscsi/nodes. While the records exist, iscsi-starter.service runs iscsi.service. Then it starts iscsid.service also. To prevent this issue, we need to stop and disable iscsi-starter.service. Signed-off-by: Keigo Noha --- roles/edpm_iscsid/tasks/install.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/roles/edpm_iscsid/tasks/install.yml b/roles/edpm_iscsid/tasks/install.yml index c5d38fa45..5b8b6ae52 100644 --- a/roles/edpm_iscsid/tasks/install.yml +++ b/roles/edpm_iscsid/tasks/install.yml @@ -46,12 +46,15 @@ - name: Gather services facts ansible.builtin.service_facts: - - name: Stop iscsi.service + - name: Stop and disable iscsi.service and iscsi-starter.service ansible.builtin.systemd: - name: iscsi.service + name: "{{ item }}" state: stopped enabled: false when: - - ansible_facts.services["iscsi.service"] is defined - - ansible_facts.services["iscsi.service"]["status"] != "not-found" - - ansible_facts.services["iscsi.service"]["status"] == "enabled" + - ansible_facts.services[item] is defined + - ansible_facts.services[item]["status"] != "not-found" + - ansible_facts.services[item]["status"] == "enabled" + loop: + - iscsi.service + - iscsi-starter.service