]> 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>
Thu, 5 Mar 2026 06:54:49 +0000 (06:54 +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>
(cherry picked from commit 2ef12b2ffa6dd11041e7120febcbd62338ec8cd3)

src/pybind/mgr/prometheus/module.py

index 3b5e36bda3c062b53a7a53e810ae64067ba350f3..6a871f0599e492a3e7e493717b9df3f534ddbf3f 100644 (file)
@@ -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(), '/', {})