diff options
author | Tommi Virtanen <tv@inktank.com> | 2012-07-12 10:47:29 -0700 |
---|---|---|
committer | Tommi Virtanen <tv@inktank.com> | 2012-07-12 10:47:29 -0700 |
commit | f8478d4c56410e7e2397c95b32ce6c33b1addb86 (patch) | |
tree | 842cb5b5843d2e74a3c26da2b5d236dfc1352df8 | |
parent | 5ceb7c734af5a05c2e6a60e1f33a8b491cf25cca (diff) | |
download | ceph-f8478d4c56410e7e2397c95b32ce6c33b1addb86.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>
-rw-r--r-- | src/upstart/ceph-osd.conf | 7 |
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 |