]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr: isolated CherryPy to prevent global state sharing 67465/head
authorNizamudeen A <nia@redhat.com>
Thu, 5 Feb 2026 10:42:47 +0000 (16:12 +0530)
committerNizamudeen A <nia@redhat.com>
Wed, 22 Apr 2026 03:39:55 +0000 (09:09 +0530)
commita2f8e8dac57de0a422d88ac43b991e83e94c3c49
treebc3c315c19627cdc9b12c8fe3f6e0aa41a96852f
parent3112e5ac7d8724a8584c37c313441351d28e3a18
mgr: isolated CherryPy to prevent global state sharing

as the modules are now being loaded onto the main interpreter (see
https://github.com/ceph/ceph/pull/66244), the
cherrypy is getting hit with an issue where its global state is being
affecting all the modules updating the cherrypy config simultaneously in
the same tree.

So i am adding a CherryPyMgr which manages all the independent servers
that will be created across all modules. This CherryPyMgr will create
its own server instances by utilizing cherrypy's WSGI Server and
eliminates the global state sharing. Each module or app can create their
own tree and start an adapter which will open an independent server for
that app.

- also added a method to update the config in place so CORS urls can be
  configured without restarting servers.

Fixes: https://tracker.ceph.com/issues/74643, https://tracker.ceph.com/issues/74543, https://tracker.ceph.com/issues/74980
Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit 1384ae37c700e08688952bf437c40cac860c0fc7)

 Conflicts:
src/pybind/mgr/prometheus/module.py
 - accepted the incoming changes
17 files changed:
.github/labeler.yml
ceph.spec.in
debian/ceph-mgr.install
doc/_ext/ceph_commands.py
qa/tasks/mgr/test_prometheus.py
src/pybind/mgr/CMakeLists.txt
src/pybind/mgr/cephadm/agent.py
src/pybind/mgr/cephadm/http_server.py
src/pybind/mgr/cephadm/service_discovery.py
src/pybind/mgr/cephadm/tests/test_service_discovery.py
src/pybind/mgr/cherrypy_mgr.py [new file with mode: 0644]
src/pybind/mgr/dashboard/module.py
src/pybind/mgr/dashboard/services/auth/auth.py
src/pybind/mgr/dashboard/tools.py
src/pybind/mgr/prometheus/module.py
src/pybind/mgr/tests/test_cherrypy_mgr.py [new file with mode: 0644]
src/pybind/mgr/tox.ini