Skip to content

Commit

Permalink
Stop and disable iscsi-starter.service
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
knoha-rh committed Dec 13, 2024
1 parent 0874fc3 commit 18a3231
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions roles/edpm_iscsid/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,16 @@
- 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

0 comments on commit 18a3231

Please sign in to comment.