Skip to content

Commit 9272d43

Browse files
authored
Merge pull request ceph#60602 from rhcs-dashboard/cherrypy-version-get-fix
mgr/dashboard: remove cherrypy_backports.py Reviewed-by: Ernesto Puerta <[email protected]> Reviewed-by: Afreen Misbah <[email protected]> Reviewed-by: Adam King <[email protected]> Reviewed-by: Casey Bodley <[email protected]>
2 parents 28e38e3 + 7ae56f4 commit 9272d43

File tree

3 files changed

+0
-219
lines changed

3 files changed

+0
-219
lines changed

src/pybind/mgr/dashboard/cherrypy_backports.py

Lines changed: 0 additions & 199 deletions
This file was deleted.

src/pybind/mgr/dashboard/module.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@
4949

5050
from .services.sso import load_sso_db
5151

52-
if cherrypy is not None:
53-
from .cherrypy_backports import patch_cherrypy
54-
patch_cherrypy(cherrypy.__version__)
55-
5652
# pylint: disable=wrong-import-position
5753
from .plugins import PLUGIN_MANAGER, debug, feature_toggles, motd # isort:skip # noqa E501 # pylint: disable=unused-import
5854

src/pybind/mgr/prometheus/module.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import threading
99
import time
1010
import enum
11-
from packaging import version # type: ignore
1211
from collections import namedtuple
1312
import tempfile
1413

@@ -29,21 +28,6 @@
2928

3029
DEFAULT_PORT = 9283
3130

32-
# When the CherryPy server in 3.2.2 (and later) starts it attempts to verify
33-
# that the ports its listening on are in fact bound. When using the any address
34-
# "::" it tries both ipv4 and ipv6, and in some environments (e.g. kubernetes)
35-
# ipv6 isn't yet configured / supported and CherryPy throws an uncaught
36-
# exception.
37-
if cherrypy is not None:
38-
Version = version.Version
39-
v = Version(cherrypy.__version__)
40-
# the issue was fixed in 3.2.3. it's present in 3.2.2 (current version on
41-
# centos:7) and back to at least 3.0.0.
42-
if Version("3.1.2") <= v < Version("3.2.3"):
43-
# https://github.com/cherrypy/cherrypy/issues/1100
44-
from cherrypy.process import servers
45-
servers.wait_for_occupied_port = lambda host, port: None
46-
4731

4832
# cherrypy likes to sys.exit on error. don't let it take us down too!
4933
def os_exit_noop(status: int) -> None:

0 commit comments

Comments
 (0)