diff options
author | Sage Weil <sage@newdream.net> | 2011-05-17 15:31:37 -0700 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-05-17 17:05:54 -0700 |
commit | 108b2a69c19d56f22d558f6991b34a1695102896 (patch) | |
tree | 26e5eae7162be6e0af4a9724f74bfb03b44620c1 /src/osdmaptool.cc | |
parent | 0e3f09238bb02c3b8859e0fc95ed06e4821a97a1 (diff) | |
download | ceph-108b2a69c19d56f22d558f6991b34a1695102896.tar.gz |
osdmaptool: print crush tree + osd state
Output osd state combined with crush tree placement. Note osds in tree
that do not exist and list osds that exist that are not included in the
tree.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'src/osdmaptool.cc')
-rw-r--r-- | src/osdmaptool.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/osdmaptool.cc b/src/osdmaptool.cc index 33bc284d884..62a8d5acdc6 100644 --- a/src/osdmaptool.cc +++ b/src/osdmaptool.cc @@ -56,6 +56,7 @@ int main(int argc, const char **argv) const char *fn = 0; bool print = false; + bool tree = false; bool createsimple = false; int num_osd = 0, num_dom = 0; int pg_bits = g_conf.osd_pg_bits; @@ -75,6 +76,8 @@ int main(int argc, const char **argv) usage(); } else if (CEPH_ARGPARSE_EQ("print", 'p')) { CEPH_ARGPARSE_SET_ARG_VAL(&print, OPT_BOOL); + } else if (CEPH_ARGPARSE_EQ("tree", '\0')) { + CEPH_ARGPARSE_SET_ARG_VAL(&tree, OPT_BOOL); } else if (CEPH_ARGPARSE_EQ("createsimple", '\0')) { createsimple = true; CEPH_ARGPARSE_SET_ARG_VAL(&num_osd, OPT_INT); @@ -240,7 +243,7 @@ int main(int argc, const char **argv) } } - if (!print && !modified && !export_crush && !import_crush && !test_map_pg && !test_map_object) { + if (!print && !tree && !modified && !export_crush && !import_crush && !test_map_pg && !test_map_object) { cerr << me << ": no action specified?" << std::endl; usage(); } @@ -250,6 +253,8 @@ int main(int argc, const char **argv) if (print) osdmap.print(cout); + if (tree) + osdmap.print_tree(cout); if (modified) { bl.clear(); |