]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
nvmeof gw monitor: disable by default
authorAlexander Indenbaum <aindenba@redhat.com>
Thu, 25 Jul 2024 09:02:44 +0000 (09:02 +0000)
committerAlexander Indenbaum <aindenba@redhat.com>
Wed, 31 Jul 2024 08:52:05 +0000 (08:52 +0000)
Signed-off-by: Alexander Indenbaum <aindenba@redhat.com>
src/mon/Monitor.cc
src/mon/Monitor.h
src/mon/mon_types.h

index 07e6bebab4971f5130cb5993636fe14c19a364ee..7f96d7a6d1d3fbf0c24e56aa0fccb8c003745f29 100644 (file)
@@ -248,7 +248,9 @@ Monitor::Monitor(CephContext* cct_, string nm, MonitorDBStore *s,
   paxos_service[PAXOS_HEALTH].reset(new HealthMonitor(*this, *paxos, "health"));
   paxos_service[PAXOS_CONFIG].reset(new ConfigMonitor(*this, *paxos, "config"));
   paxos_service[PAXOS_KV].reset(new KVMonitor(*this, *paxos, "kv"));
+#ifdef WITH_NVMEOF_GATEWAY_MONITOR
   paxos_service[PAXOS_NVMEGW].reset(new NVMeofGwMon(*this, *paxos, "nvmeofgw"));
+#endif
 
   bool r = mon_caps.parse("allow *", NULL);
   ceph_assert(r);
@@ -3619,10 +3621,12 @@ void Monitor::handle_command(MonOpRequestRef op)
     mgrmon()->dispatch(op);
     return;
   }
+#ifdef WITH_NVMEOF_GATEWAY_MONITOR
   if (module == "nvme-gw"){
       nvmegwmon()->dispatch(op);
       return;
   }
+#endif
   if (prefix == "fsid") {
     if (f) {
       f->open_object_section("fsid");
@@ -4670,9 +4674,11 @@ void Monitor::dispatch_op(MonOpRequestRef op)
       paxos_service[PAXOS_MGR]->dispatch(op);
       return;
 
+#ifdef WITH_NVMEOF_GATEWAY_MONITOR
     case MSG_MNVMEOF_GW_BEACON:
        paxos_service[PAXOS_NVMEGW]->dispatch(op);
        return;
+#endif
 
 
     // MgrStat
@@ -5362,9 +5368,11 @@ void Monitor::handle_subscribe(MonOpRequestRef op)
     } else if (p->first.find("kv:") == 0) {
       kvmon()->check_sub(s->sub_map[p->first]);
     }
+#ifdef WITH_NVMEOF_GATEWAY_MONITOR
     else if (p->first == "NVMeofGw") {
         nvmegwmon()->check_sub(s->sub_map[p->first]);
     }
+#endif
   }
 
   if (reply) {
index 0f8481eea6dc90f097bcb8aa6f33e0cb42b0343c..ae5cf6e13ac79df72b1b70cc1a7f61d55d6a920c 100644 (file)
@@ -61,6 +61,9 @@ using namespace TOPNSPC::common;
 
 #define CEPH_MON_PROTOCOL     13 /* cluster internal */
 
+// NVMe-oF gateway monitor and HA is disabled by default upstream for now.
+// see doc/nvmeof/ha.md for more details
+//#define WITH_NVMEOF_GATEWAY_MONITOR
 
 enum {
   l_cluster_first = 555000,
@@ -713,7 +716,11 @@ public:
   }
 
   class NVMeofGwMon *nvmegwmon() {
+#ifdef WITH_NVMEOF_GATEWAY_MONITOR
       return (class NVMeofGwMon*) paxos_service[PAXOS_NVMEGW].get();
+#else
+      return nullptr;
+#endif
   }
 
 
index 9dd2797852d41cfda6f86c1463fe821e22835d55..f4e80e350195c49e6ca5636c0aad267e7c05ac84 100644 (file)
@@ -36,7 +36,9 @@ enum {
   PAXOS_HEALTH,
   PAXOS_CONFIG,
   PAXOS_KV,
+#ifdef WITH_NVMEOF_GATEWAY_MONITOR
   PAXOS_NVMEGW,
+#endif
   PAXOS_NUM
 };