]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cli: dump osd-fsid as part of osd find <id> 26035/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:53:30 +0000 (11:53 -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 66f20ae1e972880a7e85c2cdd628faca246de45b..424f4c546cfa9275cf6072300d1e9c327958cf19 100644 (file)
@@ -4561,6 +4561,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)