From: Sage Weil Date: Sun, 8 Feb 2015 15:44:08 +0000 (-0800) Subject: crushtool: name osds with --build function X-Git-Tag: suse_latest~26^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2b92320b9ab7e77d483eec837baa10d63aebb92c;p=ceph.git crushtool: name osds with --build function Signed-off-by: Sage Weil --- diff --git a/src/test/cli/crushtool/build.t b/src/test/cli/crushtool/build.t index 16af49044aeb..57fb2b275f28 100644 --- a/src/test/cli/crushtool/build.t +++ b/src/test/cli/crushtool/build.t @@ -33,7 +33,7 @@ tunable chooseleaf_descend_once 1 # devices - device 0 device0 + device 0 osd.0 # types type 0 device @@ -45,7 +45,7 @@ \t# weight 1.000 (esc) \talg straw (esc) \thash 0\t# rjenkins1 (esc) - \titem device0 weight 1.000 (esc) + \titem osd.0 weight 1.000 (esc) } # rules diff --git a/src/tools/crushtool.cc b/src/tools/crushtool.cc index f66e820aa3e8..12d6c7aa7b62 100644 --- a/src/tools/crushtool.cc +++ b/src/tools/crushtool.cc @@ -27,6 +27,7 @@ #include "common/config.h" #include "common/ceph_argparse.h" +#include "include/stringify.h" #include "global/global_context.h" #include "global/global_init.h" #include "osd/OSDMap.h" @@ -531,11 +532,12 @@ int main(int argc, const char **argv) vector lower_items; vector lower_weights; + crush.set_max_devices(num_osds); for (int i=0; i::iterator p = layers.begin(); p != layers.end(); ++p, type++) {