mirror of
https://github.com/ceph/ceph
synced 2024-12-21 02:42:48 +00:00
eaff6cb24e
It may take tens of seconds to restart each time, so 5 in 30s does not stop the crash on startup respawn loop in many cases. In particular, we'd like to catch the case where the internal heartbeats fail. This should be enough for all but the most sluggish of OSDs and capture many cases of failure shortly after startup. Fixes: #11798 Signed-off-by: Sage Weil <sage@redhat.com>
32 lines
690 B
Plaintext
32 lines
690 B
Plaintext
description "Ceph MON"
|
|
|
|
start on ceph-mon
|
|
stop on runlevel [!2345] or stopping ceph-mon-all
|
|
|
|
respawn
|
|
respawn limit 3 1800
|
|
|
|
limit nofile 16384 16384
|
|
|
|
pre-start script
|
|
set -e
|
|
test -x /usr/bin/ceph-mon || { stop; exit 0; }
|
|
test -d "/var/lib/ceph/mon/${cluster:-ceph}-$id" || { stop; exit 0; }
|
|
|
|
install -d -m0755 /var/run/ceph
|
|
end script
|
|
|
|
instance ${cluster:-ceph}/$id
|
|
export cluster
|
|
export id
|
|
|
|
# this breaks oneiric
|
|
#usage "cluster = name of cluster (defaults to 'ceph'); id = monitor instance id"
|
|
|
|
exec /usr/bin/ceph-mon --cluster="${cluster:-ceph}" -i "$id" -f
|
|
|
|
post-stop script
|
|
# Cleanup socket in case of segfault
|
|
rm -f "/var/run/ceph/ceph-mon.$id.asok"
|
|
end script
|