]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crush: default to straw_calc_version 1
authorSage Weil <sage@redhat.com>
Tue, 2 Dec 2014 22:10:49 +0000 (14:10 -0800)
committerSage Weil <sage@redhat.com>
Fri, 13 Feb 2015 16:30:45 +0000 (08:30 -0800)
Stick with bobtail tunables where it affects compatibility.  Use v1 of
straw_calc, though, since that does not, and we want the best for new
clusters.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 9565621d6007302fdd68ba27b6aef22e487f0985)

src/crush/CrushWrapper.h
src/test/cli/crushtool/build.t
src/test/cli/crushtool/set-choose.t
src/test/cli/osdmaptool/create-print.t
src/test/cli/osdmaptool/create-racks.t
src/test/cli/osdmaptool/crush.t

index 4323773369be77e423baf9360bf8f4aa8738b1e2..3ae8e2a1247793b9af192406342060cb32b1d19e 100644 (file)
@@ -132,7 +132,11 @@ public:
     set_tunables_firefly();
   }
   void set_tunables_default() {
+    // default to bobtail tunables for the bits that affect
+    // compatibility, but default to the latest straw_calc_version
+    // because that does not.
     set_tunables_bobtail();
+    crush->straw_calc_version = 1;
   }
 
   int get_choose_local_tries() const {
index ca0804ded6073b27430b417a1952c8713f8eaf8d..f01673704f4c13b148dac6e0caa21e2f38840230 100644 (file)
@@ -52,7 +52,7 @@
 #
 # crush rulesets are generated using the OSDMap helpers
 #
-  $ CEPH_ARGS="--debug-crush 0" crushtool --outfn "$map" --build --num_osds 1 root straw 0
+  $ CEPH_ARGS="--debug-crush 0" crushtool --outfn "$map" --set-straw-calc-version 0 --build --num_osds 1 root straw 0
   $ crushtool -o "$map.txt" -d "$map"
   $ cat "$map.txt"
   # begin crush map
index b7ef59af2bdcf981716063ac9a10bba526bd4abd..b40494d018faf831a7b6a33562a1f1de849bb741 100644 (file)
@@ -1,5 +1,6 @@
   $ crushtool -c "$TESTDIR/set-choose.crushmap.txt" -o set-choose.crushmap
-  $ crushtool -i set-choose.crushmap --test --show-mappings --show-statistics
+  $ crushtool -i set-choose.crushmap --test --show-mappings --show-statistics --set-straw-calc-version 0
+  crushtool successfully built or modified map.  Use '-o <file>' to write it out.
   rule 0 (choose), x = 0..1023, numrep = 2..3
   CRUSH rule 0 x 0 [0,3]
   CRUSH rule 0 x 1 [0,8]
   CRUSH rule 5 x 1022 [1,6,4]
   CRUSH rule 5 x 1023 [3,2,8]
   rule 5 (chooseleaf-set) num_rep 3 result size == 3:\t1024/1024 (esc)
-  $ crushtool -i set-choose.crushmap --test --show-mappings --show-statistics --weight 0 0 --weight 1 0 --weight 3 0 --weight 4 0
+  $ crushtool -i set-choose.crushmap --test --show-mappings --show-statistics --weight 0 0 --weight 1 0 --weight 3 0 --weight 4 0 --set-straw-calc-version 0
+  crushtool successfully built or modified map.  Use '-o <file>' to write it out.
   rule 0 (choose), x = 0..1023, numrep = 2..3
   CRUSH rule 0 x 0 [2,5]
   CRUSH rule 0 x 1 [2,8]
   CRUSH rule 5 x 1022 [2,6,5]
   CRUSH rule 5 x 1023 [5,2,8]
   rule 5 (chooseleaf-set) num_rep 3 result size == 3:\t1024/1024 (esc)
-  $ crushtool -i set-choose.crushmap --test --show-mappings --show-statistics --weight 0 0 --weight 3 0 --weight 4 .5 --weight 5 0 --weight 6 .1 --weight 7 0
+  $ crushtool -i set-choose.crushmap --test --show-mappings --show-statistics --weight 0 0 --weight 3 0 --weight 4 .5 --weight 5 0 --weight 6 .1 --weight 7 0 --set-straw-calc-version 0
+  crushtool successfully built or modified map.  Use '-o <file>' to write it out.
   rule 0 (choose), x = 0..1023, numrep = 2..3
   CRUSH rule 0 x 0 [2,4]
   CRUSH rule 0 x 1 [2,8]
index 9ebd27470b8a0690141966df2e22825c04a46e2a..b642cfbc929f55c504c02483eeab2b7c97d82728 100644 (file)
@@ -11,6 +11,7 @@
   tunable choose_local_fallback_tries 0
   tunable choose_total_tries 50
   tunable chooseleaf_descend_once 1
+  tunable straw_calc_version 1
   
   # devices
   device 0 osd.0
index 33fa9eefa992c114b6d117d596dbea82293d9efb..11e322345dfde867e3f1e2c4e00276cd83cb1db2 100644 (file)
@@ -10,6 +10,7 @@
   tunable choose_local_fallback_tries 0
   tunable choose_total_tries 50
   tunable chooseleaf_descend_once 1
+  tunable straw_calc_version 1
   
   # devices
   device 0 device0
index 5833da8a7e566d2ae97cfcf0df39d9a752cf47fe..584da09f4c650ff7f232beb5e6f7fd63d17409fd 100644 (file)
@@ -6,5 +6,5 @@
   osdmaptool: exported crush map to oc
   $ osdmaptool --import-crush oc myosdmap
   osdmaptool: osdmap file 'myosdmap'
-  osdmaptool: imported 486 byte crush map from oc
+  osdmaptool: imported 487 byte crush map from oc
   osdmaptool: writing epoch 3 to myosdmap