]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crush/CrushCompiler: start with legacy tunables when compiling
authorSage Weil <sage@inktank.com>
Sat, 7 Dec 2013 00:18:04 +0000 (16:18 -0800)
committerSage Weil <sage@inktank.com>
Sat, 7 Dec 2013 00:24:15 +0000 (16:24 -0800)
Ensure that a crush file always compiled deterministically, even though
the default values for *new* maps has changed.

Signed-off-by: Sage Weil <sage@inktank.com>
src/crush/CrushCompiler.cc

index 5f92bf7e4ecd0f65258e98af67ebd93548c02a91..43ff2b1e8af689d0e8797706772791620369cc83 100644 (file)
@@ -728,6 +728,10 @@ int CrushCompiler::compile(istream& in, const char *infn)
   if (!infn)
     infn = "<input>";
 
+  // always start with legacy tunables, so that the compiled result of
+  // a given crush file is fixed for all time.
+  crush.set_tunables_legacy();
+
   string big;
   string str;
   int line = 1;