]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert PR "mon: Add nvmeof group/gateway name in "ceph -s"" 63416/head
authorVallari Agrawal <vallari.agrawal@ibm.com>
Wed, 21 May 2025 12:20:32 +0000 (17:50 +0530)
committerVallari Agrawal <vallari.agrawal@ibm.com>
Mon, 26 May 2025 09:27:48 +0000 (14:57 +0530)
Revert "mon: show count of active/total nvmeof gws in "ceph -s""
This reverts commit 3065ffeb01428dd319bdcd4f1c16c3f92a32c723.

Revert "mon: Add nvmeof group/gateway name in  "ceph -s""
This reverts commit e3fab2a50f1a1d8444dbf34a6df22733f4f1be17.

Fixes: https://tracker.ceph.com/issues/71435
Signed-off-by: Vallari Agrawal <vallari.agrawal@ibm.com>
src/mon/Monitor.cc

index affd9732ed82770bec73e771b2ca32ff6ef2a3b9..e3bcd2f0459f8dad71a6dc5bd08ee92c04ec70d6 100644 (file)
@@ -3118,23 +3118,8 @@ void Monitor::get_cluster_status(stringstream &ss, Formatter *f,
     {
       size_t maxlen = 3;
       auto& service_map = mgrstatmon()->get_service_map();
-      std::map<NvmeGroupKey, std::set<std::string>> nvmeof_services;
       for (auto& p : service_map.services) {
-        if (p.first == "nvmeof") {
-          auto daemons = p.second.daemons;
-          for (auto& d : daemons) {
-            auto group = d.second.metadata.find("group");
-            auto pool = d.second.metadata.find("pool_name"); 
-            auto gw_id = d.second.metadata.find("id");
-            NvmeGroupKey group_key = std::make_pair(pool->second,  group->second); 
-            nvmeof_services[group_key].insert(gw_id->second);
-            maxlen = std::max(maxlen, 
-                p.first.size() + group->second.size() + pool->second.size() + 4
-              ); // nvmeof (pool.group):
-          }
-        } else {
-          maxlen = std::max(maxlen, p.first.size());
-        }
+       maxlen = std::max(maxlen, p.first.size());
       }
       string spacing(maxlen - 3, ' ');
       const auto quorum_names = get_quorum_names();
@@ -3181,31 +3166,8 @@ void Monitor::get_cluster_status(stringstream &ss, Formatter *f,
         if (ServiceMap::is_normal_ceph_entity(service)) {
           continue;
         }
-        if (p.first == "nvmeof") {
-          auto created_gws = nvmegwmon()->get_map().created_gws;
-          for (const auto& created_map_pair: created_gws) {
-            const auto& group_key = created_map_pair.first;
-            const NvmeGwMonStates& gw_created_map = created_map_pair.second;
-            const int total = gw_created_map.size();
-            auto& active_gws = nvmeof_services[group_key];
-
-            ss << "    " << p.first << " (" << group_key.first << "." << group_key.second << "): ";
-            ss << string(maxlen - p.first.size() - group_key.first.size() 
-                    - group_key.second.size() - 4, ' ');
-            ss << total << " gateway" << (total > 1 ? "s" : "") << ": " 
-               << active_gws.size() << " active (";
-            for (auto gw = active_gws.begin(); gw != active_gws.end(); ++gw){
-              if (gw != active_gws.begin()) {
-                     ss << ", ";
-              }
-              ss << *gw; 
-            }
-            ss << ") \n";
-          }
-        } else {
        ss << "    " << p.first << ": " << string(maxlen - p.first.size(), ' ')
           << p.second.get_summary() << "\n";
-        }
       }
     }