mirror of
https://github.com/ceph/ceph
synced 2025-04-01 23:02:17 +00:00
Merge pull request #803 from ceph/wip-6698
upstart: fix ceph-crush-location default Reviewed-by: Sage Weil <sage@inktank.com>
This commit is contained in:
commit
d35b282d9d
@ -19,6 +19,9 @@ pre-start script
|
||||
if [ "${update:-1}" = "1" -o "{$update:-1}" = "true" ]; then
|
||||
# update location in crush
|
||||
hook="$(ceph-conf --cluster=${cluster:-ceph} --name=osd.$id --lookup osd_crush_location_hook || :)"
|
||||
if [ -z "$hook" ]; then
|
||||
hook="/usr/bin/ceph-crush-location"
|
||||
fi
|
||||
location="$($hook --cluster ${cluster:-ceph} --id $id --type osd)"
|
||||
weight="$(ceph-conf --cluster=${cluster:-ceph} --name=osd.$id --lookup osd_crush_initial_weight || :)"
|
||||
defaultweight=`df /var/lib/ceph/osd/${cluster:-ceph}-$id/ | tail -1 | awk '{ d= $2/1073741824 ; r = sprintf("%.2f", d); print r }'`
|
||||
|
Loading…
Reference in New Issue
Block a user