use pkill for ceph monitors

This commit is contained in:
Nico Schottelius 2020-07-02 21:55:15 +02:00
parent 36b23a4bd9
commit a9d79928a3

View file

@ -24,7 +24,7 @@ if echo $to_monitor | grep ^osd; then
# Generated by $0 # Generated by $0
check process ${to_monitor} with pidfile /var/run/ceph/${to_monitor}.pid check process ${to_monitor} with pidfile /var/run/ceph/${to_monitor}.pid
start program = "/usr/bin/ceph-osd -i ${osdid} --pid-file /var/run/ceph/osd.${osdid}.pid -c /etc/ceph/ceph.conf --cluster ceph --setuser ceph --setgroup ceph" with timeout 3600 seconds start program = "/usr/bin/ceph-osd -i ${osdid} --pid-file /var/run/ceph/osd.${osdid}.pid -c /etc/ceph/ceph.conf --cluster ceph --setuser ceph --setgroup ceph" with timeout 3600 seconds
stop program = "/usr/bin/pkill -f '/usr/bin/ceph-osd -i ${osdid}'"
EOF EOF
else else
@ -33,6 +33,7 @@ else
# Generated by $0 # Generated by $0
check process ${to_monitor} with pidfile /var/run/ceph/${to_monitor}.pid check process ${to_monitor} with pidfile /var/run/ceph/${to_monitor}.pid
start program = "/etc/init.d/ceph start ${to_monitor}" with timeout 60 seconds start program = "/etc/init.d/ceph start ${to_monitor}" with timeout 60 seconds
stop program = "/etc/init.d/ceph stop ${to_monitor}"
EOF EOF
@ -40,7 +41,6 @@ fi
# final clause same for both # final clause same for both
cat >> "$conf" <<EOF cat >> "$conf" <<EOF
stop program = "/etc/init.d/ceph stop ${to_monitor}"
group ceph group ceph
depends on $depends depends on $depends