]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: drop hide_mgr_flag behavior
authorSage Weil <sage@redhat.com>
Sat, 26 Aug 2017 19:22:15 +0000 (15:22 -0400)
committerSage Weil <sage@redhat.com>
Wed, 6 Sep 2017 14:18:03 +0000 (10:18 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/Monitor.cc
src/mon/Monitor.h

index 7a79723153bc31c2a8a5a373652d9325a19c58de..9f0a3560c64d0a74963c1e5b93190bacc599d538 100755 (executable)
@@ -2762,16 +2762,12 @@ bool Monitor::_allowed_command(MonSession *s, string &module, string &prefix,
 
 void Monitor::format_command_descriptions(const std::vector<MonCommand> &commands,
                                          Formatter *f,
-                                         bufferlist *rdata,
-                                         bool hide_mgr_flag)
+                                         bufferlist *rdata)
 {
   int cmdnum = 0;
   f->open_object_section("command_descriptions");
   for (const auto &cmd : commands) {
     unsigned flags = cmd.flags;
-    if (hide_mgr_flag) {
-      flags &= ~MonCommand::FLAG_MGR;
-    }
     ostringstream secname;
     secname << "cmd" << setfill('0') << std::setw(3) << cmdnum;
     dump_cmddesc_to_json(f, secname.str(),
@@ -2870,9 +2866,6 @@ void Monitor::handle_command(MonOpRequestRef op)
   if (prefix == "get_command_descriptions") {
     bufferlist rdata;
     Formatter *f = Formatter::create("json");
-    // hide mgr commands until luminous upgrade is complete
-    bool hide_mgr_flag =
-      osdmon()->osdmap.require_osd_release < CEPH_RELEASE_LUMINOUS;
 
     std::vector<MonCommand> commands = static_cast<MgrMonitor*>(
         paxos_service[PAXOS_MGR])->get_command_descs();
@@ -2881,7 +2874,7 @@ void Monitor::handle_command(MonOpRequestRef op)
       commands.push_back(c);
     }
 
-    format_command_descriptions(commands, f, &rdata, hide_mgr_flag);
+    format_command_descriptions(commands, f, &rdata);
     delete f;
     reply_command(op, 0, "", rdata, 0);
     return;
index 7bd17021305b6f435c65df4cd610b00dc12d87fe..3aa63abf3fb0f6007a9c27de79415dfe6786e1d0 100644 (file)
@@ -962,8 +962,7 @@ private:
 public:
   static void format_command_descriptions(const std::vector<MonCommand> &commands,
                                          Formatter *f,
-                                         bufferlist *rdata,
-                                         bool hide_mgr_flag=false);
+                                         bufferlist *rdata);
 
   const std::vector<MonCommand> &get_local_commands(mon_feature_t f) {
     return local_mon_commands;