]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSDMap: do not create erasure rule by default 1132/head
authorSage Weil <sage@inktank.com>
Thu, 23 Jan 2014 17:16:54 +0000 (09:16 -0800)
committerSage Weil <sage@inktank.com>
Thu, 23 Jan 2014 17:16:54 +0000 (09:16 -0800)
If we do, we will require the v2 feature bit from clients.

We could only include feature bits for rules that are actually referenced
by pools, but for now making the user create the rule is simpler.  There is
no need to create this rule ahead of time.

Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/OSDMap.cc
src/test/cli/crushtool/build.t
src/test/cli/osdmaptool/create-print.t
src/test/cli/osdmaptool/create-racks.t

index ed341aa0cffb88345e26249633adf366e44bed74..8361bf70f751f583556326e6ae5094392d5f1907 100644 (file)
@@ -2081,10 +2081,7 @@ int OSDMap::build_simple_crush_rulesets(CephContext *cct,
                               "firstn", pg_pool_t::TYPE_REPLICATED, ss);
   if (r < 0)
     return r;
-  r = crush.add_simple_ruleset("erasure_ruleset", root, failure_domain,
-                                 "indep", pg_pool_t::TYPE_ERASURE, ss);
-  if (r < 0)
-    return r;
-  else
-    return 0;
+  // do not add an erasure rule by default or else we will implicitly
+  // require the crush_v2 feature of clients
+  return 0;
 }
index e7a56327118b4ce4c70f82d30aa747714f1947f7..ca0804ded6073b27430b417a1952c8713f8eaf8d 100644 (file)
   \tstep chooseleaf firstn 0 type root (esc)
   \tstep emit (esc)
   }
-  rule erasure_ruleset {
-  \truleset 1 (esc)
-  \ttype erasure (esc)
-  \tmin_size 3 (esc)
-  \tmax_size 20 (esc)
-  \tstep set_chooseleaf_tries 5 (esc)
-  \tstep take root (esc)
-  \tstep chooseleaf indep 0 type root (esc)
-  \tstep emit (esc)
-  }
   
   # end crush map
   $ rm "$map" "$map.txt"
index c95d9d30a3bc016c1ea9b90747d280fff40f7604..c8e405e2a865cddf4c284d881ddc1ebd1bc0f839 100644 (file)
   \tstep chooseleaf firstn 0 type host (esc)
   \tstep emit (esc)
   }
-  rule erasure_ruleset {
-  \truleset 1 (esc)
-  \ttype erasure (esc)
-  \tmin_size 3 (esc)
-  \tmax_size 20 (esc)
-  \tstep set_chooseleaf_tries 5 (esc)
-  \tstep take default (esc)
-  \tstep chooseleaf indep 0 type host (esc)
-  \tstep emit (esc)
-  }
   
   # end crush map
   $ osdmaptool --print myosdmap
index 426cb869ff6a98ac01c265ba58ccb37e1238a3c8..048f474fd5c37f607511342ea87235c33b574b04 100644 (file)
   \tstep chooseleaf firstn 0 type host (esc)
   \tstep emit (esc)
   }
-  rule erasure_ruleset {
-  \truleset 1 (esc)
-  \ttype erasure (esc)
-  \tmin_size 3 (esc)
-  \tmax_size 20 (esc)
-  \tstep set_chooseleaf_tries 5 (esc)
-  \tstep take default (esc)
-  \tstep chooseleaf indep 0 type host (esc)
-  \tstep emit (esc)
-  }
   
   # end crush map
   $ rm oc