Several commands use 'id' but for other types (e.g., vector<int64_t>).
Signed-off-by: Sage Weil <sage@redhat.com>
(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.
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;