From: Nitzan Mordechai Date: Thu, 11 Dec 2025 06:32:31 +0000 (+0000) Subject: mgr/prometheus: metrics header for standby module X-Git-Tag: v21.0.0~142^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2ef12b2ffa6dd11041e7120febcbd62338ec8cd3;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 --- diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index f5c8f778521e..0d825c427300 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -2121,6 +2121,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 @@ -2330,6 +2331,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(), '/', {})