]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/prometheus: metrics header for standby module
authorNitzan Mordechai <nmordech@redhat.com>
Thu, 11 Dec 2025 06:32:31 +0000 (06:32 +0000)
committerNitzanMordhai <nmordech@ibm.com>
Wed, 11 Feb 2026 09:08:22 +0000 (09:08 +0000)
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 <nmordech@ibm.com>
src/pybind/mgr/prometheus/module.py

index f5c8f778521e3890249f222cd701706bed9f0edf..0d825c42730018ff748fbcf280ae14c9357b2979 100644 (file)
@@ -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(), '/', {})