]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/ConfigMonitor: allow entity type only for 'config get'
authorSage Weil <sage@redhat.com>
Tue, 1 Oct 2019 16:34:22 +0000 (11:34 -0500)
committerSage Weil <sage@redhat.com>
Sat, 5 Oct 2019 01:33:35 +0000 (20:33 -0500)
e.g., 'ceph config get osd debug_osd' to return the config value that
would apply to a generic OSD (either from the osd or global section of
the config).

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

index c1814b28eb872fae902733dfad71b62d3eea4a9e..aeaa74ce1a8e598184fb425167c04efda4ec0ccd 100644 (file)
@@ -257,7 +257,8 @@ bool ConfigMonitor::preprocess_command(MonOpRequestRef op)
     cmd_getval(g_ceph_context, cmdmap, "who", who);
 
     EntityName entity;
-    if (!entity.from_str(who)) {
+    if (!entity.from_str(who) &&
+       !entity.from_str(who + ".")) {
       ss << "unrecognized entity '" << who << "'";
       err = -EINVAL;
       goto reply;