From e99c1220383e8d8494b4966dc169a4e36bf39b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Tue, 16 Feb 2021 12:57:07 +0100 Subject: [PATCH] ceph: revert fail if mgr prometheus is not default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 1ed307cb0991dfd716bce471c8f88e6a11b7def0. In 8aaff235bbdf2264949145fad6804dea3865d873 we have introduced the ability to set a specific monitoring port so the block that fails if the port is not the default 9283 is not needed anymore. Signed-off-by: Sébastien Han --- .../ceph/create-external-cluster-resources.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/cluster/examples/kubernetes/ceph/create-external-cluster-resources.py b/cluster/examples/kubernetes/ceph/create-external-cluster-resources.py index bbb447d6e..617130f71 100644 --- a/cluster/examples/kubernetes/ceph/create-external-cluster-resources.py +++ b/cluster/examples/kubernetes/ceph/create-external-cluster-resources.py @@ -366,15 +366,8 @@ class RadosJSON: monitoring_endpoint_ip, monitoring_endpoint_port) self._invalid_endpoint(monitoring_endpoint) self.endpoint_dial(monitoring_endpoint) - - self.validate_monitoring_endpoint(monitoring_endpoint_port) return monitoring_endpoint_ip, monitoring_endpoint_port - def validate_monitoring_endpoint(self, port): - if port != self.DEFAULT_MONITORING_ENDPOINT_PORT: - raise ExecutionFailureException( - "'prometheus' service port must listen on {0}. You can change it with 'ceph config set mgr mgr/prometheus/server_port {0}'.\n".format(self.DEFAULT_MONITORING_ENDPOINT_PORT)) - def create_cephCSIKeyring_cephFSProvisioner(self): ''' command: ceph auth get-or-create client.csi-cephfs-provisioner mon 'allow r' mgr 'allow rw' osd 'allow rw tag cephfs metadata=*' @@ -963,8 +956,8 @@ class TestRadosJSON(unittest.TestCase): self.rjObj = RadosJSON(['--rbd-data-pool-name=abc', '--format=json']) self.rjObj.cluster = DummyRados.Rados() - valid_ip_ports = [("10.22.31.131", "9283"), - ("10.177.3.81", ""), ("", ""), ("", "9283")] + valid_ip_ports = [("10.22.31.131", "3534"), + ("10.177.3.81", ""), ("", ""), ("", "9092")] for each_ip_port_pair in valid_ip_ports: # reset monitoring ip and port self.rjObj._arg_parser.monitoring_endpoint = '' @@ -988,8 +981,8 @@ class TestRadosJSON(unittest.TestCase): check_port_val, mon_port)) print("MonIP: {}, MonPort: {}".format(mon_ip, mon_port)) - invalid_ip_ports = [("10.22.31.131.43", "5334"), ("", "9194"), - ("10.177.3.81", "90320"), ("", "73422"), ("10.232.12.8", "9092")] + invalid_ip_ports = [("10.22.31.131.43", "5334"), ("", "91943"), + ("10.177.3.81", "90320"), ("", "73422"), ("10.232.12.8", "90922")] for each_ip_port_pair in invalid_ip_ports: # reset the command-line monitoring args self.rjObj._arg_parser.monitoring_endpoint = ''