summaryrefslogtreecommitdiff
path: root/src/upstart
diff options
context:
space:
mode:
authorTommi Virtanen <tv@inktank.com>2012-07-12 10:47:29 -0700
committerTommi Virtanen <tv@inktank.com>2012-09-05 11:28:04 -0700
commit27372dc4e99c17a7a2d5ad6646e5ae54392d5955 (patch)
treea3e1d672e487bc1f5bca26abc6578eb6ec79724a /src/upstart
parent471105a966f873aef2361b1ed48d088c490fe1aa (diff)
downloadceph-27372dc4e99c17a7a2d5ad6646e5ae54392d5955.tar.gz
upstart: Make ceph-osd always set the crush location.
This used to be conditional on config having osd_crush_location set, but with that, minimal configuration left the OSD completely out of the crush map, and prevented the OSD from starting properly. Note: Ceph does not currently let this mechanism automatically move hosts to another location in the CRUSH hierarchy. This means if you let this run with defaults, setting osd_crush_location later will not take effect. Set up your config file (or Chef environment) fully before starting the OSDs the first time. Signed-off-by: Tommi Virtanen <tv@inktank.com>
Diffstat (limited to 'src/upstart')
-rw-r--r--src/upstart/ceph-osd.conf7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/upstart/ceph-osd.conf b/src/upstart/ceph-osd.conf
index ac902857e22..cff5f431d30 100644
--- a/src/upstart/ceph-osd.conf
+++ b/src/upstart/ceph-osd.conf
@@ -15,9 +15,8 @@ pre-start script
# update location in crush; put in some suitable defaults on the
# command line, ceph.conf can override what it wants
location="$(ceph-conf --cluster="${cluster:-ceph}" --name="osd.$id" --lookup osd_crush_location || :)"
- if [ -n "$location" ]; then
- weight="$(ceph-conf --cluster="$cluster" --name="osd.$id" --lookup osd_crush_weight || :)"
- ceph \
+ weight="$(ceph-conf --cluster="$cluster" --name="osd.$id" --lookup osd_crush_weight || :)"
+ ceph \
--cluster="${cluster:-ceph}" \
--name="osd.$id" \
--keyring="/var/lib/ceph/osd/${cluster:-ceph}-$id/keyring" \
@@ -28,8 +27,6 @@ pre-start script
host="$(hostname -s)" \
$location \
|| :
- fi
-
end script
instance ${cluster:-ceph}/$id