From f492b0e718af28201105cc5a13095d31fda396ec Mon Sep 17 00:00:00 2001 From: Arano-kai Date: Mon, 6 Nov 2017 16:02:47 +0200 Subject: [PATCH] FIX: run restart scripts in `noexec` /tmp MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit - One can not run scripts directly in place, that mounted with `noexec` option. But one can run scripts as arguments for `bash/sh`. Signed-off-by: Arano-kai (cherry picked from commit 5cde3175aede783feb89cbbc4ebb5c2f05649b99) Signed-off-by: Sébastien Han --- roles/ceph-defaults/handlers/main.yml | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/roles/ceph-defaults/handlers/main.yml b/roles/ceph-defaults/handlers/main.yml index b3ea834ba..50eb92462 100644 --- a/roles/ceph-defaults/handlers/main.yml +++ b/roles/ceph-defaults/handlers/main.yml @@ -25,7 +25,7 @@ - mon_group_name in group_names - name: restart ceph mon daemon(s) - non container - command: /tmp/restart_mon_daemon.sh + command: /usr/bin/env bash /tmp/restart_mon_daemon.sh listen: "restart ceph mons" when: # We do not want to run these checks on initial deployment (`socket.rc == 0`) @@ -38,7 +38,7 @@ run_once: True - name: restart ceph mon daemon(s) - container - command: /tmp/restart_mon_daemon.sh + command: /usr/bin/env bash /tmp/restart_mon_daemon.sh listen: "restart ceph mons" when: # We do not want to run these checks on initial deployment (`socket.rc == 0`) @@ -76,7 +76,7 @@ - osd_group_name in group_names - name: restart ceph osds daemon(s) - non container - command: /tmp/restart_osd_daemon.sh + command: /usr/bin/env bash /tmp/restart_osd_daemon.sh listen: "restart ceph osds" when: - osd_group_name in group_names @@ -92,7 +92,7 @@ run_once: True - name: restart ceph osds daemon(s) - container - command: /tmp/restart_osd_daemon.sh + command: /usr/bin/env bash /tmp/restart_osd_daemon.sh listen: "restart ceph osds" when: # We do not want to run these checks on initial deployment (`socket_osd_container_stat.results[n].rc == 0`) @@ -129,7 +129,7 @@ - mds_group_name in group_names - name: restart ceph mds daemon(s) - non container - command: /tmp/restart_mds_daemon.sh + command: /usr/bin/env bash /tmp/restart_mds_daemon.sh listen: "restart ceph mdss" when: # We do not want to run these checks on initial deployment (`socket.rc == 0`) @@ -142,7 +142,7 @@ run_once: True - name: restart ceph mds daemon(s) - container - command: /tmp/restart_mds_daemon.sh + command: /usr/bin/env bash /tmp/restart_mds_daemon.sh listen: "restart ceph mdss" when: # We do not want to run these checks on initial deployment (`socket.rc == 0`) @@ -177,7 +177,7 @@ - rgw_group_name in group_names - name: restart ceph rgw daemon(s) - non container - command: /tmp/restart_rgw_daemon.sh + command: /usr/bin/env bash /tmp/restart_rgw_daemon.sh listen: "restart ceph rgws" when: # We do not want to run these checks on initial deployment (`socket.rc == 0`) @@ -190,7 +190,7 @@ run_once: True - name: restart ceph rgw daemon(s) - container - command: /tmp/restart_rgw_daemon.sh + command: /usr/bin/env bash /tmp/restart_rgw_daemon.sh listen: "restart ceph rgws" when: # We do not want to run these checks on initial deployment (`socket.rc == 0`) @@ -225,7 +225,7 @@ - nfs_group_name in group_names - name: restart ceph nfs daemon(s) - non container - command: /tmp/restart_nfs_daemon.sh + command: /usr/bin/env bash /tmp/restart_nfs_daemon.sh listen: "restart ceph nfss" when: # We do not want to run these checks on initial deployment (`socket.rc == 0`) @@ -238,7 +238,7 @@ run_once: True - name: restart ceph nfs daemon(s) - container - command: /tmp/restart_nfs_daemon.sh + command: /usr/bin/env bash /tmp/restart_nfs_daemon.sh listen: "restart ceph nfss" when: # We do not want to run these checks on initial deployment (`socket.rc == 0`) @@ -273,7 +273,7 @@ - rbdmirror_group_name in group_names - name: restart ceph rbd mirror daemon(s) - non container - command: /tmp/restart_rbd_mirror_daemon.sh + command: /usr/bin/env bash /tmp/restart_rbd_mirror_daemon.sh listen: "restart ceph rbdmirrors" when: # We do not want to run these checks on initial deployment (`socket.rc == 0`) @@ -286,7 +286,7 @@ run_once: True - name: restart ceph rbd mirror daemon(s) - container - command: /tmp/restart_rbd_mirror_daemon.sh + command: /usr/bin/env bash /tmp/restart_rbd_mirror_daemon.sh listen: "restart ceph rbdmirrors" when: # We do not want to run these checks on initial deployment (`socket.rc == 0`) @@ -321,7 +321,7 @@ - mgr_group_name in group_names - name: restart ceph mgr daemon(s) - non container - command: /tmp/restart_mgr_daemon.sh + command: /usr/bin/env bash /tmp/restart_mgr_daemon.sh listen: "restart ceph mgrs" when: # We do not want to run these checks on initial deployment (`socket.rc == 0`) @@ -334,7 +334,7 @@ run_once: True - name: restart ceph mgr daemon(s) - container - command: /tmp/restart_mgr_daemon.sh + command: /usr/bin/env bash /tmp/restart_mgr_daemon.sh listen: "restart ceph mgrs" when: # We do not want to run these checks on initial deployment (`socket.rc == 0`) -- 2.39.5