]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: enable nvmeof gw monitor 59588/head
authorSamuel Just <sjust@redhat.com>
Wed, 14 Aug 2024 03:09:09 +0000 (20:09 -0700)
committerSamuel Just <sjust@redhat.com>
Sat, 24 Aug 2024 01:01:23 +0000 (18:01 -0700)
This reverts commit 6911df2c834a313f0c545de4c1b309348ea5388a.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/mon/Monitor.cc
src/mon/Monitor.h
src/mon/mon_types.h

index 2f4b0b887192e21579a69ad7dc092bb02307b1b6..625838d3cd4f76ca027a1ca156c257ce8c256ab1 100644 (file)
@@ -248,9 +248,7 @@ 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);
@@ -3621,12 +3619,10 @@ 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");
@@ -4674,11 +4670,9 @@ 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
@@ -5368,11 +5362,9 @@ 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 93dfce98d68395670bbc619d10e586b0146f9551..90fbc8f09c06816d6f61d2a016536407d5fff9ce 100644 (file)
@@ -61,9 +61,6 @@ 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,
@@ -716,11 +713,7 @@ public:
   }
 
   class NVMeofGwMon *nvmegwmon() {
-#ifdef WITH_NVMEOF_GATEWAY_MONITOR
       return (class NVMeofGwMon*) paxos_service[PAXOS_NVMEGW].get();
-#else
-      return nullptr;
-#endif
   }
 
 
index f4e80e350195c49e6ca5636c0aad267e7c05ac84..9dd2797852d41cfda6f86c1463fe821e22835d55 100644 (file)
@@ -36,9 +36,7 @@ enum {
   PAXOS_HEALTH,
   PAXOS_CONFIG,
   PAXOS_KV,
-#ifdef WITH_NVMEOF_GATEWAY_MONITOR
   PAXOS_NVMEGW,
-#endif
   PAXOS_NUM
 };