]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
nvmeof: add connection features debug logging in monitor client dispatch
authorAlexander Indenbaum <aindenba@redhat.com>
Tue, 12 Aug 2025 09:36:44 +0000 (12:36 +0300)
committerLeonid Chernin <leonidc@il.ibm.com>
Sun, 14 Sep 2025 06:37:52 +0000 (09:37 +0300)
for beacon feature debug purposes, print connection features hex value
when processing incoming messages in NVMeofGwMonitorClient::ms_dispatch2

Signed-off-by: Alexander Indenbaum <aindenba@redhat.com>
src/nvmeof/NVMeofGwMonitorClient.cc

index 6d5f6f45e586d1ba014743597e7a1e3545d2ec21..5befd1d18a514ea00bbab1ec13f70f162a4e40df 100644 (file)
@@ -246,6 +246,7 @@ void NVMeofGwMonitorClient::send_beacon()
     gw_availability = ok ? gw_availability_t::GW_AVAILABLE : gw_availability_t::GW_UNAVAILABLE;
   dout(1) << "sending beacon as gid " << monc.get_global_id() << " availability " << (int)gw_availability <<
     " osdmap_epoch " << osdmap_epoch << " gwmap_epoch " << gwmap_epoch << dendl;
+
   auto m = ceph::make_message<MNVMeofGwBeacon>(
       name,
       pool,
@@ -464,6 +465,12 @@ Dispatcher::dispatch_result_t NVMeofGwMonitorClient::ms_dispatch2(const ref_t<Me
   std::lock_guard l(lock);
   dout(10) << "got map type " << m->get_type() << dendl;
 
+  // print connection features for all incoming messages
+  if (m->get_connection()) {
+    uint64_t features = m->get_connection()->get_features();
+    dout(4) << "Monitor connection features: 0x" << std::hex << features << std::dec << dendl;
+  }
+
   if (m->get_type() == MSG_MNVMEOF_GW_MAP) {
     handle_nvmeof_gw_map(ref_cast<MNVMeofGwMap>(m));
     return Dispatcher::HANDLED();