From 2260f03b360e8226bf5875c5840dabc07080d174 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 17 Jan 2018 11:23:39 -0600 Subject: [PATCH] mon/OSDMonitor: squelch 'id' arg errors Several commands use 'id' but for other types (e.g., vector). Signed-off-by: Sage Weil (cherry picked from commit 0580f0125bc014e5d97b8317a1bd53a3495f03bf) Conflicts: src/mon/OSDMonitor.cc: pass g_ceph_context instead of cct to cmd_getval() to be consistent with other callsites of this function. we can do the s/g_ceph_context/cct/ in another commit, if it turns out to be a critical fix. --- src/mon/OSDMonitor.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 9dd03351bfb6b..180b6967e65fa 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -7584,7 +7584,12 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, int64_t osdid; string name; - bool osdid_present = cmd_getval(g_ceph_context, cmdmap, "id", osdid); + bool osdid_present = false; + if (prefix != "osd pg-temp" && + prefix != "osd pg-upmap" && + prefix != "osd pg-upmap-items") { // avoid commands with non-int id arg + osdid_present = cmd_getval(g_ceph_context, cmdmap, "id", osdid); + } if (osdid_present) { ostringstream oss; oss << "osd." << osdid; -- 2.39.5