summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/prometheus/module.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/pybind/mgr/prometheus/module.py')
-rw-r--r--src/pybind/mgr/prometheus/module.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py
index 8b1c0921896..381f7e460c5 100644
--- a/src/pybind/mgr/prometheus/module.py
+++ b/src/pybind/mgr/prometheus/module.py
@@ -8,7 +8,6 @@ import re
import threading
import time
import enum
-from packaging import version # type: ignore
from collections import namedtuple
import tempfile
@@ -29,21 +28,6 @@ MetricValue = Dict[LabelValues, Number]
DEFAULT_PORT = 9283
-# When the CherryPy server in 3.2.2 (and later) starts it attempts to verify
-# that the ports its listening on are in fact bound. When using the any address
-# "::" it tries both ipv4 and ipv6, and in some environments (e.g. kubernetes)
-# ipv6 isn't yet configured / supported and CherryPy throws an uncaught
-# exception.
-if cherrypy is not None:
- Version = version.Version
- v = Version(cherrypy.__version__)
- # the issue was fixed in 3.2.3. it's present in 3.2.2 (current version on
- # centos:7) and back to at least 3.0.0.
- if Version("3.1.2") <= v < Version("3.2.3"):
- # https://github.com/cherrypy/cherrypy/issues/1100
- from cherrypy.process import servers
- servers.wait_for_occupied_port = lambda host, port: None
-
# cherrypy likes to sys.exit on error. don't let it take us down too!
def os_exit_noop(status: int) -> None: