]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/DaemonServer.cc: make 'config show' on fsid work 36074/head
authorNeha Ojha <nojha@redhat.com>
Thu, 18 Jun 2020 21:59:40 +0000 (21:59 +0000)
committerNeha Ojha <nojha@redhat.com>
Fri, 10 Jul 2020 21:48:18 +0000 (21:48 +0000)
This follows 5661dd75efd48251b7f433b1ffe01c9c52906e96, which added special
handling for "config get" to work on fsid.

Fixes: https://tracker.ceph.com/issues/46123
Signed-off-by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit 3ca2c482e0fb5af9e8f13c212d60aaf55a033a94)

 Conflicts:
src/mgr/DaemonServer.cc - trivial resolution

src/mgr/DaemonServer.cc

index 0e7a795be8a2401a5d6b377830d2c234181ba828..c547bff1dfeabd35a9ef7860fd6723a5e14230f4 100644 (file)
@@ -1835,6 +1835,12 @@ bool DaemonServer::_handle_command(
     std::lock_guard l(daemon->lock);
 
     if (cmd_getval(g_ceph_context, cmdctx->cmdmap, "key", name)) {
+      // handle special options
+      if (name == "fsid") {
+       cmdctx->odata.append(stringify(monc->get_fsid()) + "\n");
+       cmdctx->reply(r, ss);
+       return true;
+      }
       auto p = daemon->config.find(name);
       if (p != daemon->config.end() &&
          !p->second.empty()) {