From 479525ca52d09ffdb58034c0e2a930bd755c9c53 Mon Sep 17 00:00:00 2001 From: Chris MacNaughton Date: Mon, 11 Jan 2016 11:07:55 -0500 Subject: [PATCH] use 4 decimal places for default weight using 2 places means that when deploying a test cluster on tiny OSDs does not work Signed-off-by: Chris MacNaughton --- src/upstart/ceph-osd.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/upstart/ceph-osd.conf b/src/upstart/ceph-osd.conf index 6fa97ed1d239..c75dbfd8463c 100644 --- a/src/upstart/ceph-osd.conf +++ b/src/upstart/ceph-osd.conf @@ -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" \ -- 2.47.3