From 597680bd721ec32c6040c6d7b36f24a0728614a6 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 30 May 2018 14:58:35 -0500 Subject: [PATCH] mon/OSDMonitor: change 'osd find' output to list all addrs Signed-off-by: Sage Weil --- PendingReleaseNotes | 4 ++++ src/mon/OSDMonitor.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/PendingReleaseNotes b/PendingReleaseNotes index 4ffdf12f8e1..2761c198e7f 100644 --- a/PendingReleaseNotes +++ b/PendingReleaseNotes @@ -14,3 +14,7 @@ * If the cluster log is directed at syslog, the entries are now prefixed by both the string-form name and the rank-form name (e.g., ``mgr.x mgr.12345 ...`` instead of just ``mgr.12345 ...``). + +* The JSON output of the ``osd find`` command has replaced the ``ip`` + field with an ``addrs`` section to reflect that OSDs may bind to + multiple addresses. diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index d544b8e007f..7a451604ff1 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -4501,7 +4501,7 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op) boost::scoped_ptr f(Formatter::create(format, "json-pretty", "json-pretty")); f->open_object_section("osd_location"); f->dump_int("osd", osd); - f->dump_stream("ip") << osdmap.get_addr(osd); + f->dump_object("addrs", osdmap.get_addrs(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) -- 2.39.5