ceph-handler: remove iscsigws restart scripts

The iscsigws restart scripts for tcmu-runner and rbd-target-{api,gw}
services only call the systemctl restart command.
We don't really need to copy a shell script to do it when we can use
the ansible service module instead.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
pull/5587/head
Dimitri Savineau 2020-07-21 15:22:26 -04:00 committed by Guillaume Abrioux
parent 47b7c00287
commit cbe79428e6
6 changed files with 9 additions and 40 deletions

View File

@ -16,8 +16,6 @@
- "restart ceph nfss" - "restart ceph nfss"
- "restart ceph rbdmirrors" - "restart ceph rbdmirrors"
- "restart ceph mgrs" - "restart ceph mgrs"
- "restart ceph tcmu-runner"
- "restart ceph rbd-target-api-gw"
register: tmpdirpath register: tmpdirpath
when: tmpdirpath is not defined or tmpdirpath.path is not defined or tmpdirpath.state=="absent" when: tmpdirpath is not defined or tmpdirpath.path is not defined or tmpdirpath.state=="absent"
@ -89,7 +87,5 @@
- "restart ceph nfss" - "restart ceph nfss"
- "restart ceph rbdmirrors" - "restart ceph rbdmirrors"
- "restart ceph mgrs" - "restart ceph mgrs"
- "restart ceph tcmu-runner"
- "restart ceph rbd-target-api-gw"
register: tmpdirpath register: tmpdirpath
when: tmpdirpath is defined when: tmpdirpath is defined

View File

@ -3,16 +3,10 @@
set_fact: set_fact:
_rbd_target_api_handler_called: True _rbd_target_api_handler_called: True
- name: copy rbd-target-api restart script
template:
src: restart_rbd_target_api.sh.j2
dest: "{{ tmpdirpath.path }}/restart_rbd_target_api.sh"
owner: root
group: root
mode: 0750
- name: restart rbd-target-api - name: restart rbd-target-api
command: /usr/bin/env bash {{ hostvars[item]['tmpdirpath']['path'] }}/restart_rbd_target_api.sh service:
name: rbd-target-api
state: restarted
when: when:
- ceph_rbd_target_api_stat.get('rc') == 0 - ceph_rbd_target_api_stat.get('rc') == 0
- hostvars[item]['_rbd_target_api_handler_called'] | default(False) | bool - hostvars[item]['_rbd_target_api_handler_called'] | default(False) | bool
@ -29,16 +23,10 @@
set_fact: set_fact:
_rbd_target_gw_handler_called: True _rbd_target_gw_handler_called: True
- name: copy rbd-target-gw restart script
template:
src: restart_rbd_target_gw.sh.j2
dest: "{{ tmpdirpath.path }}/restart_rbd_target_gw.sh"
owner: root
group: root
mode: 0750
- name: restart rbd-target-gw - name: restart rbd-target-gw
command: /usr/bin/env bash {{ hostvars[item]['tmpdirpath']['path'] }}/restart_rbd_target_gw.sh service:
name: rbd-target-gw
state: restarted
when: when:
- ceph_rbd_target_gw_stat.get('rc') == 0 - ceph_rbd_target_gw_stat.get('rc') == 0
- hostvars[item]['_rbd_target_gw_handler_called'] | default(False) | bool - hostvars[item]['_rbd_target_gw_handler_called'] | default(False) | bool

View File

@ -3,16 +3,10 @@
set_fact: set_fact:
_tcmu_runner_handler_called: True _tcmu_runner_handler_called: True
- name: copy tcmu-runner restart script
template:
src: restart_tcmu_runner.sh.j2
dest: "{{ tmpdirpath.path }}/restart_tcmu_runner.sh"
owner: root
group: root
mode: 0750
- name: restart tcmu-runner - name: restart tcmu-runner
command: /usr/bin/env bash {{ hostvars[item]['tmpdirpath']['path'] }}/restart_tcmu_runner.sh service:
name: tcmu-runner
state: restarted
when: when:
- ceph_tcmu_runner_stat.get('rc') == 0 - ceph_tcmu_runner_stat.get('rc') == 0
- hostvars[item]['_tcmu_runner_handler_called'] | default(False) | bool - hostvars[item]['_tcmu_runner_handler_called'] | default(False) | bool

View File

@ -1,3 +0,0 @@
#!/bin/bash
systemctl restart rbd-target-api

View File

@ -1,3 +0,0 @@
#!/bin/bash
systemctl restart rbd-target-gw

View File

@ -1,3 +0,0 @@
#!/bin/bash
systemctl restart tcmu-runner