From: Noah Watkins Date: Thu, 17 Jan 2019 19:16:44 +0000 (-0800) Subject: cli: dump osd-fsid as part of osd find X-Git-Tag: v12.2.11~8^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F26036%2Fhead;p=ceph.git cli: dump osd-fsid as part of osd find Dumps the osd-fsid uuid as part of the `osd find ` 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 (cherry picked from commit 4d01b2c96e0ea1122225c30da21bc39c40e15c0e) --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index d8806679bde..a2e206eefbf 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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 loc = osdmap.crush->get_full_location(osd); for (map::iterator p = loc.begin(); p != loc.end(); ++p)