From: Nitzan Mordechai Date: Thu, 11 Dec 2025 06:32:31 +0000 (+0000) Subject: mgr/prometheus: metrics header for standby module X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7fb7485287d3a39633b204b29160853983c2e68a;p=ceph.git mgr/prometheus: metrics header for standby module PR #65245 drop the header set for standby module, we should still have it. Fixes: https://tracker.ceph.com/issues/74149 Signed-off-by: Nitzan Mordechai (cherry picked from commit 2ef12b2ffa6dd11041e7120febcbd62338ec8cd3) --- diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index 3b5e36bda3c0..6a871f0599e4 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -2095,6 +2095,7 @@ class Module(MgrModule, OrchestratorClientMixin): # Lock the function execution assert isinstance(_global_instance, Module) with _global_instance.collect_lock: + cherrypy.response.headers['Content-Type'] = 'text/plain; charset=utf-8' return self._metrics(_global_instance) @staticmethod @@ -2265,6 +2266,7 @@ class StandbyModule(MgrStandbyModule): @cherrypy.expose def metrics(self) -> str: + cherrypy.response.headers['Content-Type'] = 'text/plain; charset=utf-8' return '' cherrypy.tree.mount(Root(), '/', {})