~ubuntu-branches/ubuntu/quantal/ceph/quantal

« back to all changes in this revision

Viewing changes to src/upstart/ceph-osd.conf

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-07-16 09:56:24 UTC
  • mfrom: (0.3.11)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: package-import@ubuntu.com-20120716095624-azr2w4hbhei1rxmx
Tags: upstream-0.48
ImportĀ upstreamĀ versionĀ 0.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
description "Ceph OSD"
 
2
 
 
3
stop on runlevel [!2345]
 
4
 
 
5
respawn
 
6
respawn limit 5 30
 
7
 
 
8
pre-start script
 
9
    set -e
 
10
    test -x /usr/bin/ceph-osd || { stop; exit 0; }
 
11
    test -d "/var/lib/ceph/osd/${cluster:-ceph}-$id" || { stop; exit 0; }
 
12
 
 
13
    install -d -m0755 /var/run/ceph
 
14
 
 
15
    # update location in crush; put in some suitable defaults on the
 
16
    # command line, ceph.conf can override what it wants
 
17
    location="$(ceph-conf --cluster="${cluster:-ceph}" --name="osd.$id" --lookup osd_crush_location || :)"
 
18
    if [ -n "$location" ]; then
 
19
      weight="$(ceph-conf --cluster="$cluster" --name="osd.$id" --lookup osd_crush_weight || :)"
 
20
      ceph \
 
21
        --cluster="${cluster:-ceph}" \
 
22
        --name="osd.$id" \
 
23
        --keyring="/var/lib/ceph/osd/${cluster:-ceph}-$id/keyring" \
 
24
        osd crush set \
 
25
        -- \
 
26
        "$id" "osd.$id" "${weight:-1}" \
 
27
        pool=default \
 
28
        host="$(hostname -s)" \
 
29
        $location \
 
30
       || :
 
31
    fi
 
32
 
 
33
end script
 
34
 
 
35
instance ${cluster:-ceph}/$id
 
36
 
 
37
exec /usr/bin/ceph-osd --cluster="${cluster:-ceph}" -i "$id" -f