From f35940f08aee2ff2a5b59edabc464585af462c76 Mon Sep 17 00:00:00 2001 From: Avan Thakkar Date: Mon, 18 Aug 2025 14:42:12 +0530 Subject: [PATCH] mgr/prometheus: fix enabled_modules check for smb metadata 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 (cherry picked from commit ea255486133c1057194db1ea56b117e498f4a34b) --- src/pybind/mgr/prometheus/module.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index a6df918078b..41b62fd6a93 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -1762,9 +1762,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]: -- 2.39.5