]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
use 4 decimal places for default weight 7192/head
authorChris MacNaughton <chmacnaughton@gmail.com>
Mon, 11 Jan 2016 16:07:55 +0000 (11:07 -0500)
committerChris MacNaughton <chmacnaughton@gmail.com>
Mon, 11 Jan 2016 16:08:10 +0000 (11:08 -0500)
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>
src/upstart/ceph-osd.conf

index 6fa97ed1d239d5721c60bc6f3d168dc6bf9e1603..c75dbfd8463c8e9882d8f58e5a2e5ed8e8f4d741 100644 (file)
@@ -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" \