]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: squelch 'id' arg errors 19998/head
authorSage Weil <sage@redhat.com>
Wed, 17 Jan 2018 17:23:39 +0000 (11:23 -0600)
committerSage Weil <sage@redhat.com>
Thu, 18 Jan 2018 17:46:14 +0000 (11:46 -0600)
Several commands use 'id' but for other types (e.g., vector<int64_t>).

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/OSDMonitor.cc

index 1d9cef39e6db981e89cbaadadfdfe0b20fbc5acd..6a22f1dbf13df458525b36a13fceab096ef0b6d1 100644 (file)
@@ -7240,7 +7240,12 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
 
   int64_t osdid;
   string name;
-  bool osdid_present = cmd_getval(cct, 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(cct, cmdmap, "id", osdid);
+  }
   if (osdid_present) {
     ostringstream oss;
     oss << "osd." << osdid;