]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/prometheus: fix enabled_modules check for smb metadata 65084/head
authorAvan Thakkar <athakkar@redhat.com>
Mon, 18 Aug 2025 09:12:12 +0000 (14:42 +0530)
committerAvan Thakkar <athakkar@redhat.com>
Mon, 18 Aug 2025 09:55:49 +0000 (15:25 +0530)
For get_smb_metadata check for enabled modules from mgr_map instead of available modules
to get list of mgr modules which are enabled on active mgr.

Signed-off-by: Avan Thakkar <athakkar@redhat.com>
src/pybind/mgr/prometheus/module.py

index 80c3cada54ede87e7daba50e89eaa6f4b50b8b38..2f357e7cb65424b7293ae55dc51914b0772ae1b8 100644 (file)
@@ -1739,9 +1739,9 @@ class Module(MgrModule, OrchestratorClientMixin):
     def get_smb_metadata(self) -> None:
         try:
             mgr_map = self.get('mgr_map')
-            available_modules = [m['name'] for m in mgr_map['available_modules']]
-            if 'smb' not in available_modules:
-                self.log.debug("SMB module is not available, skipping SMB metadata collection")
+            enabled_modules = mgr_map['modules']
+            if 'smb' not in enabled_modules:
+                self.log.debug("SMB module is not enabled, skipping SMB metadata collection")
                 return
 
             if not self.available()[0]: