]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cli: dump osd-fsid as part of osd find <id> 26036/head
authorNoah Watkins <noahwatkins@gmail.com>
Thu, 17 Jan 2019 19:16:44 +0000 (11:16 -0800)
committerNoah Watkins <noahwatkins@gmail.com>
Fri, 18 Jan 2019 19:52:54 +0000 (11:52 -0800)
Dumps the osd-fsid uuid as part of the `osd find <id>` command.
Currently this uuid is only available as part of `osd dump` but
ceph-ansible has a use case to interrogate a single osd without needing
the entire osdmap dump.

Fixes: http://tracker.ceph.com/issues/37966
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
(cherry picked from commit 4d01b2c96e0ea1122225c30da21bc39c40e15c0e)

src/mon/OSDMonitor.cc

index d8806679bde8bf1a27e64a55bbe9892504818aee..a2e206eefbf4653fdc5845aa723ef0140c00b2bc 100644 (file)
@@ -4499,6 +4499,7 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op)
     f->open_object_section("osd_location");
     f->dump_int("osd", osd);
     f->dump_stream("ip") << osdmap.get_addr(osd);
+    f->dump_stream("osd_fsid") << osdmap.get_uuid(osd);
     f->open_object_section("crush_location");
     map<string,string> loc = osdmap.crush->get_full_location(osd);
     for (map<string,string>::iterator p = loc.begin(); p != loc.end(); ++p)