]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: open ceph-exporter when firewalld is enabled 59694/head
authorRedouane Kachach <rkachach@ibm.com>
Tue, 10 Sep 2024 07:47:44 +0000 (09:47 +0200)
committerRedouane Kachach <rkachach@ibm.com>
Tue, 10 Sep 2024 07:47:44 +0000 (09:47 +0200)
ceph-exporter port was not opened properly during daemon deployment
forcing the user to open it manually. This change fixes the logic to
open the port automatically.

Fixes: https://tracker.ceph.com/issues/67975
Signed-off-by: Redouane Kachach <rkachach@ibm.com>
src/pybind/mgr/cephadm/tests/test_services.py
src/python-common/ceph/deployment/service_spec.py

index 08802cd5923dc28ff89f7085646f2fe7ddc47cb6..2d4a9f5976f9471bea71a6a4431b0b2eb96b5299 100644 (file)
@@ -716,10 +716,10 @@ class TestMonitoring:
                                                     "name": "ceph-exporter.test",
                                                     "image": "",
                                                     "deploy_arguments": [],
-                                                    "params": {},
+                                                    "params": {"tcp_ports": [9926]},
                                                     "meta": {
                                                         "service_name": "ceph-exporter",
-                                                        "ports": [],
+                                                        "ports": [9926],
                                                         "ip": None,
                                                         "deployed_by": [],
                                                         "rank": None,
index 0efd10545c6be4d319767f02ba5d0dc2010522f9..36f7366e670c61a6fe98ef2913484f4b337b25cd 100644 (file)
@@ -2821,6 +2821,9 @@ class CephExporterSpec(ServiceSpec):
         self.prio_limit = prio_limit
         self.stats_period = stats_period
 
+    def get_port_start(self) -> List[int]:
+        return [self.port or 9926]
+
     def validate(self) -> None:
         super(CephExporterSpec, self).validate()