]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon/MgrMonitor: mark module options with FLAG_MGR
authorSage Weil <sage@redhat.com>
Wed, 19 Dec 2018 00:05:36 +0000 (18:05 -0600)
committerSage Weil <sage@redhat.com>
Fri, 21 Dec 2018 04:11:40 +0000 (22:11 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/common/options.h
src/mon/MgrMonitor.cc

index ce5671729f7b5201dab060cde799b9f563ab7988..7c58856a50f6d18852bc58665d9d2ace95890164 100644 (file)
@@ -116,6 +116,7 @@ struct Option {
     FLAG_STARTUP = 0x4,         ///< option can only take effect at startup
     FLAG_CLUSTER_CREATE = 0x8,  ///< option only has effect at cluster creation
     FLAG_CREATE = 0x10,         ///< option only has effect at daemon creation
+    FLAG_MGR = 0x20,            ///< option is a mgr module option
   };
 
   struct size_t {
index 9d749d26494b31b66e8712a5a88adc79a024df27..ae1476410cef6427a368684133be54f64cf6fffc 100644 (file)
@@ -173,6 +173,7 @@ void MgrMonitor::update_from_paxos(bool *need_bootstrap)
               static_cast<Option::level_t>(j.second.level)));
       Option& opt = p.first->second;
       opt.set_flags(static_cast<Option::flag_t>(j.second.flags));
+      opt.set_flag(Option::FLAG_MGR);
       opt.set_description(j.second.desc.c_str());
       opt.set_long_description(j.second.long_desc.c_str());
       for (auto& k : j.second.tags) {
@@ -180,11 +181,11 @@ void MgrMonitor::update_from_paxos(bool *need_bootstrap)
       }
       for (auto& k : j.second.see_also) {
        if (i.module_options.count(k)) {
-         // another module option
+         // it's another module option
          misc_option_strings.push_back(string("mgr/") + i.name + "/" + k);
          opt.add_see_also(misc_option_strings.back().c_str());
        } else {
-         // ceph option
+         // it's a native option
          opt.add_see_also(k.c_str());
        }
       }