Project

General

Profile

Bug #20053

Updated by Loic Dachary over 2 years ago

The weight of an item is displayed with %.3f and looses precision that makes a difference in mapping.

Steps to reproduce:

<pre>
bin/crushtool --outfn /tmp/a --build --set-chooseleaf-vary-r 0 --num_osds 5 node straw2 5 root straw2 0 -o /tmp/a
bin/crushtool -i /tmp/a -o /tmp/a --reweight-item osd.0 0.8009
bin/crushtool -i /tmp/a -o /tmp/a --reweight-item osd.1 0.8001
bin/crushtool -d /tmp/a -o /tmp/a.txt
bin/crushtool -c /tmp/a.txt -o /tmp/b
$ bin/crushtool -i /tmp/a --tree
ID WEIGHT TYPE NAME
-2 4.60098 root root
-1 4.60098 node node0
0 0.80089 osd.0
1 0.80009 osd.1
2 1.00000 osd.2
3 1.00000 osd.3
4 1.00000 osd.4
$ bin/crushtool -i /tmp/b --tree
ID WEIGHT TYPE NAME
-2 4.60100 root root
-1 4.60100 node node0
0 0.80099 osd.0
1 0.79999 osd.1
2 1.00000 osd.2
3 1.00000 osd.3
4 1.00000 osd.4
$ bin/crushtool -i /tmp/a --show-mappings --test --rule 0 --x 1064 --num-rep 1
CRUSH rule 0 x 1064 [1]
$ bin/crushtool -i /tmp/b --show-mappings --test --rule 0 --x 1064 --num-rep 1
CRUSH rule 0 x 1064 [3]
</pre>

Back