2012-05-07 19:12:48 +00:00
|
|
|
description "Ceph MON"
|
|
|
|
|
2012-06-02 22:19:28 +00:00
|
|
|
start on ceph-mon
|
|
|
|
stop on runlevel [!2345] or stopping ceph-mon-all
|
2012-05-07 19:12:48 +00:00
|
|
|
|
|
|
|
respawn
|
2015-06-03 18:57:34 +00:00
|
|
|
respawn limit 3 1800
|
2012-05-07 19:12:48 +00:00
|
|
|
|
2012-11-17 01:59:08 +00:00
|
|
|
limit nofile 16384 16384
|
2012-11-17 00:19:00 +00:00
|
|
|
|
2012-05-07 19:12:48 +00:00
|
|
|
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
|
2012-08-30 14:11:09 +00:00
|
|
|
export cluster
|
|
|
|
export id
|
2012-05-07 19:12:48 +00:00
|
|
|
|
2012-06-02 22:19:28 +00:00
|
|
|
# this breaks oneiric
|
|
|
|
#usage "cluster = name of cluster (defaults to 'ceph'); id = monitor instance id"
|
|
|
|
|
2012-05-07 19:12:48 +00:00
|
|
|
exec /usr/bin/ceph-mon --cluster="${cluster:-ceph}" -i "$id" -f
|
2013-05-27 10:41:53 +00:00
|
|
|
|
|
|
|
post-stop script
|
|
|
|
# Cleanup socket in case of segfault
|
|
|
|
rm -f "/var/run/ceph/ceph-mon.$id.asok"
|
|
|
|
end script
|