diff --git a/cluster/examples/kubernetes/ceph/create-external-cluster-resources.py b/cluster/examples/kubernetes/ceph/create-external-cluster-resources.py index 09c479445..ffe8fbc13 100644 --- a/cluster/examples/kubernetes/ceph/create-external-cluster-resources.py +++ b/cluster/examples/kubernetes/ceph/create-external-cluster-resources.py @@ -362,8 +362,15 @@ class RadosJSON: monitoring_endpoint = self._join_host_port(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 {}. You can change it with 'ceph config set mgr mgr/prometheus/server_port {}'.\n".format(self.DEFAULT_MONITORING_ENDPOINT_PORT, 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=*' @@ -937,8 +944,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", "3534"), - ("10.177.3.81", ""), ("", ""), ("", "9092")] + valid_ip_ports = [("10.22.31.131", "9283"), + ("10.177.3.81", ""), ("", ""), ("", "9283")] for each_ip_port_pair in valid_ip_ports: # reset monitoring ip and port self.rjObj._arg_parser.monitoring_endpoint = ''