Skip to content

Commit

Permalink
use 4 decimal places for default weight
Browse files Browse the repository at this point in the history
using 2 places means that when deploying a test cluster on tiny OSDs does not work

Signed-off-by: Chris MacNaughton <chris.macnaughton@canonical.com>
  • Loading branch information
ChrisMacNaughton committed Jan 11, 2016
1 parent 2a14d16 commit 479525c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/upstart/ceph-osd.conf
Expand Up @@ -24,7 +24,7 @@ pre-start script
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 -P -k /var/lib/ceph/osd/${cluster:-ceph}-$id/ | tail -1 | awk '{ d= $2/1073741824 ; r = sprintf("%.2f", d); print r }'`
defaultweight=`df -P -k /var/lib/ceph/osd/${cluster:-ceph}-$id/ | tail -1 | awk '{ d= $2/1073741824 ; r = sprintf("%.4f", d); print r }'`
ceph \
--cluster="${cluster:-ceph}" \
--name="osd.$id" \
Expand Down

0 comments on commit 479525c

Please sign in to comment.