Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / upstart / ceph-osd.conf
1 description "Ceph OSD"
2
3 start on ceph-osd
4 stop on runlevel [!2345] or stopping ceph-osd-all
5
6 respawn
7 respawn limit 3 1800
8
9 limit nofile 327680 327680
10
11 pre-start script
12     set -e
13     test -x /usr/bin/ceph-osd || { stop; exit 0; }
14     test -d "/var/lib/ceph/osd/${cluster:-ceph}-$id" || { stop; exit 0; }
15
16     install -d -m0770 -o ceph -g ceph /var/run/ceph
17
18     /usr/lib/ceph/ceph-osd-prestart.sh --cluster="${cluster:-ceph}" -i "$id"
19 end script
20
21 instance ${cluster:-ceph}/$id
22 export cluster
23 export id
24
25 script
26     test -f /etc/default/ceph && . /etc/default/ceph
27     export TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES
28     exec /usr/bin/ceph-osd --cluster="${cluster:-ceph}" -i "$id" -f --setuser ceph --setgroup ceph
29 end script